#pragma once #include #include "ui_ShowTemperaturePage.h" #include 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 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 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 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; };