ShowTemperaturePage.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #pragma once
  2. #include <QWidget>
  3. #include "ui_ShowTemperaturePage.h"
  4. #include <CManageDB.h>
  5. class ShowTemperaturePage : public QWidget
  6. {
  7. Q_OBJECT
  8. public:
  9. ShowTemperaturePage(QWidget *parent = nullptr);
  10. ~ShowTemperaturePage();
  11. private:
  12. void Init();
  13. //void AddTemperList(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar, int nIndex);
  14. //void AddListNumberList(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar, int nIndex);
  15. template <typename Y>
  16. void AddListItem(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar,
  17. int nIndex,
  18. QListWidget* listWidget,
  19. const QSize& sizeHint);
  20. void UpTemperList(int nID);
  21. void DeleteSelectedItem(int nIndex, QListWidget* pListWidget = nullptr);
  22. QVector<int> findMissingNumbers(QListWidget* listWidget, int expectedMax);
  23. private slots:
  24. /**用于删除
  25. */
  26. void GetDelTemperatureListSlots(int iId, int iSerialNumber);
  27. /**用于添加
  28. */
  29. void GetAddTemperatureListSlots(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar);
  30. /**修改
  31. */
  32. void GetModifyTemperatureListSlots(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar);
  33. void on_idListComboBox_currentIndexChanged(int index);
  34. void on_addBut_clicked();
  35. void on_addValBut_clicked();
  36. private:
  37. Ui::ShowTemperaturePageClass ui;
  38. /**用于排序等等等
  39. */
  40. std::vector<ns_db::TEMPERATURE_LIST_STRUCT> m_vecTemperatureListPage;
  41. /**combox 是否初始化
  42. */
  43. bool m_nInit = false;
  44. bool m_isDel = false;
  45. int m_row = -1;
  46. ns_db::CManageDB* m_manageDB = nullptr;
  47. ns_db::CProduct* m_pProduct = nullptr;
  48. };