123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #pragma once
- #include <QWidget>
- #include "ui_ShowTemperaturePage.h"
- #include <CManageDB.h>
- class ShowTemperaturePage : public QWidget
- {
- Q_OBJECT
- public:
- ShowTemperaturePage(QWidget *parent = nullptr);
- ~ShowTemperaturePage();
- private:
- void Init();
- //void AddTemperList(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar, int nIndex);
- //void AddListNumberList(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar, int nIndex);
- template <typename Y>
- void AddListItem(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar,
- int nIndex,
- QListWidget* listWidget,
- const QSize& sizeHint);
- void UpTemperList(int nID);
- void DeleteSelectedItem(int nIndex, QListWidget* pListWidget = nullptr);
- QVector<int> findMissingNumbers(QListWidget* listWidget, int expectedMax);
- private slots:
- /**用于删除
- */
- void GetDelTemperatureListSlots(int iId, int iSerialNumber);
- /**用于添加
- */
- void GetAddTemperatureListSlots(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar);
- /**修改
- */
- void GetModifyTemperatureListSlots(const ns_db::TEMPERATURE_LIST_STRUCT& temperaturePar);
- void on_idListComboBox_currentIndexChanged(int index);
- void on_addBut_clicked();
- void on_addValBut_clicked();
- private:
- Ui::ShowTemperaturePageClass ui;
- /**用于排序等等等
- */
- std::vector<ns_db::TEMPERATURE_LIST_STRUCT> m_vecTemperatureListPage;
- /**combox 是否初始化
- */
- bool m_nInit = false;
- bool m_isDel = false;
- int m_row = -1;
- ns_db::CManageDB* m_manageDB = nullptr;
- ns_db::CProduct* m_pProduct = nullptr;
- };
|