DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DAFigureElementSelection.h
1#ifndef DAFIGUREELEMENTSELECTION_H
2#define DAFIGUREELEMENTSELECTION_H
3#include "DAFigureAPI.h"
4#include <QMetaType>
5class QwtPlot;
6class QwtPlotItem;
7class QwtScaleWidget;
8namespace DA
9{
10class DAFigureWidget;
18class DAFIGURE_API DAFigureElementSelection
19{
20public:
31
36 {
39 ColumnProperty
40 };
41
42public:
44 DAFigureElementSelection(DAFigureWidget* fig, QwtPlot* p, SelectionColumns col);
45 DAFigureElementSelection(DAFigureWidget* fig, QwtPlot* p, QwtPlotItem* item, SelectionColumns col);
46 DAFigureElementSelection(DAFigureWidget* fig, QwtPlot* p, QwtScaleWidget* sw, int axis, SelectionColumns col);
47 bool isSelectedPlot() const;
48 bool isSelectedScaleWidget() const;
49 bool isSelectedPlotItem() const;
50
51public:
52 DAFigureWidget* figureWidget { nullptr };
53 QwtPlot* plot { nullptr };
54 QwtPlotItem* plotItem { nullptr };
55 QwtScaleWidget* scaleWidget { nullptr };
56 int axisId;
57 SelectionTypes selectionType { SelectNone };
58 SelectionColumns selectionColumn { ColumnName };
59};
60}
61Q_DECLARE_METATYPE(DA::DAFigureElementSelection)
62#endif // DAFIGUREELEMENTSELECTION_H
用于存放绘图元素
Definition DAFigureElementSelection.h:19
SelectionColumns
记录选中的列
Definition DAFigureElementSelection.h:36
@ ColumnName
第一列,名称
Definition DAFigureElementSelection.h:37
@ ColumnVisible
第二列,可见性
Definition DAFigureElementSelection.h:38
SelectionTypes
选中类型
Definition DAFigureElementSelection.h:25
@ SelectScaleWidget
刻度,此时figureWidget、plot、scaleWidget、axisId有效
Definition DAFigureElementSelection.h:28
@ SelectNone
Definition DAFigureElementSelection.h:26
@ SelectPlotItem
plotitem,此时figureWidget、plot、plotItem有效
Definition DAFigureElementSelection.h:29
@ SelectPlot
plot,此时figureWidget、plot指针有效
Definition DAFigureElementSelection.h:27
绘图窗口
Definition DAFigureWidget.h:35
序列化类都是带异常的,使用中需要处理异常
Definition AppMainWindow.cpp:44