101 lines
2.5 KiB
C++
101 lines
2.5 KiB
C++
#ifndef CONFIGURATION_H
|
|
#define CONFIGURATION_H
|
|
|
|
#include <QWidget>
|
|
#include <QStandardItemModel> //数据模型类
|
|
#include <QTreeView>
|
|
#include "global.h"
|
|
#include "sqlitedb.h"
|
|
#include "ftpclient.h"
|
|
#include "NetMgr.h"
|
|
|
|
namespace Ui {
|
|
class CConfiguration;
|
|
}
|
|
|
|
class CConfiguration : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CConfiguration(QWidget *parent = nullptr);
|
|
~CConfiguration();
|
|
void Init();
|
|
|
|
private slots:
|
|
void on_treeView_Relay_customContextMenuRequested(const QPoint &pos);
|
|
void slotDeleteItem();
|
|
void slotModifyItem();
|
|
void on_pushButton_confirm_clicked();
|
|
|
|
void on_comboBox_WC_currentTextChanged2(const QString &arg1);
|
|
|
|
void on_pushButton_save_clicked();
|
|
|
|
void on_comboBox_WC_currentIndexChanged(const QString &arg1);
|
|
|
|
void on_radioButton_1_clicked();
|
|
|
|
void on_radioButton_2_clicked();
|
|
|
|
void on_radioButton_3_clicked();
|
|
|
|
void on_radioButton_4_clicked();
|
|
|
|
void on_radioButton_5_clicked();
|
|
|
|
void on_radioButton_6_clicked();
|
|
|
|
void on_radioButton_8_clicked();
|
|
|
|
void on_radioButton_7_clicked();
|
|
|
|
void on_radioButton_9_clicked();
|
|
|
|
void on_radioButton_10_clicked();
|
|
|
|
void slotNetMgr(QString sAddr,const QVariant& msg);
|
|
|
|
void on_treeView_Available_pressed(const QModelIndex &index);
|
|
|
|
|
|
void on_radioButton_12_clicked();
|
|
|
|
void on_radioButton_11_clicked();
|
|
|
|
private:
|
|
Ui::CConfiguration *ui;
|
|
|
|
QStandardItemModel *model_Available;
|
|
QStandardItemModel *model_Relay;
|
|
|
|
QVector<WorkCondition_t> m_WorkCondition;
|
|
QJsonObject createJsonFromTreeNode(QStandardItem *item);
|
|
void saveJsonToFile(const QJsonObject &jsonObject, const QString &filePath);
|
|
QJsonObject generateJsonFromTreeView(QTreeView *treeView);
|
|
QJsonArray GetItem(QStandardItem *item,int MinimumNumber = -1);
|
|
QJsonArray m_arrayAll;
|
|
QJsonArray m_array;
|
|
QJsonArray m_WorkConditionConfiguraitonsArray;
|
|
|
|
QJsonArray m_deleteInputArray;
|
|
QJsonArray m_deleteConfiguraitonsObj;
|
|
//QJsonArray m_ConfiguraitonsArray;
|
|
QJsonArray arrayTriggerConfig;
|
|
QJsonArray m_ConfiguraitonsArray;
|
|
QJsonObject m_ConfiguraitonsWCObj;
|
|
QVector<QJsonObject> m_vecWorkConditionObj;
|
|
QVector<QJsonObject> m_vecWorkConditionObj2;
|
|
|
|
|
|
void LoadConfiguration();
|
|
QJsonObject SelectChannel(int channelNo);
|
|
void ViewRelay(int ChannelNoInBoard);
|
|
void PushData();
|
|
void populateTree(QStandardItem *parentItem, const QJsonObject &jsonObject);
|
|
int m_isConfirm;
|
|
int m_curentRLY;
|
|
};
|
|
|
|
#endif // CONFIGURATION_H
|