ConfigMeasureDataWidget.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef CONFIGMEASUREDATAWIDGET_H
  2. #define CONFIGMEASUREDATAWIDGET_H
  3. #include <QWidget>
  4. #include "SchemePlanManager.h"
  5. #include <QMap>
  6. class NodeMatrixInfo;
  7. class QPushButton;
  8. class QVBoxLayout;
  9. class QHBoxLayout;
  10. class QLabel;
  11. class QListWidget;
  12. class ConfigMeasureDataWidget : public QWidget
  13. {
  14. Q_OBJECT
  15. public:
  16. explicit ConfigMeasureDataWidget(QWidget *parent = nullptr);
  17. void setProcess(SchemePlanManager::SchemeProcessInfo process);
  18. void reloadData();
  19. void selectFirst();
  20. void selectLast();
  21. QList<NodeMatrixInfo *> selectedData();
  22. void updateNodeValue(NodeMatrixInfo *node);
  23. signals:
  24. void sigAddData();
  25. void sigCurrentRowChanged();
  26. private:
  27. void initWidget();
  28. void initLayout();
  29. void connectSignalsAndSlots();
  30. void refreshList();
  31. private slots:
  32. void slotAddDataClicked();
  33. void slotRemoveDataClicked(int index);
  34. void slotCurrentRowChanged();
  35. private:
  36. SchemePlanManager::SchemeProcessInfo m_process;
  37. QVBoxLayout *m_layout = nullptr;
  38. QHBoxLayout *m_headerLayout = nullptr;
  39. QLabel *m_titleLabel = nullptr;
  40. QLabel *m_listTitleLabel = nullptr;
  41. QLabel *m_tipsLabel = nullptr;
  42. QPushButton *m_addButton = nullptr;
  43. QListWidget *m_listWidget = nullptr;
  44. QList<QString> m_uuidList; // 一组实测数据的公共唯一id
  45. QMap<QString, QList<NodeMatrixInfo *>> m_nodeData; // 按组归类的实测数据
  46. };
  47. #endif // CONFIGMEASUREDATAWIDGET_H