QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 类型 | Public 槽 | Public 成员函数 | Protected 成员函数 | 属性 | 所有成员列表
QwtPlotCanvas类 参考

QwtPlot 的画布 更多...

#include <qwt_plot_canvas.h>

类 QwtPlotCanvas 继承关系图:
QwtPlotAbstractCanvas

class  PrivateData
 

Public 类型

enum  PaintAttribute { BackingStore = 1 , Opaque = 2 , HackStyledBackground = 4 , ImmediatePaint = 8 }
 绘制属性 更多...
 
- Public 类型 继承自 QwtPlotAbstractCanvas
enum  FocusIndicator { NoFocusIndicator , CanvasFocusIndicator , ItemFocusIndicator }
 焦点指示器 更多...
 

Public 槽

void replot ()
 使绘制缓存失效并重绘画布
 

Public 成员函数

 QwtPlotCanvas (QwtPlot *=nullptr)
 构造函数
 
virtual ~QwtPlotCanvas ()
 析构函数
 
void setPaintAttribute (PaintAttribute, bool on=true)
 更改绘制属性
 
bool testPaintAttribute (PaintAttribute) const
 测试绘制属性是否启用
 
const QPixmap * backingStore () const
 获取后备存储
 
Q_INVOKABLE void invalidateBackingStore ()
 使内部后备存储失效
 
virtual bool event (QEvent *) override
 Qt 事件处理器,处理 QEvent::PolishRequest 和 QEvent::StyleChange
 
Q_INVOKABLE QPainterPath borderPath (const QRect &) const
 计算样式边框或圆角边框的绘制路径
 
- Public 成员函数 继承自 QwtPlotAbstractCanvas
 QwtPlotAbstractCanvas (QWidget *canvasWidget)
 构造函数
 
virtual ~QwtPlotAbstractCanvas ()
 析构函数
 
QwtPlotplot ()
 返回父绘图部件
 
const QwtPlotplot () const
 返回父绘图部件
 
void setFocusIndicator (FocusIndicator)
 设置焦点指示器
 
FocusIndicator focusIndicator () const
 获取焦点指示器
 
void setBorderRadius (double)
 设置边框框架角落的半径
 
double borderRadius () const
 获取边框框架角落的半径
 

Protected 成员函数

virtual void paintEvent (QPaintEvent *) override
 Paint event handler
 
virtual void resizeEvent (QResizeEvent *) override
 Resize event handler
 
virtual void drawBorder (QPainter *) override
 Draw border
 
- Protected 成员函数 继承自 QwtPlotAbstractCanvas
QWidget * canvasWidget ()
 
const QWidget * canvasWidget () const
 
virtual void drawFocusIndicator (QPainter *)
 Draw the focus indication
 
virtual void drawBackground (QPainter *)
 Helper function for the derived plot canvas
 
void fillBackground (QPainter *)
 Helper function for the derived plot canvas
 
void drawCanvas (QPainter *)
 Draw the plot to the canvas
 
void drawStyled (QPainter *, bool)
 Helper function for the derived plot canvas
 
void drawUnstyled (QPainter *)
 Helper function for the derived plot canvas
 
QPainterPath canvasBorderPath (const QRect &rect) const
 
void updateStyleSheetInfo ()
 Update the cached information about the current style sheet
 

属性

double borderRadius
 

详细描述

QwtPlot 的画布

成员枚举类型说明

◆ PaintAttribute

绘制属性

枚举值
BackingStore 

后备存储

Opaque 

不透明

HackStyledBackground 

样式背景黑客

ImmediatePaint 

立即绘制

构造及析构函数说明

◆ QwtPlotCanvas()

QwtPlotCanvas::QwtPlotCanvas ( QwtPlot plot = nullptr)
explicit

构造函数

◆ ~QwtPlotCanvas()

QwtPlotCanvas::~QwtPlotCanvas ( )
virtual

析构函数

成员函数说明

◆ backingStore()

const QPixmap * QwtPlotCanvas::backingStore ( ) const

获取后备存储

◆ borderPath()

QPainterPath QwtPlotCanvas::borderPath ( const QRect &  rect) const

计算样式边框或圆角边框的绘制路径

◆ drawBorder()

void QwtPlotCanvas::drawBorder ( QPainter *  painter)
overrideprotectedvirtual

Draw border

Draw the border of the plot canvas

参数
painterPainter
参见
setBorderRadius()

重载 QwtPlotAbstractCanvas .

◆ event()

bool QwtPlotCanvas::event ( QEvent *  event)
overridevirtual

Qt 事件处理器,处理 QEvent::PolishRequest 和 QEvent::StyleChange

◆ invalidateBackingStore()

void QwtPlotCanvas::invalidateBackingStore ( )

使内部后备存储失效

◆ paintEvent()

void QwtPlotCanvas::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Paint event handler

Paint event

参数
eventPaint event

◆ replot

void QwtPlotCanvas::replot ( )
slot

使绘制缓存失效并重绘画布

◆ resizeEvent()

void QwtPlotCanvas::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

Resize event handler

Resize event

参数
eventResize event

◆ setPaintAttribute()

void QwtPlotCanvas::setPaintAttribute ( PaintAttribute  attribute,
bool  on = true 
)

更改绘制属性

◆ testPaintAttribute()

bool QwtPlotCanvas::testPaintAttribute ( PaintAttribute  attribute) const

测试绘制属性是否启用


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