#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; } modelType selectedMeta() const { return m_selectedMeta; } private: QListView* m_listView; QString m_selectedComponent; modelType m_selectedMeta; QDialogButtonBox* m_buttonBox; SelectorDialogType m_dlgType; void setupUI(); void setupConnections(); QStandardItemModel * initialModel(); private: QList getMetaList() const; }; #endif //SELECTORDIALOG_H