DtkDeclarative
DTK Declarative module
|
A dci icon type for qml. 更多...
Public 成员函数 | |
DQuickDciIcon (const DQuickDciIcon &other) | |
DQuickDciIcon & | operator= (const DQuickDciIcon &other) |
bool | operator== (const DQuickDciIcon &other) const |
bool | operator!= (const DQuickDciIcon &other) const |
bool | isEmpty () const |
Determine whether the icon data is empty. | |
QString | name () const |
void | setName (const QString &name) |
void | resetName () |
int | width () const |
void | setWidth (int width) |
void | resetWidth () |
int | height () const |
void | setHeight (int height) |
void | resetHeight () |
DQMLGlobalObject::ControlState | mode () const |
void | setMode (DQMLGlobalObject::ControlState mode) |
void | resetMode () |
DGuiApplicationHelper::ColorType | theme () const |
void | setTheme (DTK_GUI_NAMESPACE::DGuiApplicationHelper::ColorType theme) |
void | resetTheme () |
DDciIconPalette | palette () const |
void | setPalette (const DDciIconPalette &palette) |
void | resetPalette () |
const QUrl & | source () const |
void | setSource (const QUrl &newSource) |
void | resetSource () |
bool | fallbackToQIcon () const |
void | setFallbackToQIcon (bool newFallbackToQIcon) |
void | resetFallbackToQIcon () |
属性 | |
QString | name |
Represents the path of the icon. | |
int | width |
Represents the width of the icon. | |
int | height |
Represents the height of the icon. | |
DTK_QUICK_NAMESPACE::DQMLGlobalObject::ControlState | mode |
Represents the mode of the icon. | |
DTK_GUI_NAMESPACE::DGuiApplicationHelper::ColorType | theme |
Represents the theme of the icon. | |
DTK_GUI_NAMESPACE::DDciIconPalette | palette |
Represents the palette of the icon. | |
QUrl | source |
bool | fallbackToQIcon |
A dci icon type for qml.
\inmodule dtkdeclarative
This is a DCI icon type that can be added to QML. Since controls in QML Quick cannot be inherited individually, we can only inherit some internal controls and internalize them.
It may not show up directly in your help documentation, but you can still use it normally. For example, you can use it in a Button control, such as the code below:
You may need to know about DCI icons. The DCI icon can automatically return the icon you need to display according to the DCI file you provide and the current icon status and icon mode. For example, You might need to highlight a selected icon, All you need to do is provide a DCI file that holds various schema icons and choose to use the Text or Action type, so we can help you with the task of highlighting icons.
bool Dtk::Quick::DQuickDciIcon::isEmpty | ( | ) | const |
Determine whether the icon data is empty.
|
readwrite |
Represents the path of the icon.
Typically,