47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
#pragma once
|
||
#include <QFrame>
|
||
|
||
#include "AxesSettingsDialog.hpp" // AxisRange
|
||
|
||
class QCheckBox;
|
||
class QComboBox;
|
||
class QDoubleSpinBox;
|
||
class QVBoxLayout;
|
||
class QSlider;
|
||
class QLabel;
|
||
|
||
namespace geopro::app {
|
||
|
||
// 坐标轴设置抽屉面板(原型):工具条右侧滑出、非模态。
|
||
// 内容:坐标轴单位(米/英尺) → X/Y/Z 三轴(显示开关 + 最小值/最大值) → 放大系数(0.1/0.5/1/2/5) → 取消/应用。
|
||
class AxesSettingsPanel : public QFrame {
|
||
Q_OBJECT
|
||
public:
|
||
explicit AxesSettingsPanel(QWidget* parent = nullptr);
|
||
|
||
// 打开前回灌当前值(单位 0=米/1=英尺;scale=放大系数=垂直夸张)。
|
||
void setValues(AxisRange x, AxisRange y, AxisRange z, int unitIdx, double scale);
|
||
|
||
signals:
|
||
// 「应用」:仅坐标轴(显示方式/单位/per-axis 可见性·范围);走增量重建,不重绘数据。
|
||
void applied(AxisRange x, AxisRange y, AxisRange z, int unitIdx);
|
||
// 放大系数(=垂直夸张)滑块:拖动实时改数值标签,松手才发此信号触发一次重建。
|
||
void verticalExaggerationChanged(double ve);
|
||
void closed(); // × 或 取消
|
||
|
||
private:
|
||
struct Row {
|
||
QCheckBox* show = nullptr;
|
||
QDoubleSpinBox* lo = nullptr;
|
||
QDoubleSpinBox* hi = nullptr;
|
||
};
|
||
Row addAxisRow(QVBoxLayout* col, const QString& title, const AxisRange& def);
|
||
|
||
QComboBox* unit_ = nullptr; // 坐标轴单位:米 / 英尺
|
||
QSlider* scaleSlider_ = nullptr; // 放大系数(=垂直夸张)滑块 1~10×
|
||
QLabel* scaleLabel_ = nullptr; // 滑块当前值标签(如「3.0×」)
|
||
Row x_, y_, z_;
|
||
};
|
||
|
||
} // namespace geopro::app
|