ToolTipContent Class Reference
from PyKDE4.plasma import *
Namespace: Plasma
Detailed Description
Enumerations | |
ResourceType | { ImageResource, HtmlResource, CssResource } |
Methods | |
__init__ (self) | |
__init__ (self, Plasma.ToolTipContent other) | |
__init__ (self, QString mainText, QString subText, QPixmap image=QPixmap()) | |
__init__ (self, QString mainText, QString subText, QIcon icon) | |
addResource (self, Plasma.ToolTipContent.ResourceType type, QUrl path, QVariant resource) | |
bool | autohide (self) |
bool | highlightWindows (self) |
QPixmap | image (self) |
bool | isClickable (self) |
bool | isEmpty (self) |
QString | mainText (self) |
registerResources (self, QTextDocument document) | |
setAutohide (self, bool autohide) | |
setClickable (self, bool clickable) | |
setHighlightWindows (self, bool highlight) | |
setImage (self, QPixmap image) | |
setImage (self, QIcon icon) | |
setMainText (self, QString text) | |
setSubText (self, QString text) | |
setWindowToPreview (self, int id) | |
setWindowsToPreview (self, [int] ids) | |
QString | subText (self) |
int | windowToPreview (self) |
[int] | windowsToPreview (self) |
Method Documentation
__init__ | ( | self ) |
Creates an empty Content
__init__ | ( | self, | ||
Plasma.ToolTipContent | other | |||
) |
Copy constructor
Constructor that sets the common fields
Constructor that sets the common fields
addResource | ( | self, | ||
Plasma.ToolTipContent.ResourceType | type, | |||
QUrl | path, | |||
QVariant | resource | |||
) |
Adds a resource that can then be referenced from the text elements using rich text
bool autohide | ( | self ) |
Whether or not to autohide the tooltip, defaults to true
bool highlightWindows | ( | self ) |
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
QPixmap image | ( | self ) |
An icon to display
bool isClickable | ( | self ) |
- Returns:
- true if the tooltip is clickabel
- Since:
- 4.3
bool isEmpty | ( | self ) |
- Returns:
- true if all the fields are empty
QString mainText | ( | self ) |
Important information, e.g. the title
registerResources | ( | self, | ||
QTextDocument | document | |||
) |
Registers all resources with a given document
setAutohide | ( | self, | ||
bool | autohide | |||
) |
Sets whether or not to autohide the tooltip, defaults to true
setClickable | ( | self, | ||
bool | clickable | |||
) |
Sets whether or not the tooltip contains clickable content, such as window previews. Defaults to false, or not clickable.
- Since:
- 4.3
setHighlightWindows | ( | self, | ||
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
setImage | ( | self, | ||
QPixmap | image | |||
) |
Sets the icon to show
setImage | ( | self, | ||
QIcon | icon | |||
) |
Sets the icon to show
setMainText | ( | self, | ||
QString | text | |||
) |
Sets the main text which containts important information, e.g. the title
setSubText | ( | self, | ||
QString | text | |||
) |
Sets text which elaborates on the mainText
setWindowToPreview | ( | self, | ||
int | id | |||
) |
Sets the ID of the window to show a preview for.
- Deprecated:
- See also:
- setWindowsToPreview
setWindowsToPreview | ( | self, | ||
[int] | ids | |||
) |
Sets the IDS of the windows to show a preview for
- Since:
- 4.3
QString subText | ( | self ) |
Elaborates on the mainText
int windowToPreview | ( | self ) |
Id of a window if you want to show a preview
- Deprecated:
- See also:
- windowsToPreview
[int] windowsToPreview | ( | self ) |
Ids of a windows if you want to show a preview
- Since:
- 4.3
Enumeration Documentation
ResourceType |
- Enumerator:
-
ImageResource = 0 HtmlResource CssResource