#ifndef SELECTORDIALOG_H #define SELECTORDIALOG_H #include #include #include #include #include "global.h" // 自定义元件选择对话框 class SelectorDialog : public QDialog { public: SelectorDialog(QWidget* parent = nullptr); void initial(SelectorDialogType tpe); QString selectedComponent() const { return m_selectedComponent; } private: QListView* m_listView; QString m_selectedComponent; QDialogButtonBox* m_buttonBox; SelectorDialogType m_dlgType; void setupUI(); void setupConnections(); QStandardItemModel * initialModel(); private: QStringList getMetaList() const; }; #endif //SELECTORDIALOG_H