🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
PropertyPages.hpp
浏览该文件的文档.
1
8#pragma once
9
10#include "AstGlobal.h"
11#include <QWidget>
12#include <QLineEdit>
13#include <QDoubleSpinBox>
14#include <QCheckBox>
15#include <QComboBox>
16#include <QPushButton>
17#include <array>
18
19namespace matplot {
20 class axes_type;
21 class line;
22 class surface;
23}
24
25AST_NAMESPACE_BEGIN
26
28class ColorButton : public QPushButton {
29 Q_OBJECT
30public:
31 explicit ColorButton(QWidget* parent = nullptr);
32 QColor color() const { return color_; }
33 void setColor(const QColor& c);
34signals:
35 void colorChanged(const QColor& c);
36private slots:
37 void onClick();
38private:
39 QColor color_;
40};
41
43class AxesPropertyPage : public QWidget {
44 Q_OBJECT
45public:
46 explicit AxesPropertyPage(QWidget* parent = nullptr);
47 void load(matplot::axes_type* axes, int index);
48 void apply(matplot::axes_type* axes);
49
50private:
51 void setupUi();
52 QDoubleSpinBox* posLeft_, *posBottom_, *posW_, *posH_;
53 QLineEdit* titleEdit_;
54 QComboBox* fontCombo_;
55 QDoubleSpinBox* fontSize_;
56 QDoubleSpinBox* titleFontSizeMultiplier_;
57 ColorButton* titleColorBtn_, *bgColorBtn_;
58 QLineEdit* xLabelEdit_, *yLabelEdit_;
59 QDoubleSpinBox* xMin_, *xMax_, *yMin_, *yMax_;
60 QCheckBox* xVisible_, *yVisible_;
61 QCheckBox* gridVisible_;
62};
63
65class LinePropertyPage : public QWidget {
66 Q_OBJECT
67public:
68 explicit LinePropertyPage(QWidget* parent = nullptr);
69 void load(class matplot::line* line, int index);
70 void apply(class matplot::line* line);
71
72private:
73 void setupUi();
74 QLineEdit* nameEdit_;
75 ColorButton* lineColorBtn_;
76 QComboBox* lineStyleCombo_;
77 QDoubleSpinBox* lineWidth_;
78 QComboBox* markerCombo_;
79 QDoubleSpinBox* markerSize_;
80 ColorButton* markerColorBtn_, *markerFaceBtn_;
81 QCheckBox* visibleCheck_;
82};
83
85class SurfacePropertyPage : public QWidget {
86 Q_OBJECT
87public:
88 explicit SurfacePropertyPage(QWidget* parent = nullptr);
89 void load(matplot::surface* surf, int index);
90 void apply(matplot::surface* surf);
91
92private:
93 void setupUi();
94 QLineEdit* nameEdit_;
95 QCheckBox* surfaceVisible_;
96 QCheckBox* lightingCheck_;
97 QDoubleSpinBox* faceAlpha_;
98 ColorButton* edgeColorBtn_;
99 QDoubleSpinBox* edgeWidth_;
100 QCheckBox* colorbarVisible_;
101};
102
103AST_NAMESPACE_END
坐标轴属性编辑页
定义 PropertyPages.hpp:43
辅助:颜色按钮(点击弹出 QColorDialog)
定义 PropertyPages.hpp:28
折线/散点属性编辑页
定义 PropertyPages.hpp:65
曲面属性编辑页
定义 PropertyPages.hpp:85