#ifndef SETTINGUIDEVMNG_H #define SETTINGUIDEVMNG_H #include #include "UiTools.h" class settingUiDevMng : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_SHOW_IP, DEV_MNG_SHOW_ID_VER, DEV_MNG_SET_VOLUMN, DEV_MNG_SET_BRIGHTNESS, DEV_MNG_SCREENSAVER, DEV_MNG_SCREENOFF, DEV_MNG_SET_TIME, //DEV_MNG_SET_NETWORK, DEV_MNG_BLUETOOTH, DEV_MNG_OPEN_DYNAMICFEATURE,//动态底库 DEV_MNG_PASSWORD, DEV_MNG_DEV_SETTING_DISABLE }DEV_MNG_E; static int m_pageIndex; explicit settingUiDevMng(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMng(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); private: }; class settingUiDevMngTime : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_TIME_NTP_SW, DEV_MNG_TIME_NTP_SERVER, DEV_MNG_TIME_NTP_INTERVAL, DEV_MNG_TIME_NTP_TIME_ZONE, DEV_MNG_TIME_MANUAL }DEV_MNG_TIME_E; static int m_pageIndex; explicit settingUiDevMngTime(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngTime(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); void slotShowProcessing(); private: const QVector TimeZone = {tr("UTC-11太平洋/中途岛"), tr("UTC-9:30太平洋/马克萨斯"), tr("UTC-9美国/安克雷奇"), tr("UTC-8美国/道森"), tr("UTC-7美国/博伊西"), tr("UTC-6美国/巴伊亚州_班德拉斯"), tr("UTC-5美国/多伦多"), tr("UTC-4美国/安圭拉"), tr("UTC-3:30美国/圣约翰斯"), tr("UTC-3美国/阿拉瓜那"), tr("UTC-2美国/诺罗尼亚"), tr("UTC-1美国/斯科比斯松"), tr("UTC+0欧洲/里斯本/伦敦"), tr("UTC+1欧洲/阿姆斯特丹"), tr("UTC+2亚洲/大马士革"), tr("UTC+3亚洲/科威特"), tr("UTC+3:30亚洲/德黑兰"), tr("UTC+4印度/毛里求斯"), tr("UTC+4:30亚洲/喀布尔"), tr("UTC+5印度/马尔代夫"), tr("UTC+5:30亚洲/科伦坡"), tr("UTC+5:45亚洲/加德满都"), tr("UTC+6印度/查戈斯"), tr("UTC+6:30亚洲/仰光"), tr("UTC+7亚洲/曼谷"), tr("UTC+8亚洲/北京/台北"), tr("UTC+8:45澳大利亚/尤克拉"), tr("UTC+9亚洲/首尔/东京"), tr("UTC+9:30澳大利亚/达尔文"), tr("UTC+10澳大利亚/墨尔本"), tr("UTC+10:30澳大利亚/领主豪"), tr("UTC+11太平洋/瓜达尔卡纳尔岛"), tr("UTC+12太平洋/奥克兰"), tr("UTC+12:45太平洋/查塔姆"), tr("UTC+13太平洋/阿皮亚"), tr("UTC+14太平洋/基里蒂马蒂)") }; const QVector TimeZoneSet = {"Pacific/Midway", "Pacific/Marquesas", "America/Anchorage", "America/Dawson", "America/Boise", "America/Bahia_Banderas", "America/Toronto", "America/Anguilla", "America/St_Johns", "America/Araguaina", "America/Noronha", "America/Scoresbysund", "right/Europe/London", "right/Europe/Amsterdam", "Asia/Damascus", "Asia/Kuwait", "Asia/Tehran", "Indian/Mauritius", "Asia/Kabul", "Indian/Maldives", "Asia/Colombo", "Asia/Kathmandu", "Indian/Chagos", "Asia/Rangoon", "Asia/Bangkok", "Asia/Shanghai", "Australia/Eucla", "Asia/Tokyo", "Australia/Darwin", "Australia/Melbourne", "Australia/Lord_Howe", "Pacific/Guadalcanal", "Pacific/Auckland", "Pacific/Chatham", "Pacific/Apia", "Pacific/Kiritimati"}; MsgDialog* m_msgDlg; void ntpTimeCorrect(); }; class settingUiDevMngNetwork : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_NETWORK_WIRE, DEV_MNG_NETWORK_WIFI, DEV_MNG_NETWORK_4G }DEV_MNG_WIRE_NET_E; static int m_pageIndex; explicit settingUiDevMngNetwork(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngNetwork(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); private: }; class settingUiDevMngNetWire : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_NET_WIRE_SW, DEV_MNG_NET_WIRE_DHCP, DEV_MNG_NET_WIRE_MAN_CFG, DEV_MNG_NET_WIRE_IP, DEV_MNG_NET_WIRE_MASK, DEV_MNG_NET_WIRE_GW, DEV_MNG_NET_WIRE_DNS }DEV_MNG_WIRE_NET_E; static int m_pageIndex; explicit settingUiDevMngNetWire(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngNetWire(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); private: bool setStaticNetworkPara(const stNetWire& curNetCfg); }; class settingUiDevMngNetWifi : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_NET_WIFI_SW, DEV_MNG_NET_AP_SW, DEV_MNG_NET_WIFI_ASSIGN, DEV_MNG_NET_WIFI_SEARCH, DEV_MNG_NET_AP_PWD, DEV_MNG_NET_BUTT }DEV_MNG_NET_WIFI_E; static int m_pageIndex; explicit settingUiDevMngNetWifi(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngNetWifi(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); void slotUpdateConnectionStatus(QString ssid, bool connected); private: void clearSsidList(); void wifiSearch(); const int m_ssidPosIndex = DEV_MNG_NET_BUTT; }; class settingUiDevMngNetWifiAccPoint : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_NET_WIFI_AP_CONNECT, DEV_MNG_NET_WIFI_AP_FORGET, DEV_MNG_NET_WIFI_AP_DHCP, DEV_MNG_NET_WIFI_AP_MAN_CFG, DEV_MNG_NET_WIFI_AP_IP, DEV_MNG_NET_WIFI_AP_MASK, DEV_MNG_NET_WIFI_AP_GW, DEV_MNG_NET_WIFI_AP_DNS }DEV_MNG_NET_WIFI_E; static int m_pageIndex; explicit settingUiDevMngNetWifiAccPoint(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngNetWifiAccPoint(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: void signalUpdateConnectionStatus(QString ssid, bool connected); void signalReturn(); public slots: void slotItemClicked(QListWidgetItem*); private: bool setStaticNetworkPara(const stNetWifi& curNetCfg); }; class settingUiDevMngNet4G : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_NET_4G_SW, DEV_MNG_NET_4G_PROVIDER, DEV_MNG_NET_4G_REBOOT }DEV_MNG_NET_WIFI_E; static int m_pageIndex; explicit settingUiDevMngNet4G(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngNet4G(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); private: const QVector net4GProvider{ tr("未插卡"),tr("中国移动"),tr("中国电信"),tr("中国联通"),tr("4G启动中...") }; }; class settingUiDevMngBt : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_BT_ENABLE, DEV_MNG_BT_SPK, DEV_MNG_BT_LOCK }DEV_MNG_BT_E; static int m_pageIndex; explicit settingUiDevMngBt(int pageIndex, QWidget *parent = nullptr); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem*); private: }; class settingUiDevMngBtSpk : public SettingUiPage { Q_OBJECT public: typedef enum { //DEV_MNG_BULETOOTH_ENABLE, DEV_MNG_BULETOOTH_DEVNAME, DEV_MNG_BULETOOTH_HISTORY_DEV, DEV_MNG_BULETOOTH_AVAILABLE_DEV, }DEV_MNG_BULETOOTH_E; static int m_pageIndex; explicit settingUiDevMngBtSpk(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngBtSpk(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); private: void clearPaireItem(); void clearAvailItem(); void addPairedItem(BluetoothDev_t &btDev); void addPairedItem(BtListWidget *pBtListWidget); void addPairedItem(list &btDevList); void addAvailItem(BluetoothDev_t &btDev); void addAvailItem(BtListWidget *pBtListWidget); void addAvailItem(list &btDevList); int deletePairedItem(int row); int deleteAvaidItem(int row); void resetPaireItem(list &btDevList); void resetAvailItem(list &btDevList); signals: void signalClickSet(BluetoothDev_t btDevInfo); public slots: void slotItemClicked(QListWidgetItem*); void slotBtDevSet(BluetoothDev_t btDevInfo); private: int m_pairedItemCnt = 0; int m_availdItemCnt = 0; #if 1 string m_btDevName; bool m_btIsEnable; //list m_btPairedList; //list m_btAvailList; #endif }; class settingUiDevMngBtSpkAccPoint : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_BULETOOTH_ACCPOINTE_RENAME, DEV_MNG_BULETOOTH_ACCPOINTE_CANCLE }DEV_MNG_BULETOOTH_ACCPOINTE_E; static int m_pageIndex; explicit settingUiDevMngBtSpkAccPoint(int pageIndex, QWidget *parent = nullptr); ~settingUiDevMngBtSpkAccPoint(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: void signalReturn(); public slots: void slotItemClicked(QListWidgetItem*); void setAccPointInfo(const BluetoothDev_t &rBlueDev); private: BluetoothDev_t m_btDev; }; class settingUiDevMngBtLock : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_BT_LOCK_ENABLE, DEV_MNG_BT_LOCK_ADD, DEV_MNG_BT_LOCK_BUTT }DEV_MNG_BT_LOCK_E; static int m_pageIndex; explicit settingUiDevMngBtLock(int pageIndex, QWidget *parent = nullptr); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: void signalCurrentLock(const QString& lock); public slots: void slotItemClicked(QListWidgetItem*); void slotRefresh(); private: void clearBtLockList(); void addBtLock(const QString& position); void showBtLockList(const BtDoorLock& cfg); }; class settingUiDevMngBtLockAccPoint : public SettingUiPage { Q_OBJECT public: typedef enum { DEV_MNG_BT_LOCK_INFO, DEV_MNG_BT_LOCK_BATTERY, DEV_MNG_BT_LOCK_DELETE, DEV_MNG_BT_LOCK_BUTT }DEV_MNG_BT_LOCK_E; static int m_pageIndex; explicit settingUiDevMngBtLockAccPoint(int pageIndex, QWidget *parent = nullptr); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: void signalUpdataTitle(const QString& title); void signalRefresh(); public slots: void slotItemClicked(QListWidgetItem*); void slotCurrentLock(const QString& lock); private: int m_manufacturer; QString m_position; QString m_mac; void getRemainingBatPwr(); }; #endif // SETTINGUIDEVMNG_H