|
DAWorkbench 0.0.1
DAWorkbench API
|
DAFigureWidget的特例化,加入了拖曳等功能 更多...
#include <DAAppFigureWidget.h>
Public 成员函数 | |
| DAAppFigureWidget (QWidget *parent=0) | |
Public 成员函数 继承自 DA::DAFigureWidget | |
| DAFigureWidget (QWidget *parent=nullptr) | |
| QwtFigure * | figure () const |
| 获取绘图窗口 | |
| QString | getFigureId () const |
| void | setFigureId (const QString &id) |
| DAChartFactory * | getChartFactory () const |
| void | setupChartFactory (DAChartFactory *fac) |
| 设置ChartFactory | |
| DAChartWidget * | createChart () |
| 添加一个chart | |
| DAChartWidget * | createChart (const QRectF &versatileSize) |
| 创建绘图 | |
| DAChartWidget * | createChart (float xVersatile, float yVersatile, float wVersatile, float hVersatile) |
| 添加一个chart,指定位置占比 | |
| DAChartWidget * | createChart_ () |
| 支持redo/undo的createchart | |
| DAChartWidget * | createChart_ (const QRectF &versatileSize) |
| 支持redo/undo的createchart | |
| void | removeChart (DAChartWidget *chart) |
| 移除chart,但不会delete | |
| void | removeChart_ (DAChartWidget *chart) |
| void | addChart (DAChartWidget *chart, qreal xVersatile, qreal yVersatile, qreal wVersatile, qreal hVersatile) |
| 添加一个chart,指定位置占比 | |
| void | addChart (DAChartWidget *chart, const QRectF &versatileSize) |
| QList< DAChartWidget * > | getCharts () const |
| 获取所有的绘图 | |
| DAChartWidget * | getCurrentChart () const |
| 当前的图表的指针 | |
| DAChartWidget * | gca () const |
| like matlab/matplotlib api gca | |
| void | setCurrentChart (QwtPlot *p) |
| 设置当前的chart | |
| DAChartWidget * | currentChart () |
| 获取当前的chart,如果没有current chart,或figure不存在chart, 则创建一个新chart,此函数不返回nullptr | |
| QWidget * | getUnderCursorWidget () const |
| 返回当前光标下的widget | |
| DAChartWidget * | getUnderCursorChart () const |
| 返回在当前光标下的2D图 | |
| void | clear () |
| 清空同时删除 | |
| void | setBackgroundColor (const QBrush &brush) |
| 设置figure背景 | |
| void | setBackgroundColor (const QColor &clr) |
| 设置figure背景 | |
| const QBrush & | getBackgroundColor () const |
| 获取背景颜色 | |
| DAChartWidget * | findChartFromItem (QwtPlotItem *item) const |
| 通过item查找对应的SAChart2D,如果没有返回nullptr | |
| void | setSubChartEditorEnable (bool enable=true) |
| 是否开始子窗口编辑模式 | |
| DAFigureWidgetOverlay * | getSubChartEditor () const |
| 获取子窗口编辑器指针,若没有此编辑器,返回nullptr | |
| bool | isEnableSubChartEditor () const |
| SAFigureWindow::isSubWindowEditingMode | |
| int | getChartCount () const |
| 获取图表的数量 | |
| virtual QColor | getDefaultColor () const |
| 获取默认的绘图颜色 | |
| bool | hasPlot (QwtPlot *chart, bool includeParasite=true) const |
| 是否存在这个绘图 | |
| bool | bindAxisRange (QwtPlot *source, QwtPlot *follower, QwtAxisId axisid) |
| 绑定坐标轴的范围 | |
| bool | bindAxisRange (QwtPlot *source, QwtAxisId sourceAxisid, QwtPlot *follower, QwtAxisId followerAxisid) |
| 绑定坐标轴的范围 | |
| bool | unbindAxisRange (QwtPlot *source, QwtPlot *follower, QwtAxisId axisid) |
| bool | unbindAxisRange (QwtPlot *source, QwtAxisId sourceAxisid, QwtPlot *follower, QwtAxisId followerAxisid) |
| QList< DAChartAxisRangeBinder * > | getBindAxisRangeInfos () const |
| 获取坐标轴绑定信息 | |
| void | setDataPickerGroupEnabled (bool on) |
| 设置联动数据拾取,联动数据拾取会让当前所有绘图的QwtPlotSeriesDataPicker建立分组,进行联动 | |
| bool | isDataPickerGroupEnabled () const |
| QwtPlotSeriesDataPickerGroup * | getDataPickerGroup () const |
| QwtPlot * | findPlotById (const QString &id, bool findParasite=true) const |
| 通过id查找plot | |
| void | setColorTheme (const DAColorTheme &th) |
| DAColorTheme | getColorTheme () const |
| const DAColorTheme & | colorTheme () const |
| DAColorTheme & | colorTheme () |
| void | copyToClipboard () |
| QRectF | axesNormRect (QwtPlot *plot) const |
| QRectF | widgetNormRect (QWidget *w) const |
| void | addWidget (QWidget *widget, qreal left, qreal top, qreal width, qreal height) |
| void | addWidget (QWidget *widget, int rowCnt, int colCnt, int row, int col, int rowSpan=1, int colSpan=1, qreal wspace=0.0, qreal hspace=0.0) |
| void | setWidgetNormPos (QWidget *widget, const QRectF &rect) |
| QwtPlot * | plotUnderPos (const QPoint &pos) const |
| 获取在此坐标下的绘图,如果此坐标下没有,则返回nullptr,存在寄生轴情况只返回宿主轴 | |
| void | setFaceBrush (const QBrush &brush) |
| QBrush | getFaceBrush () const |
| bool | addItem_ (QwtPlotItem *item) |
| 支持redo/undo的添加item | |
| void | addItem_ (DAChartWidget *chart, QwtPlotItem *item) |
| 支持redo/undo的添加item | |
| QwtPlotCurve * | addCurve_ (const QVector< QPointF > &xyDatas) |
| 支持redo/undo的addCurve,等同于gca()->addCurve | |
| QwtPlotCurve * | addScatter_ (const QVector< QPointF > &xyDatas) |
| 支持redo/undo的addScatter,等同于gca()->addCurve | |
| QwtPlotBarChart * | addBar_ (const QVector< QPointF > &xyDatas) |
| 支持redo/undo的addBar,等同于gca()->addBar | |
| QwtPlotIntervalCurve * | addErrorBar_ (const QVector< double > &values, const QVector< double > &mins, const QVector< double > &maxs) |
| 支持redo/undo的addBar,等同于gca()->addBar | |
| void | push (QUndoCommand *cmd) |
| 推入一个命令 | |
| QUndoStack * | getUndoStack () |
| 获取内部的undoStack | |
额外继承的成员函数 | |
信号 继承自 DA::DAFigureWidget | |
| void | chartAdded (DA::DAChartWidget *c) |
| 添加了chart | |
| void | chartRemoved (DA::DAChartWidget *c) |
| 绘图移除信号 | |
| void | currentChartChanged (DA::DAChartWidget *c) |
| 当前的绘图发生了变更 | |
Protected 成员函数 继承自 DA::DAFigureWidget | |
| void | keyPressEvent (QKeyEvent *e) |
| void | showEvent (QShowEvent *e) |
DAFigureWidget的特例化,加入了拖曳等功能