TCBondWnd.cpp 765 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include "TCBondWnd.h"
  2. TCBondWnd::TCBondWnd(QWidget *parent)
  3. : QWidget(parent)
  4. {
  5. ui.setupUi(this);
  6. Init();
  7. }
  8. TCBondWnd::~TCBondWnd()
  9. {}
  10. void TCBondWnd::Init()
  11. {
  12. m_manageDB = ns_db::CManageDB::GetInstance();
  13. if (m_pProduct == nullptr)
  14. {
  15. return;
  16. }
  17. m_pProduct = m_manageDB->GetCProduct();
  18. if (m_pProduct == nullptr)
  19. {
  20. return;
  21. }
  22. /**»ñÈ¡Êý¾Ý¿â
  23. */
  24. std::vector<ns_db::TEMPERATURE_LIST_STRUCT> vecTemperatureList = m_pProduct->GetAllTemperatureList();
  25. int nSize = vecTemperatureList.size();
  26. for (int i = 0; i < nSize; i++)
  27. {
  28. ui.tempComboBox->addItem(QString::number(i + 1));
  29. }
  30. }
  31. void TCBondWnd::SetCurrentSelect(int nIndex)
  32. {
  33. //m_pProduct->GetTemperatureList();
  34. }