Plasma
Plasma::ToolTipContent Class Reference
#include <tooltipcontent.h>
Public Types | |
enum | ResourceType { ImageResource = 0, HtmlResource, CssResource } |
Public Member Functions | |
void | addResource (ResourceType type, const QUrl &path, const QVariant &resource) |
bool | autohide () const |
QPixmap | image () const |
bool | isEmpty () const |
QString | mainText () const |
ToolTipContent & | operator= (const ToolTipContent &other) |
void | registerResources (QTextDocument *document) const |
void | setAutohide (bool autohide) |
void | setImage (const QIcon &icon) |
void | setImage (const QPixmap &image) |
void | setMainText (const QString &text) |
void | setSubText (const QString &text) |
void | setWindowsToPreview (const QList< WId > &ids) |
void | setWindowToPreview (WId id) |
QString | subText () const |
ToolTipContent (const QString &mainText, const QString &subText, const QIcon &icon) | |
ToolTipContent (const QString &mainText, const QString &subText, const QPixmap &image=QPixmap()) | |
ToolTipContent (const ToolTipContent &other) | |
ToolTipContent () | |
QList< WId > | windowsToPreview () const |
WId | windowToPreview () const |
~ToolTipContent () |
Detailed Description
Definition at line 46 of file tooltipcontent.h.
Member Enumeration Documentation
Definition at line 49 of file tooltipcontent.h.
Constructor & Destructor Documentation
Plasma::ToolTipContent::ToolTipContent | ( | ) |
Creates an empty Content.
Definition at line 62 of file tooltipcontent.cpp.
Plasma::ToolTipContent::~ToolTipContent | ( | ) |
Definition at line 72 of file tooltipcontent.cpp.
Plasma::ToolTipContent::ToolTipContent | ( | const ToolTipContent & | other | ) |
Copy constructor.
Definition at line 67 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 83 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 93 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 181 of file tooltipcontent.cpp.
bool Plasma::ToolTipContent::autohide | ( | ) | const |
Whether or not to autohide the tooltip, defaults to true.
Definition at line 176 of file tooltipcontent.cpp.
QPixmap Plasma::ToolTipContent::image | ( | ) | const |
An icon to display.
Definition at line 141 of file tooltipcontent.cpp.
bool Plasma::ToolTipContent::isEmpty | ( | ) | const |
- Returns:
- true if all the fields are empty
Definition at line 103 of file tooltipcontent.cpp.
QString Plasma::ToolTipContent::mainText | ( | ) | const |
ToolTipContent & Plasma::ToolTipContent::operator= | ( | const ToolTipContent & | other | ) |
Definition at line 77 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::registerResources | ( | QTextDocument * | document | ) | const |
Registers all resources with a given document.
Definition at line 186 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setAutohide | ( | bool | autohide | ) |
Sets whether or not to autohide the tooltip, defaults to true.
Definition at line 171 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setImage | ( | const QIcon & | icon | ) |
Sets the icon to show.
Definition at line 136 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setImage | ( | const QPixmap & | image | ) |
Sets the icon to show.
Definition at line 131 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 111 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setSubText | ( | const QString & | text | ) |
Sets text which elaborates on the mainText
.
Definition at line 121 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 161 of file tooltipcontent.cpp.
void Plasma::ToolTipContent::setWindowToPreview | ( | WId | id | ) |
Sets the ID of the window to show a preview for.
Definition at line 146 of file tooltipcontent.cpp.
QString Plasma::ToolTipContent::subText | ( | ) | const |
Elaborates on the mainText
.
Definition at line 126 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 166 of file tooltipcontent.cpp.
WId Plasma::ToolTipContent::windowToPreview | ( | ) | const |
Id of a window if you want to show a preview.
Definition at line 152 of file tooltipcontent.cpp.
The documentation for this class was generated from the following files: