|
|
|
|
|
#ifndef NMWXGEOMETRYLAYERDLG_H
|
|
|
|
|
|
#define NMWXGEOMETRYLAYERDLG_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
#include <QColor>
|
|
|
|
|
|
#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();
|
|
|
|
|
|
|
|
|
|
|
|
// <20><>ȡ<EFBFBD>༭<EFBFBD><E0BCAD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
QVector<nmDataLayer*> 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<nmDataLayer*> m_layerData;
|
|
|
|
|
|
QVBoxLayout* mainLayout;
|
|
|
|
|
|
QComboBox* layersComboBox;
|
|
|
|
|
|
QComboBox* geometryComboBox;
|
|
|
|
|
|
QComboBox* unitComboBox;
|
|
|
|
|
|
QTreeWidget* treeWidget;
|
|
|
|
|
|
QTableWidget* tableWidget;
|
|
|
|
|
|
|
|
|
|
|
|
nmDataReservoir* m_pReservoir;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // NMWXGEOMETRYLAYERDLG_H
|