43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
#pragma once
|
||
#include <QDialog>
|
||
|
||
#include "model/ColorScale.hpp" // core::Rgba
|
||
|
||
class QCheckBox;
|
||
class QComboBox;
|
||
class QPushButton;
|
||
|
||
namespace geopro::app {
|
||
|
||
// 线形/标注配置(复刻 contourLine.vue 的 emit)。共享:2D 等值线渲染消费;3D 无等值线,忽略。
|
||
struct ContourLineConfig {
|
||
bool lineShow = true;
|
||
geopro::core::Rgba lineColor{0, 0, 0, 255};
|
||
bool dashed = false; // false=实线 solid,true=虚线 dashed
|
||
bool labelShow = true;
|
||
geopro::core::Rgba labelColor{0, 0, 0, 255};
|
||
};
|
||
|
||
// 线形⚙ 子对话框(复刻 contourLine.vue):线型(实线/虚线)、线显、线色、标注显、标注色。
|
||
class ContourLineDialog : public QDialog {
|
||
Q_OBJECT
|
||
public:
|
||
ContourLineDialog(const ContourLineConfig& init, QWidget* parent = nullptr);
|
||
ContourLineConfig config() const { return cfg_; } // accept() 后有效
|
||
|
||
private:
|
||
void pickLineColor();
|
||
void pickLabelColor();
|
||
void paintSwatch(QPushButton* btn, const geopro::core::Rgba& c);
|
||
void onAccept();
|
||
|
||
QComboBox* lineTypeCombo_ = nullptr;
|
||
QCheckBox* lineShowChk_ = nullptr;
|
||
QPushButton* lineColorBtn_ = nullptr;
|
||
QCheckBox* labelShowChk_ = nullptr;
|
||
QPushButton* labelColorBtn_ = nullptr;
|
||
ContourLineConfig cfg_;
|
||
};
|
||
|
||
} // namespace geopro::app
|