#ifndef _VALUEMAINUI_H_ #define _VALUEMAINUI_H_ #include #include "ui_valueMainUI.h" #include "webClient.h" #include #include "RoiImgViewer.h" #include "lpConfigUI.h" #include "lpDebugUI.h" #include #include #include class valueMainUI : public QMainWindow { Q_OBJECT public: valueMainUI(QWidget *parent = Q_NULLPTR); ~valueMainUI(); QString SecondTimeString(quint64 value); Q_SLOT void onRecvDataStr_A(QString str); Q_SLOT void onRecvDataStr_B(QString str); void onConnectA(); void onConnectB(); void sendData(); Q_SLOT void onButtonClicked(); QJsonObject byte2Json(QByteArray data); QByteArray Json2byte(QJsonObject obj); Q_SLOT void onDebugClicked(int nID); Q_SLOT void onConnected_A(bool bFalg); Q_SLOT void onConnected_B(bool bFalg); void check(); void onRunApp(QString strPath); Q_SLOT void onStartProcess(); Q_SLOT void onStopProcess(); private://trayIcon void setupTrayIcon(); Q_SLOT void onActivated(QSystemTrayIcon::ActivationReason reason); void setMainWindowVisibility(bool state); Q_SLOT void onQuitApplication(); Q_SLOT void onImageScale(qreal real); protected: virtual void timerEvent(QTimerEvent *event); virtual void closeEvent(QCloseEvent *event); private: Ui::valueMainUIClass ui; RoiImgViewer *m_ImgViewer_A{ nullptr };//展示检测图像 RoiImgViewer *m_ImgViewer_B{ nullptr };//展示检测图像 QLabel* m_pLabelA{ nullptr }; QLabel* m_pLabelB{ nullptr }; QLabel* m_pLabelSystem{ nullptr }; private: webClient *m_pClient_A{ nullptr }; QThread m_task_A; webClient *m_pClient_B{ nullptr }; QThread m_task_B; int m_timer{ 0 }; int m_timerStartID{ 0 }; lpConfigUI *m_pConfigUI{ nullptr }; lpDebugUI *m_pDebugUI{ nullptr }; int m_CoutA{ 0 }; int m_CoutB{ 0 }; bool m_bServerA{ false }; bool m_bServerB{ false }; int m_SysTimerID{ 0 }; quint64 m_tickCount{ 0 }; QStringList m_appNames;//从机app名 private: QSystemTrayIcon* m_trayIcon{ nullptr }; QMenu* m_trayIconMenu{ nullptr }; QAction* m_restoreAction{ nullptr }; QAction* m_quitAction{ nullptr }; bool m_bExit{ false }; }; #endif