#ifndef _H_QSYSTEMSETTINGUI_H_ #define _H_QSYSTEMSETTINGUI_H_ #include #include "ui_QSystemSettingUI.h" #include "QDiskCleanThread.h" #include #include #include 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); virtual void changeEvent(QEvent *event); private: Ui::QSystemSettingUI ui; QList m_listObj; QMap 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 developitems; QList comitems; QList camitems; QList picitems; QList PLCitems; QList 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