#ifndef CHANNELLIST_H #define CHANNELLIST_H #include #include //数据模型类 #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); 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; 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_refresh_clicked(); }; #endif // CHANNELLIST_H