ConfigSchemeDataWidget.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef CONFIGSCHEMEDATAWIDGET_H
  2. #define CONFIGSCHEMEDATAWIDGET_H
  3. #include <QWidget>
  4. #include "SchemePlanManager.h"
  5. class SchemaEval;
  6. class QPushButton;
  7. class QVBoxLayout;
  8. class QHBoxLayout;
  9. class QLabel;
  10. class QListWidget;
  11. class QTextEdit;
  12. class ConfigSchemeDataWidget : public QWidget
  13. {
  14. Q_OBJECT
  15. public:
  16. explicit ConfigSchemeDataWidget(QWidget *parent = nullptr);
  17. void setProcess(SchemePlanManager::SchemeProcessInfo process);
  18. void loadData();
  19. QList<SchemaEval *> schemeList() const;
  20. void selectFirst();
  21. void selectLast();
  22. signals:
  23. void sigAddScheme();
  24. void sigDeleteScheme();
  25. private:
  26. void initWidget();
  27. void initLayout();
  28. void connectSignalsAndSlots();
  29. void refreshList();
  30. void clearInfo();
  31. virtual void resizeEvent(QResizeEvent *event) override;
  32. virtual void showEvent(QShowEvent *event) override;
  33. private slots:
  34. void slotAddDataClicked();
  35. void slotSelectedChanged();
  36. void slotRemoveDataClicked(int index);
  37. private:
  38. SchemePlanManager::SchemeProcessInfo m_process;
  39. QList<SchemaEval *> m_schemeList;
  40. QVBoxLayout *m_layout = nullptr;
  41. QHBoxLayout *m_headerLayout = nullptr;
  42. QLabel *m_titleLabel = nullptr;
  43. QLabel *m_listTitleLabel = nullptr;
  44. QLabel *m_tipsLabel = nullptr;
  45. QPushButton *m_addButton = nullptr;
  46. QListWidget *m_listWidget = nullptr;
  47. QTextEdit *m_remark = nullptr;
  48. QLabel *m_pic = nullptr;
  49. };
  50. #endif // CONFIGSCHEMEDATAWIDGET_H