🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
EditFigureDialog.hpp
浏览该文件的文档.
1
8#pragma once
9
10#include "AstGlobal.h"
11#include <QDialog>
12#include <QTreeWidget>
13#include <QStackedWidget>
14#include <QPushButton>
15#include <QDialogButtonBox>
16#include <QIcon>
17
18namespace matplot {
19 class figure_type;
20 class axes_type;
21 class axes_object;
22}
23
24AST_NAMESPACE_BEGIN
25
26class AxesPropertyPage;
27class LinePropertyPage;
28class SurfacePropertyPage;
29
30class AST_CHART_API EditFigureDialog : public QDialog {
31 Q_OBJECT
32public:
33 explicit EditFigureDialog(matplot::figure_type* figure, QWidget* parent = nullptr);
34
35 void selectPlotItem(int axesIndex, int itemIndex);
36
37private slots:
38 void onTreeSelectionChanged();
39 void onApply();
40
41private:
42 void setupUi();
43 void buildTree();
44 QIcon loadIcon(const QString& name) const;
45
46 enum NodeType { TypeFigure, TypeAxes, TypePlotItem };
47 enum DataRole { TypeRole = Qt::UserRole, AxesIndexRole = Qt::UserRole + 1, ItemIndexRole = Qt::UserRole + 2 };
48
49 matplot::figure_type* figure_;
50 QTreeWidget* tree_;
51 QStackedWidget* stack_;
52 AxesPropertyPage* axesPage_;
53 LinePropertyPage* linePage_;
54 SurfacePropertyPage* surfacePage_;
55 QWidget* placeholder_;
56 QPushButton* applyBtn_;
57};
58
59AST_NAMESPACE_END
坐标轴属性编辑页
定义 PropertyPages.hpp:43
定义 EditFigureDialog.hpp:30
折线/散点属性编辑页
定义 PropertyPages.hpp:65
曲面属性编辑页
定义 PropertyPages.hpp:85