#ifndef SETTINGUIFACEMNG_H #define SETTINGUIFACEMNG_H #include #include "UiTools.h" #include "UiConfig.h" class settingUiFaceMng : public SettingUiPage { Q_OBJECT public: typedef enum { enFaceDb, enAccessRecord }enFaceMng; static int m_pageIndex; explicit settingUiFaceMng(int pageIndex, QWidget *parent = nullptr); ~settingUiFaceMng(); void setBackstageUiinterface(BackstageInterfaceForUi* interface); void reset(); signals: public slots: void slotItemClicked(QListWidgetItem* item); private: }; class FaceDbPage : public PersonMsgUiPage { Q_OBJECT public: static int m_pageIndex; explicit FaceDbPage(int pageIndex, QWidget *parent = nullptr); void reset(); void clickBtn_addPerson(); protected: signals: void signalShowPage(int, const QString title = ""); void signalPersonInfo(stQueryPersonInfo &personInfo); protected slots: void slotTextChanged(const QString& text); virtual void slotBtnClicked(); virtual void slotSliderReleased(); virtual void slotItemClicked(QListWidgetItem *item); void slot_freshPage(); private: void showFaceMsg(int pageIndex); private: stQueryPersonInfo m_person[5]; int m_lastPageIndex = 0; }; class AccessRecordPage : public PersonMsgUiPage { Q_OBJECT public: static int m_pageIndex; explicit AccessRecordPage(int pageIndex, QWidget *parent = nullptr); void reset(); protected: protected slots: void slotTextChanged(const QString& text); virtual void slotBtnClicked(); virtual void slotSliderReleased(); private: void showAccessRecordMsg(int pageIndex); }; class RegisterPersonPage : public MyWidgetWithMainStyleColor { Q_OBJECT public: typedef enum { PERSON_ITEM_PIC = 0, PERSON_ITEM_NAME, PERSON_ITEM_DEADLINE_CHOICE, PERSON_ITEM_DEADLINE, PERSON_ITEM_JOB_NUM, PERSON_ITEM_PHONE_NUM, PERSON_ITEM_ID_CARD, PERSON_ITEM_IC_CARD, }PERSON_ITEM_E; //static int m_pageIndex; explicit RegisterPersonPage(QWidget *parent = nullptr); //virtual void reset(); void clearPersonInfo(); void refreshUi(); signals: void signalShowPage(int, const QString title = ""); void signalReturn(); void signalChangePersonDB(); protected slots: virtual void slotItemClicked(QListWidgetItem *item); void slotDeadlineBtnClicked(int id); void slotSetPersonInfo(stQueryPersonInfo &personInfo); void slotSnapFace(std::string &feature, std::string &picPath); void slotIcCardResult(const QString& icCard); protected: QListWidget *m_listWidget; QWidget *m_picWidget; QLabel *m_picLabel; QWidget *m_deadlineChoiceWidget; QButtonGroup *m_deadlineBtnGrp; QRadioButton *m_durableBtn; QRadioButton *m_nondurableBtn; myListWidget *m_nameWidget; myListWidget *m_deadlineWidget; myListWidget *m_jobNumWidget; myListWidget *m_phoneNumWidget; myListWidget *m_idCardWidget; myListWidget *m_icCardWidget; QPushButton *m_bottomBtn; //bool m_isPicChange = false; //bool m_isPersonInfoChange = false; stQueryPersonInfo m_personInfo; std::string m_snapFeature; std::string m_snapPicPath; //dbspace::rwFeatInfo m_featInfo; //dbspace::rwPersonInfo m_personInfo; }; class AddPersonPage : public RegisterPersonPage { Q_OBJECT public: static int m_pageIndex; explicit AddPersonPage(int pageIndex, QWidget *parent = nullptr); void reset(); public slots: virtual void slotItemClicked(QListWidgetItem *item); void slotAddPerson(); }; class ModifyPersonPage : public RegisterPersonPage { Q_OBJECT public: static int m_pageIndex; explicit ModifyPersonPage(int pageIndex, QWidget *parent = nullptr); void reset(); void savePersonInfo(); public slots: void slotDelPerson(); }; class SnapFacePage : public WidgetWithBackstageInterface { Q_OBJECT public: static const QString BG_RES_FILE[UiConfig::SUPPORT_SCREEN_SIZE_QUANTITY]; static int m_pageIndex; explicit SnapFacePage(int pageIndex, QWidget *parent = nullptr); void reset(); signals: void signalReturn(); void signalSnapFace(std::string &feature, std::string &picPath); public slots: void slotSnapBtnClicked(); private: QPushButton *m_btn_snap; }; #endif // SETTINGUIFACEMNG_H