75 lines
1.8 KiB
C++
75 lines
1.8 KiB
C++
#ifndef CHANNELLIST_H
|
|
#define CHANNELLIST_H
|
|
|
|
#include <QWidget>
|
|
#include <QStandardItemModel> //数据模型类
|
|
#include <QMessageBox>
|
|
#include "headerView.h"
|
|
#include "TableHeaderView.h"
|
|
#include "global.h"
|
|
#include "ftpclient.h"
|
|
#include "SlowSpeedChannelSetting.h"
|
|
#include "ChannelSetting.h"
|
|
|
|
|
|
namespace Ui {
|
|
class CChannelList;
|
|
}
|
|
|
|
class CChannelList : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CChannelList(QWidget *parent = nullptr);
|
|
~CChannelList();
|
|
void setColumnCheckable(int column, bool checkable);
|
|
|
|
public slots:
|
|
|
|
void on_columnSectionClicked(int column, bool checked);
|
|
void slotSetChannelData(ChannelSetting channelSetting);
|
|
void slotChannelSettingClose();
|
|
private:
|
|
Ui::CChannelList *ui;
|
|
QStandardItemModel *m_pModel; //数据模型对象指针
|
|
|
|
CHeaderView *m_pHeaderView; //表头对象指针
|
|
public:
|
|
ChannelSetting channelSetting[128];
|
|
private:
|
|
TableHeaderView *myHeader;
|
|
QStandardItemModel *model;
|
|
QString headerStr ;
|
|
private:
|
|
void initReadConfig();
|
|
void iniVar();
|
|
void iniUi();
|
|
void iniConnect();
|
|
void createItem(QStringList filename);
|
|
void createRowItem(int Row,QVariantList RowItem);
|
|
void putJson();
|
|
|
|
|
|
QJsonDocument m_Document;
|
|
QJsonArray m_JsonArray;
|
|
int m_nCurRow;
|
|
CSlowSpeedChannelSetting *SlowSpeeddialog;
|
|
CChannelSetting *ChannelSettingdialog;
|
|
|
|
void operateChannelFilter(bool type,QJsonArray& channleList);
|
|
private slots:
|
|
void headerStateChangedSlot(int state);
|
|
void itemChangedSlot(QStandardItem* item);
|
|
void slotRowDoubleClicked(const QModelIndex& index);
|
|
|
|
void on_pushButton_close_clicked();
|
|
void on_pushButton_open_clicked();
|
|
void on_pushButton_restart_clicked();
|
|
void on_pushButton_refresh_clicked();
|
|
|
|
void slotNetMgr(QString sAddr,const QVariant& msg);
|
|
};
|
|
|
|
#endif // CHANNELLIST_H
|