#ifndef NMWXGEOMETRYLAYERDLG_H #define NMWXGEOMETRYLAYERDLG_H #include #include #include "nmSubWxs_global.h" #include "nmDataLayer.h" class QLineEdit; class QVBoxLayout; class QComboBox; class QTreeWidget; class QTableWidget; class QTreeWidgetItem; class QCheckBox; class nmDataReservoir; class NM_SUB_WXS_EXPORT nmWxGeometryLayerDlg : public QDialog { Q_OBJECT public: nmWxGeometryLayerDlg(); // 获取编辑后的数据 QVector getLayerData() const; private: void initUI(); QTreeWidgetItem* createLayer(int index, const QString& layerName); void updateLayers(); void updateLayerData(int index); QColor getLayerColor(int index); void initLayers(); void configureLayerItems(int layerIndex, QTreeWidgetItem* layerItem); void handleInsertTop(int state, QTreeWidgetItem* layer); void handleInsertBottom(int state, QTreeWidgetItem* layer); QComboBox* createComboBox(const QString& defaultText); private slots: void onItemChanged(QTreeWidgetItem* item, int column); void onLayersComboBoxChanged(int index); void onGeometryComboBoxChanged(int index); void onLayerCheckBoxStateChanged(int state); void onResetButtonClicked(); private: QVector m_layerData; QVBoxLayout* mainLayout; QComboBox* layersComboBox; QComboBox* geometryComboBox; QComboBox* unitComboBox; QTreeWidget* treeWidget; QTableWidget* tableWidget; nmDataReservoir* m_pReservoir; }; #endif // NMWXGEOMETRYLAYERDLG_H