|
DAWorkbench 0.0.1
DAWorkbench API
|
绘图设置窗口 更多...
#include <DAChartSettingWidget.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | SettingWidgetType { SettingPlot = 0 , SettingCanvas , SettingYLeftScale , SettingYRightScale , SettingXBottomScale , SettingXTopScale , SettingPlotItems } |
| 固定选择区域,固定选择区域是combobox比较固定的选中区域,用于识别combobox选中后能知道选中了什么内容 | |
| enum | ComboBoxRole { RolePlotItemPtr = Qt::UserRole + 1 } |
Public 成员函数 | |
| DAChartSettingWidget (QWidget *parent=nullptr) | |
| void | setPlot (QwtPlot *plot) |
| 设置绘图 | |
| QwtPlot * | getPlot () const |
| 获取当前管理的绘图指针 | |
| void | updateUI () |
| 更新界面 | |
| void | setCurrentPlotItem (QwtPlotItem *item) |
| QwtPlotItem * | getCurrentPlotItem () const |
| void | setSelection (const DAFigureElementSelection &sel) |
| 设置选中内容 | |
| void | showSettingWidget (SettingWidgetType widType) |
| 显示对应设置窗口, 不会设置combobox的index | |
| void | showPlotSetting () |
| void | showCanvasSetting () |
| void | showScaleYLeftSetting () |
| void | showScaleYRightSetting () |
| void | showScaleXBottomSetting () |
| void | showScaleXTopSetting () |
| void | showPlotItemSetting (QwtPlotItem *item) |
| 显示plotitem需要注意,如果传入的plotitem | |
| DAChartPlotSettingWidget * | getChartPlotSettingWidget () const |
| DAChartCanvasSettingWidget * | getChartCanvasSettingWidget () const |
| DAChartAxisSetWidget * | getChartAxisSetWidget (int axisId) const |
| DAChartCommonItemsSettingWidget * | getChartCommonItemsSettingWidget () const |
Protected 槽 | |
| void | onComboBoxItemIndexChanged (int index) |
| void | onItemAttached (QwtPlotItem *plotItem, bool on) |
| void | resetComboBox () |
Protected 成员函数 | |
| void | changeEvent (QEvent *e) |
| int | findComboBoxIndexFromPlotItem (const QwtPlotItem *item) const |
| 通过plotitem,从combobox找到对应的索引 | |
| void | appendPlotItemToComboBox (const QwtPlotItem *item) |
| QwtPlotItem * | getPlotItemFromComboBox (int index) const |
| void | removePlotItemFromComboBox (const QwtPlotItem *item) |
绘图设置窗口
绘图设置窗口主要由两个部分组成
由于每个设置窗口管理的对象都不一样,因此此窗口统一设置一个qwtplot指针
|
protected |
通过plotitem,从combobox找到对应的索引
| item |
| QwtPlot * DA::DAChartSettingWidget::getPlot | ( | ) | const |
获取当前管理的绘图指针
|
protectedslot |
| i |
| void DA::DAChartSettingWidget::setPlot | ( | QwtPlot * | plot | ) |
设置绘图
| plot |
| void DA::DAChartSettingWidget::setSelection | ( | const DAFigureElementSelection & | sel | ) |
设置选中内容
DAFigureElementSelection一般有绘图结构树传递过来
| sel |
| void DA::DAChartSettingWidget::showPlotItemSetting | ( | QwtPlotItem * | item | ) |
显示plotitem需要注意,如果传入的plotitem
| item |
| void DA::DAChartSettingWidget::showSettingWidget | ( | SettingWidgetType | widType | ) |
显示对应设置窗口, 不会设置combobox的index
| widType |