DtkWidget 5.6.0.2
DTK Widget module
Public 成员函数 | Protected 成员函数 | 友元 | 所有成员列表
Dtk::Widget::DCrumbTextFormat类 参考

表示标签输入控件所含标签的文字样式. 更多...

类 Dtk::Widget::DCrumbTextFormat 继承关系图:
Inheritance graph
[图例]
Dtk::Widget::DCrumbTextFormat 的协作图:
Collaboration graph
[图例]

Public 成员函数

QColor tagColor () const
 DCrumbTextFormat::tagColor 更多...
 
void setTagColor (const QColor &color)
 DCrumbTextFormat::setTagColor 设置标签颜色 color 标签的颜色
 
QString text () const
 DCrumbTextFormat::text 更多...
 
void setText (const QString &text)
 DCrumbTextFormat::setText 设置文本内容(标签名称) text 文本内容
 
QColor textColor () const
 DCrumbTextFormat::textColor 更多...
 
void setTextColor (const QColor &color)
 DCrumbTextFormat::setTextColor 设置文本颜色 color 文本的颜色
 
QBrush background () const
 DCrumbTextFormat::background 更多...
 
void setBackground (const QBrush &background)
 DCrumbTextFormat::setBackground 设置背景 background 背景画刷
 
int backgroundRadius () const
 DCrumbTextFormat::backgroundRadius 更多...
 
void setBackgroundRadius (int radius)
 DCrumbTextFormat::setBackgroundRadius 设置背景圆角程度 radius 圆角的大小
 

Protected 成员函数

 DCrumbTextFormat (int objectType)
 
 DCrumbTextFormat (const QTextFormat &fmt)
 

友元

class CrumbObjectInterface
 
class DCrumbEdit
 
class DCrumbEditPrivate
 

详细描述

表示标签输入控件所含标签的文字样式.

\inmodule dtkwidget

Text format for Tags/Crumbs inside DCrumbEdit.

DCrumbTextFormat comes with properties to indicate the look of a tag/crumb inside a DCrumbEdit.

The text property is the main property which indicate the tag itself. Other properties include tag color, background color and background radius are also available to use.

Using DCrumbEdit::makeTextFormat() to create a DCrumbTextFormat object is always recommended, if you are going to craft your own DCrumbTextFormat object, don't forget to call the DCrumbTextFormat::setObjectType function(normally value should be QTextFormat::UserObject + 1). DCrumbTextFormat 包含了表示标签输入控件 DCrumbEdit 内所包含的标签的各种样式属性。 文字属性为标识一个标签的唯一重要属性,其他可用的属性包含标签背景颜色,标签文字颜色以及标签圆角程度等可供使用。 总是建议通过 DCrumbEdit::makeTextFormat() 来构造一个可供使用的 DCrumbTextFormat 对象,若希望自行构造, 请留意使用 DCrumbTextFormat::setObjectType 来设置必要的对象类型 (通常应为 QTextFormat::UserObject + 1).

参见
DCrumbEdit

成员函数说明

◆ background()

QBrush Dtk::Widget::DCrumbTextFormat::background ( ) const

DCrumbTextFormat::background

返回
返回背景画刷

◆ backgroundRadius()

int Dtk::Widget::DCrumbTextFormat::backgroundRadius ( ) const

DCrumbTextFormat::backgroundRadius

返回
返回背景的圆角

◆ tagColor()

QColor Dtk::Widget::DCrumbTextFormat::tagColor ( ) const

DCrumbTextFormat::tagColor

返回
返回标签的颜色

◆ text()

QString Dtk::Widget::DCrumbTextFormat::text ( ) const

DCrumbTextFormat::text

返回
返回标签的文本内容

◆ textColor()

QColor Dtk::Widget::DCrumbTextFormat::textColor ( ) const

DCrumbTextFormat::textColor

返回
返回文本的颜色

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