#ifndef PROJECTLISTWIDGET_H #define PROJECTLISTWIDGET_H #include class PushButton; class ToolButton; class LineEdit; class TreeWidget; 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(); private slots: void slotItemDoubleClicked(QListWidgetItem *item); void slotItemClicked(QListWidgetItem *item); void slotCurrentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); void slotCurrentRowChanged(int currentRow); void slotItemSelectionChanged(); signals: private: QVBoxLayout *m_vBoxLayout = nullptr; // QListWidget *m_listWidget = nullptr; TreeWidget *m_treeWidget = nullptr; }; #endif // PROJECTLISTWIDGET_H