geopro/src/app/VolumeParamsDialog.hpp

54 lines
2.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <QDialog>
#include <QString>
#include <QStringList>
#include <QVector>
#include <vector>
#include "repo/RepoTypes.hpp" // StructNode
#include "repo/VolumeBuildParams.hpp"
class QLineEdit;
class QComboBox;
class QDoubleSpinBox;
class QTreeWidget;
namespace geopro::app {
// 源数据集参与生成id + 显示名 + 结构归属structParentId用于在左侧树里挂到其 GS/TM 下)。
struct VolumeSourceItem {
QString id;
QString name;
QString structParentId;
};
// 「生成三维体」对话框spec §7/§8左侧·源数据集**树**(项目/GS/TM/ds可勾选/取消);
// 右侧·参数(名称 + 生成位置**树**[GS/项目根/TM 层级单选] + 插值模型 + cellXY/cellZ/power/maxDist
class VolumeParamsDialog : public QDialog {
Q_OBJECT
public:
// sources参与生成的源 ds含结构归属structure项目结构(GS/TM),左右两树共用;
// defaultMountId默认选中的生成位置 id空=选首个)。
VolumeParamsDialog(const QVector<VolumeSourceItem>& sources,
const std::vector<geopro::data::StructNode>& structure,
const QString& defaultMountId, QWidget* parent = nullptr);
QString volumeName() const;
geopro::data::VolumeBuildParams params() const;
QStringList sourceDatasetIds() const; // 左侧树最终勾选的源 ds id
QString mountTargetId() const; // 生成位置 idstructParentId
int mountConfType() const; // 生成位置 confType1=GS/项目根 2=TM
private:
QLineEdit* name_ = nullptr;
QComboBox* model_ = nullptr;
QDoubleSpinBox* cellXY_ = nullptr;
QDoubleSpinBox* cellZ_ = nullptr;
QDoubleSpinBox* power_ = nullptr;
QDoubleSpinBox* maxDist_ = nullptr;
QTreeWidget* sourceTree_ = nullptr; // 左:源数据集树(可勾选)
QComboBox* mount_ = nullptr; // 右:生成位置下拉(下拉面板是 GS/项目根/TM 层级树)
};
} // namespace geopro::app