Plasma
#include <tooltipcontent.h>
Public Types | |
enum | ResourceType { ImageResource = 0, HtmlResource, CssResource } |
Detailed Description
Definition at line 47 of file tooltipcontent.h.
Member Enumeration Documentation
Enumerator | |
---|---|
ImageResource | |
HtmlResource | |
CssResource |
Definition at line 50 of file tooltipcontent.h.
Constructor & Destructor Documentation
Plasma::ToolTipContent::ToolTipContent | ( | ) |
Creates an empty Content.
Definition at line 72 of file tooltipcontent.cpp.
Plasma::ToolTipContent::~ToolTipContent | ( | ) |
Definition at line 82 of file tooltipcontent.cpp.
Plasma::ToolTipContent::ToolTipContent | ( | const ToolTipContent & | other | ) |
Copy constructor.
Definition at line 77 of file tooltipcontent.cpp.
Plasma::ToolTipContent::ToolTipContent | ( | const QString & | mainText, |
const QString & | subText, | ||
const QPixmap & | image = QPixmap() |
||
) |
Constructor that sets the common fields.
Definition at line 93 of file tooltipcontent.cpp.
Plasma::ToolTipContent::ToolTipContent | ( | const QString & | mainText, |
const QString & | subText, | ||
const QIcon & | icon | ||
) |
Constructor that sets the common fields.
Definition at line 103 of file tooltipcontent.cpp.
Member Function Documentation
void Plasma::ToolTipContent::addResource | ( | ResourceType | type, |
const QUrl & | path, | ||
const QVariant & | resource | ||
) |
Adds a resource that can then be referenced from the text elements using rich text.
Definition at line 215 of file tooltipcontent.cpp.
bool Plasma::ToolTipContent::autohide | ( | ) | const |
Whether or not to autohide the tooltip, defaults to true.
Definition at line 200 of file tooltipcontent.cpp.
QGraphicsWidget * Plasma::ToolTipContent::graphicsWidget | ( | ) | const |
the graphicsWidget used for positioning the tooltip, if any
- Since
- 4.6
Definition at line 262 of file tooltipcontent.cpp.
bool Plasma::ToolTipContent::highlightWindows | ( | ) | const |
true if when the mouse will be over a thumbnail the corresponding window will be highlighted by reducing opacity of all the other windows
- Since
- 4.4
Definition at line 190 of file tooltipcontent.cpp.
QPixmap Plasma::ToolTipContent::image | ( | ) | const |
An icon to display.
Definition at line 155 of file tooltipcontent.cpp.
bool Plasma::ToolTipContent::isClickable | ( | ) | const |
bool Plasma::ToolTipContent::isEmpty | ( | ) | const |
- Returns
- true if all the fields are empty
Definition at line 113 of file tooltipcontent.cpp.
bool Plasma::ToolTipContent::isInstantPopup | ( | ) | const |
Whether or not the tooltip should popup instantly when the widget is hovered, defaults to false.
- Since
- 4.7
Definition at line 210 of file tooltipcontent.cpp.
QString Plasma::ToolTipContent::mainText | ( | ) | const |
ToolTipContent & Plasma::ToolTipContent::operator= | ( | const ToolTipContent & | other | ) |
Definition at line 87 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::registerResources | ( | QTextDocument * | document | ) | const |
Registers all resources with a given document.
Definition at line 220 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setAutohide | ( | bool | autohide | ) |
Sets whether or not to autohide the tooltip, defaults to true.
Definition at line 195 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setClickable | ( | bool | clickable | ) |
Sets whether or not the tooltip contains clickable content, such as window previews.
Defaults to false, or not clickable.
- Since
- 4.3
Definition at line 247 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setGraphicsWidget | ( | QGraphicsWidget * | widget | ) |
Sets an optional graphicsWidget that will be used for positioning the tooltip.
- Since
- 4.6
Definition at line 257 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setHighlightWindows | ( | bool | highlight | ) |
sets if when the mouse will be over a thumbnail the corresponding window will be highlighted by reducing opacity of all the other windows
- Since
- 4.4
Definition at line 185 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setImage | ( | const QPixmap & | image | ) |
Sets the icon to show.
Definition at line 145 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setImage | ( | const QIcon & | icon | ) |
Sets the icon to show.
Definition at line 150 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setInstantPopup | ( | bool | enabled | ) |
Sets whether or not the tooltip should popup instantly when the widget is hovered, defaults to false.
- Since
- 4.7
Definition at line 205 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setMainText | ( | const QString & | text | ) |
Sets the main text which containts important information, e.g.
the title
Definition at line 121 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setSubText | ( | const QString & | text | ) |
Sets text which elaborates on the mainText
.
Definition at line 133 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setWindowsToPreview | ( | const QList< WId > & | ids | ) |
Sets the IDS of the windows to show a preview for.
- Since
- 4.3
Definition at line 175 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setWindowToPreview | ( | WId | id | ) |
Sets the ID of the window to show a preview for.
- Deprecated:
- See also
- setWindowsToPreview
Definition at line 160 of file tooltipcontent.cpp.
QString Plasma::ToolTipContent::subText | ( | ) | const |
Elaborates on the mainText
.
Definition at line 138 of file tooltipcontent.cpp.
QList< WId > Plasma::ToolTipContent::windowsToPreview | ( | ) | const |
Ids of a windows if you want to show a preview.
- Since
- 4.3
Definition at line 180 of file tooltipcontent.cpp.
WId Plasma::ToolTipContent::windowToPreview | ( | ) | const |
Id of a window if you want to show a preview.
- Deprecated:
- See also
- windowsToPreview
Definition at line 166 of file tooltipcontent.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.