geopro/src/app/VtkViewToolbar.hpp

36 lines
1.2 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 <QWidget>
#include <vector>
#include "I3dSceneView.hpp" // geopro::controller::ViewDir
class QToolButton;
class QSlider;
class QLabel;
namespace geopro::app {
// VTK 画布竖排工具条spec §9全局视图控制——设置(坐标轴)/前后上下左右/放大缩小复位。
// 仅发信号,不认 VTK由 main 接到场景控制器。
class VtkViewToolbar : public QWidget {
Q_OBJECT
public:
explicit VtkViewToolbar(QWidget* parent = nullptr);
public slots:
// 二维分析激活时禁用不适用的工具6 向快捷视图会改相机朝向→破坏二维近俯视锁定,故二维下禁用;
// 缩放/适配/坐标轴设置(含 VE)仍可用。切回三维恢复。
void setAnalysisMode2D(bool is2D);
signals:
void axesSettingsRequested(); // 设置 → 弹 AxesSettingsDialog
void viewRequested(geopro::controller::ViewDir dir); // 前/后/上/下/左/右
void zoomInRequested();
void zoomOutRequested();
void fitRequested(); // 复位=适配
private:
std::vector<QToolButton*> viewDirButtons_; // 6 向快捷视图按钮:二维分析下禁用
};
} // namespace geopro::app