![]() |
LeechCraft
0.6.70-13605-g8cd066ad6a
Modular cross-platform feature rich live environment.
|
ToolTip for Qml objects. More...
#include "tooltipitem.h"
Inheritance diagram for LC::Util::ToolTipItem:
Collaboration diagram for LC::Util::ToolTipItem:Public Slots | |
| void | showToolTip () |
| Shows the tooltip immediately. More... | |
Signals | |
| void | textChanged () |
| Emitted when the text of this tooltip changes. More... | |
| void | containsMouseChanged () |
| Emitted when the containsMouse property changes. More... | |
Public Member Functions | |
| ToolTipItem (QQuickItem *parent=nullptr) | |
| Constructs the tooltip with the given parent item. More... | |
| void | SetText (const QString &text) |
| Sets the text contained in this tooltip to text. More... | |
| QString | GetText () const |
| Returns the text of this tooltip. More... | |
| bool | ContainsMouse () const |
| Returns whether the tooltip contains the mouse. More... | |
| void | ShowToolTip (const QString &text) const |
| Shows tooltip with the given text immediately. More... | |
Protected Member Functions | |
| void | hoverEnterEvent (QHoverEvent *) override |
| void | hoverLeaveEvent (QHoverEvent *) override |
Properties | |
| QString | text |
| The text of this tooltip item (rich text supported). More... | |
| bool | containsMouse |
| Whether this tooltip contains mouse. More... | |
ToolTip for Qml objects.
Rich text is supported.
Using the tooltip is pretty easy. First of all register tooltip in your widget:
Then in yout qml import this widget:
And now you can use tooltip:
Definition at line 124 of file tooltipitem.h.
| LC::Util::ToolTipItem::ToolTipItem | ( | QQuickItem * | parent = nullptr | ) |
Constructs the tooltip with the given parent item.
| [in] | parent | The parent item for this tooltip. |
Definition at line 90 of file tooltipitem.cpp.
References ShowToolTip().
Here is the call graph for this function:| bool LC::Util::ToolTipItem::ContainsMouse | ( | ) | const |
Returns whether the tooltip contains the mouse.
Definition at line 115 of file tooltipitem.cpp.
|
signal |
Emitted when the containsMouse property changes.
| QString LC::Util::ToolTipItem::GetText | ( | ) | const |
Returns the text of this tooltip.
Definition at line 110 of file tooltipitem.cpp.
|
overrideprotected |
Definition at line 125 of file tooltipitem.cpp.
|
overrideprotected |
Definition at line 133 of file tooltipitem.cpp.
| void LC::Util::ToolTipItem::SetText | ( | const QString & | text | ) |
Sets the text contained in this tooltip to text.
| [in] | text | The text of this tooltip. |
Definition at line 101 of file tooltipitem.cpp.
|
slot |
Shows the tooltip immediately.
Definition at line 141 of file tooltipitem.cpp.
| void LC::Util::ToolTipItem::ShowToolTip | ( | const QString & | text | ) | const |
Shows tooltip with the given text immediately.
The passed text overrides the text property of this tooltip, but does not change it.
Definition at line 120 of file tooltipitem.cpp.
Referenced by ToolTipItem().
Here is the caller graph for this function:
|
signal |
Emitted when the text of this tooltip changes.
|
read |
Whether this tooltip contains mouse.
Definition at line 160 of file tooltipitem.h.
|
readwrite |
The text of this tooltip item (rich text supported).
Definition at line 156 of file tooltipitem.h.