123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef PROJECTLISTWIDGET_H
- #define PROJECTLISTWIDGET_H
- #include <QWidget>
- class PushButton;
- class ToolButton;
- class LineEdit;
- class QVBoxLayout;
- class QHBoxLayout;
- class QLabel;
- class QListWidget;
- class QListWidgetItem;
- class ProjectListItemWidget : public QWidget
- {
- Q_OBJECT
- public:
- explicit ProjectListItemWidget(QWidget *parent = nullptr);
- void initialize();
- void initLayout();
- void setIndex(int index);
- int index() const;
- void setName(const QString name);
- const QString name() const;
- private:
- int m_index;
- QString m_name;
- QHBoxLayout *m_hBoxLayout = nullptr;
- QVBoxLayout *m_vBoxLayout = nullptr;
- QLabel *m_indexLabel = nullptr;
- QLabel *m_nameLabel = nullptr;
- QLabel *m_typeLabel1 = nullptr;
- QLabel *m_typeLabel2 = nullptr;
- };
- /// 工程列表
- class ProjectListWidget : public QWidget
- {
- Q_OBJECT
- public:
- explicit ProjectListWidget(QWidget *parent = nullptr);
- void refreshList();
- private:
- void initialize();
- void initLayout();
- void connectSiganlsAndSlots();
- void setProjButtonsEnabled(bool enabled);
- signals:
- private:
- QVBoxLayout *m_vBoxLayout = nullptr;
- QHBoxLayout *m_buttonLayout = nullptr;
- LineEdit *m_searchLineEdit = nullptr;
- ToolButton *m_renameButton = nullptr;
- ToolButton *m_newProjButton = nullptr;
- ToolButton *m_deleteButton = nullptr;
- QListWidget *m_projListWidget = nullptr;
- };
- #endif // PROJECTLISTWIDGET_H
|