DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
Dtk::Widget::DStyledIconEngine类 参考

DStyledIconEngine一个修改的 QIconEngine 类. 更多...

类 Dtk::Widget::DStyledIconEngine 继承关系图:

Public 类型

typedef std::function< void(QPainter *, const QRectF &rect)> DrawFun
 

Public 成员函数

 DStyledIconEngine (DrawFun drawFun, const QString &iconName=QString())
 DStyledIconEngine::DStyledIconEngine drawFun iconName
 
void bindDrawFun (DrawFun drawFun)
 DStyledIconEngine::bindDrawFun活页夹 drawFun
 
void setIconName (const QString &name)
 DStyledIconEngine::setIconName设置icon名称 name 名称
 
QPixmap pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) override
 DStyledIconEngine::pixmap
 
void paint (QPainter *painter, const QPalette &palette, const QRectF &rect)
 DStyledIconEngine::paint 重载paint painter 画家 palette 调色板 rect 绘制的矩形大小.
 
void paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override
 DStyledIconEngine::paint
 
QIconEngine * clone () const override
 DStyledIconEngine::clone
 
void setFrontRole (const QWidget *widget, QPalette::ColorRole role)
 

静态 Public 成员函数

static void drawIcon (const QIcon &icon, QPainter *pa, const QRectF &rect)
 

Protected 成员函数

void virtual_hook (int id, void *data) override
 

Protected 属性

DrawFun m_drawFun = nullptr
 
QString m_iconName
 
QPalette::ColorRole m_painterRole
 
const QWidget * m_widget
 

详细描述

DStyledIconEngine一个修改的 QIconEngine 类.

\inmodule dtkwidget

成员函数说明

◆ clone()

QIconEngine * DStyledIconEngine::clone ( ) const
override

DStyledIconEngine::clone

返回
返回一个该引擎的克隆.
参见
QIconEngine::clone()

◆ paint() [1/2]

void DStyledIconEngine::paint ( QPainter *  painter,
const QPalette &  palette,
const QRectF &  rect 
)

DStyledIconEngine::paint 重载paint painter 画家 palette 调色板 rect 绘制的矩形大小.

参见
QIconEngine::paint()

◆ paint() [2/2]

void DStyledIconEngine::paint ( QPainter *  painter,
const QRect &  rect,
QIcon::Mode  mode,
QIcon::State  state 
)
override

DStyledIconEngine::paint

painter 画笔实例, rect 绘制的位置矩形,mode 图标模式,state 图标状态.

参见
QIconEngine::paint()

◆ pixmap()

QPixmap DStyledIconEngine::pixmap ( const QSize &  size,
QIcon::Mode  mode,
QIcon::State  state 
)
override

DStyledIconEngine::pixmap

size pixmap的大小, mode 图标模式的类型, state 图标的状态.

参见
QIconEngine::pixmap()

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