You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.8 KiB
C++
96 lines
2.8 KiB
C++
#ifndef _H_QSYSTEMSETTINGUI_H_
|
|
#define _H_QSYSTEMSETTINGUI_H_
|
|
|
|
#include <QWidget>
|
|
#include "ui_QSystemSettingUI.h"
|
|
#include "QDiskCleanThread.h"
|
|
#include <QSettings.h>
|
|
#include <QPushButton>
|
|
#include <QComboBox>
|
|
|
|
class QSystemSettingDlg : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QSystemSettingDlg(QWidget *parent = Q_NULLPTR);
|
|
~QSystemSettingDlg();
|
|
|
|
void onShowWidget(int level);
|
|
signals:
|
|
void sgChangeLanguage(QString strLanguage);
|
|
void sgChangePLCParam();
|
|
void sgParamChange();
|
|
private:
|
|
bool InitTreeWidget(QTreeWidget* pTreewidget);
|
|
void addComRoot(class QTreeWidget *pTreewidget, QString strName /*= QString()*/);
|
|
QStringList getDirNames(QString strPath);
|
|
void addPicRoot(QTreeWidget *pTreewidget, QString strName);
|
|
void addPLCRoot(QTreeWidget *pTreewidget, QString strName);
|
|
void addLightRoot(QTreeWidget *pTreewidget, QString strName);
|
|
void addSuperRoot(class QTreeWidget *pTreewidget, QString strName);
|
|
void HidPLCUI(bool nflag);
|
|
void HidDevelopUI(bool nflag);
|
|
void InitDebugTree(void);
|
|
|
|
void readSettingFile();
|
|
void writeSettingFile();
|
|
|
|
Q_SLOT void onChangeBG();
|
|
Q_SLOT void onTreeWidgetButton();
|
|
Q_SLOT void oncurrentChanged(const QString &str);
|
|
Q_SLOT void onChangeBackground();
|
|
Q_SLOT void onOpenDataPath();
|
|
Q_SLOT void onLightTest();
|
|
Q_SLOT void onCheckstateChanged(int state);
|
|
Q_SLOT void onSetCurrentIndex(int nIndex);
|
|
Q_SLOT void onSavePLCPara();
|
|
|
|
void showTipInfo();
|
|
protected:
|
|
virtual void showEvent(QShowEvent *event);
|
|
virtual void timerEvent(QTimerEvent *event);
|
|
private:
|
|
Ui::QSystemSettingUI ui;
|
|
QList<QObject*> m_listObj;
|
|
QMap<QString, class QTreeWidgetItem*> m_TreeItemMap;
|
|
|
|
class QComboBox *m_Language{ nullptr };
|
|
//debug
|
|
class QComboBox *m_pCameraTrgType{ nullptr };
|
|
class QSpinBox *m_pCameraTrgTimes{ nullptr };
|
|
class QComboBox *m_pDebugModel{ nullptr };
|
|
class QComboBox *m_pSystype{ nullptr };
|
|
|
|
QList<class QTreeWidgetItem *> developitems;
|
|
QList<class QTreeWidgetItem *> comitems;
|
|
QList<class QTreeWidgetItem *> camitems;
|
|
QList<class QTreeWidgetItem *> picitems;
|
|
QList<class QTreeWidgetItem *> PLCitems;
|
|
QList<class QTreeWidgetItem *> lightitems;
|
|
|
|
class QSpinBox *m_PLCTrigerFilter{ nullptr };
|
|
class QSpinBox *m_PLCCameraDelay{ nullptr };
|
|
class QSpinBox *m_PLCCameraPulse{ nullptr };
|
|
class QSpinBox *m_PLCLightDelay{ nullptr };
|
|
class QSpinBox *m_PLCResHoldTime{ nullptr };
|
|
class QComboBox *m_PLCTrigerType{ nullptr };
|
|
class QSpinBox *m_PLC_RestartSeverCount{ nullptr };
|
|
|
|
// class QSpinBox *m_Algthreshold{ nullptr };
|
|
class QSpinBox *m_AlgFilterSize{ nullptr };
|
|
|
|
QStringList m_listwidgetItemStr;
|
|
QDiskCleanThread *pDiskCleanThread{ nullptr };
|
|
QSettings *m_setting{ nullptr };
|
|
int nCheckDays{ 7 };
|
|
bool nCheckThreadEable{ false };
|
|
|
|
class QLabel* m_pLbShowPath{ nullptr };
|
|
|
|
|
|
int m_timerID{ 0 };
|
|
};
|
|
|
|
#endif
|