2025-03-17 13:44:44 +08:00
|
|
|
|
#ifndef CONFIGWIDGET_H
|
2025-03-14 17:05:48 +08:00
|
|
|
|
#define CONFIGWIDGET_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
#include <QTableWidget>
|
|
|
|
|
|
#include <CXmlOpt.h>
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigWidget : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit ConfigWidget(QWidget *parent = nullptr);
|
|
|
|
|
|
~ConfigWidget();
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
void sigSave(const QString &modify, const QString &del);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void initWidget();
|
|
|
|
|
|
void initGroup();
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
void hmiSwitchOpt();
|
|
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void slotGroupCombChange(const QString &text);
|
|
|
|
|
|
void slotGroupManageClick();
|
|
|
|
|
|
void slotAddClick();
|
|
|
|
|
|
void slotDelClick();
|
|
|
|
|
|
void slotMoveUpClick();
|
|
|
|
|
|
void slotMoveDownClick();
|
|
|
|
|
|
void slotSaveClick();
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void contextMenuEvent(QContextMenuEvent *event);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
QString getEnableDesc(int enable);
|
|
|
|
|
|
void showInfo(const QString &info);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
QComboBox * m_GroupComb;
|
|
|
|
|
|
QPushButton * m_GroupManage;
|
|
|
|
|
|
QPushButton * m_Add;
|
|
|
|
|
|
QPushButton * m_Del;
|
|
|
|
|
|
QPushButton * m_MoveUp;
|
|
|
|
|
|
QPushButton * m_MoveDown;
|
|
|
|
|
|
QPushButton * m_Save;
|
|
|
|
|
|
QTableWidget *m_TableWidget;
|
|
|
|
|
|
QStringList m_GroupList;
|
|
|
|
|
|
QMap<QString, QList<SGraph> > m_hmiRollMap;
|
|
|
|
|
|
QMap<int, QPair<QString, int>> m_screenMap;
|
|
|
|
|
|
QMap<int, int> m_autoTimeMap;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CONFIGWIDGET_H
|