1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef PROJECTVIEW_H
- #define PROJECTVIEW_H
- #include <QWidget>
- class ProjectInfo;
- class PushButton;
- class TreeWidget;
- class QVBoxLayout;
- class QHBoxLayout;
- class QLabel;
- /// 工程视图
- class ProjectView : public QWidget
- {
- Q_OBJECT
- public:
- explicit ProjectView(ProjectInfo *proj = nullptr, QWidget *parent = nullptr);
- void showEvent(QShowEvent *event) override;
- void hideEvent(QHideEvent *event) override;
- ProjectInfo *proj() const;
- signals:
- void sigClose();
- private:
- void initWidgets();
- void initLayout();
- void connectSigalsAndSlots();
- private:
- ProjectInfo *m_proj = nullptr;
- bool m_initilized = false;
- QVBoxLayout *m_layout = nullptr;
- QHBoxLayout *m_headerLayout = nullptr;
- QHBoxLayout *m_contentLayout = nullptr;
- QLabel *m_title = nullptr;
- PushButton *m_close = nullptr;
- TreeWidget *m_tree = nullptr;
- QWidget *m_contentSeperator = nullptr;
- };
- #endif // PROJECTVIEW_H
|