DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DA::DAFigureTreeModel类 参考
类 DA::DAFigureTreeModel 继承关系图:

Public 类型

enum  NodeType {
  NodeTypeUnknow = 1001 , NodeTypeFigure , NodeTypePlotFolder , NodeTypePlot ,
  NodeTypeAxesFolder , NodeTypeAxis , NodeTypeItemsFolder , NodeTypePlotItem
}
 
enum  CustomRoles {
  RolePlot = Qt::UserRole + 1 , RoleScale = Qt::UserRole + 2 , RolePlotItem = Qt::UserRole + 3 , RoleAxisId = Qt::UserRole + 4 ,
  RoleNodeType = Qt::UserRole + 5
}
 

信号

void chartItemAttached (QwtPlotItem *item, bool on)
 

Public 成员函数

 DAFigureTreeModel (QObject *parent=nullptr)
 
void setFigure (QwtFigure *figure)
 
QwtFigure * figure () const
 
void refresh ()
 
NodeType itemType (QStandardItem *item) const
 
template<typename T >
T * pointerFromItem (const QStandardItem *item, CustomRoles role) const
 
template<typename T >
T * pointerFromIndex (const QModelIndex &index, CustomRoles role) const
 
QwtPlot * plotFromItem (const QStandardItem *item) const
 
QwtPlot * plotFromIndex (const QModelIndex &index) const
 
QwtScaleWidget * scaleFromItem (const QStandardItem *item) const
 
QwtScaleWidget * scaleFromIndex (const QModelIndex &index) const
 
QwtPlotItem * plotItemFromItem (const QStandardItem *item) const
 
QwtPlotItem * plotItemFromIndex (const QModelIndex &index) const
 
QwtAxisId axisIdFromItem (const QStandardItem *item) const
 
QwtAxisId axisIdFromItem (const QModelIndex &index) const
 
virtual QString generatePlotTitleText (QwtPlot *plot) const
 用于生成绘图对应的文字
 
virtual QString generatePlotItemName (QwtPlotItem *item) const
 
virtual QIcon generatePlotItemIcon (QwtPlotItem *item) const
 
virtual QIcon generateBrushIcon (const QBrush &b) const
 

成员枚举类型说明

◆ NodeType

枚举值
NodeTypePlotFolder 

RolePlot有效,可提取host QwtPlot指针

NodeTypePlot 

RolePlot有效,可提取QwtPlot指针(含host和parasite)

NodeTypeAxesFolder 

RolePlot有效,可提取host QwtPlot指针

NodeTypeAxis 

RoleScale有效,可提取QwtScaleWidget指针;RoleAxisId有效,可提取QwtAxisId;RolePlot有效,可提取对应QwtPlot指针

NodeTypeItemsFolder 

RolePlot有效,可提取QwtPlot指针

NodeTypePlotItem 

RolePlotItem有效,可提取QwtPlotItem指针;RolePlot有效,可提取QwtPlot指针

成员函数说明

◆ generatePlotTitleText()

QString DA::DAFigureTreeModel::generatePlotTitleText ( QwtPlot *  plot) const
virtual

用于生成绘图对应的文字

如果想改变文字内容,可重写此函数

参数
plot绘图指针
figfigure指针
返回

该类的文档由以下文件生成: