ProjectStateWidget.h 764 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef PROJECTSTATEWIDGET_H
  2. #define PROJECTSTATEWIDGET_H
  3. #include <QWidget>
  4. class ProjectInfo;
  5. class QTableWidget;
  6. class QVBoxLayout;
  7. class QTableWidgetItem;
  8. ///
  9. /// \brief The ProjectStateWidget class
  10. /// 工程评估状态表
  11. class ProjectStateWidget : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit ProjectStateWidget(QWidget *parent = nullptr);
  16. void showProjects(const QList<ProjectInfo *> &list);
  17. signals:
  18. private:
  19. void initialize();
  20. void initLayout();
  21. void setRowCount(const QList<ProjectInfo *> &list);
  22. void setItem(int row, int column, QTableWidgetItem *item, const QColor &bgColor);
  23. private:
  24. QVBoxLayout *m_vBoxLayout = nullptr;
  25. QTableWidget *m_projTableWidget = nullptr;
  26. };
  27. #endif // PROJECTSTATEWIDGET_H