libplasma
Plasma::Icon Class Reference
#include <icon.h>
List of all members.
Detailed Description
Definition at line 48 of file icon.h.
Constructor & Destructor Documentation
Convenience constructor to create a Plasma::Icon with text.
- Parameters:
-
| text | the text that will be displayed with this icon. |
| parent | the QGraphicsItem this icon is parented to. |
Definition at line 243 of file icon.cpp.
Creates a new Plasma::Icon with text and an icon.
- Parameters:
-
| icon | the icon that will be displayed with this icon. |
| text | the text that will be displayed with this icon. |
| parent | The QGraphicsItem this icon is parented to. |
Definition at line 251 of file icon.cpp.
| Plasma::Icon::~Icon |
( |
|
) |
[virtual] |
Member Function Documentation
| QString Plasma::Icon::text |
( |
|
) |
const |
Returns the text associated with this icon.
| void Plasma::Icon::setText |
( |
const QString & |
text |
) |
|
Sets the text associated with this icon.
- Parameters:
-
| text | the text to associate with this icon. |
Definition at line 895 of file icon.cpp.
Convenience method to set the svg image to use when given the filepath and name of svg.
- Parameters:
-
| svgFilePath | the svg filepath including name of the svg. |
| svgIconElement | the svg element to use when displaying the svg. Defaults to all of them. |
Definition at line 487 of file icon.cpp.
| QString Plasma::Icon::infoText |
( |
|
) |
const |
Returns the meta text associated with this icon.
| void Plasma::Icon::setInfoText |
( |
const QString & |
text |
) |
|
Sets the additional information to be displayed by this icon.
- Parameters:
-
| text | additional meta text associated with this icon. |
Definition at line 907 of file icon.cpp.
| QIcon Plasma::Icon::icon |
( |
|
) |
const |
- Returns:
- the icon associated with this icon.
| void Plasma::Icon::setIcon |
( |
const QIcon & |
icon |
) |
|
Sets the graphical icon for this Plasma::Icon.
- Parameters:
-
| icon | the KIcon to associate with this icon. |
Definition at line 934 of file icon.cpp.
| void Plasma::Icon::setIcon |
( |
const QString & |
icon |
) |
|
| QSizeF Plasma::Icon::iconSize |
( |
|
) |
const |
| void Plasma::Icon::addAction |
( |
QAction * |
action |
) |
|
Plasma::Icon allows the user to specify a number of actions (current four) to be displayed around the widget.
This method allows for a created QAction (not a KAction!) to be added to the Plasma::Icon.
- Parameters:
-
| action | the QAction to associate with this icon. |
Definition at line 287 of file icon.cpp.
| void Plasma::Icon::setOrientation |
( |
Qt::Orientation |
orientation |
) |
|
let set the orientation of the icon Qt::Vertical: text under the icon Qt::Horizontal text at a side of the icon depending by the direction of the language
- Parameters:
-
| orientation | the orientation we want |
Definition at line 1076 of file icon.cpp.
| void Plasma::Icon::invertLayout |
( |
bool |
invert |
) |
|
inverts the layout of the icons if the orientation is horizontal, normally we get icon on the left with left-to-right languages
- Parameters:
-
| invert | if we want to invert the layout of icons |
Definition at line 1081 of file icon.cpp.
| bool Plasma::Icon::invertedLayout |
( |
|
) |
const |
- Returns:
- if the layout of the icons should appear inverted or not
Definition at line 1086 of file icon.cpp.
| QSizeF Plasma::Icon::sizeFromIconSize |
( |
const qreal |
iconWidth |
) |
const |
- Returns:
- optimal size given a size for the icon
- Parameters:
-
| iconWidth | desidered width of the icon |
Definition at line 1091 of file icon.cpp.
| int Plasma::Icon::numDisplayLines |
( |
|
) |
|
- Returns:
- the number of lines allowed to display
Definition at line 330 of file icon.cpp.
| void Plasma::Icon::setNumDisplayLines |
( |
int |
numLines |
) |
|
- Parameters:
-
| numLines | the number of lines to show in the display. |
Definition at line 335 of file icon.cpp.
| void Plasma::Icon::setDrawBackground |
( |
bool |
draw |
) |
|
Sets whether or not to draw a background area for the icon.
- draw true if a background should be drawn or not
Definition at line 345 of file icon.cpp.
| bool Plasma::Icon::drawBackground |
( |
|
) |
const |
- Returns:
- true if a background area is to be drawn for the icon
Definition at line 353 of file icon.cpp.
| void Plasma::Icon::setPressed |
( |
bool |
pressed = true |
) |
[slot] |
Sets the appearance of the icon to pressed or restores the appearance to normal.
This does not simulate a mouse button press.
- Parameters:
-
| pressed | whether to appear as pressed (true) or as normal (false) |
Definition at line 1061 of file icon.cpp.
| void Plasma::Icon::setUnpressed |
( |
|
) |
[slot] |
Shortcut for setPressed(false).
Definition at line 1071 of file icon.cpp.
Paints the widget.
- Parameters:
-
| painter | the QPainter to use to paint. |
| option | the style option used to give specific info on the item being dawn. |
| widget | the parent QWidget (most likely the Corona) |
Reimplemented from Plasma::Widget.
Definition at line 809 of file icon.cpp.
| void Plasma::Icon::pressed |
( |
bool |
down |
) |
[signal] |
Indicates when the icon has been pressed.
| void Plasma::Icon::clicked |
( |
|
) |
[signal] |
Indicates when the icon has been clicked.
| void Plasma::Icon::doubleClicked |
( |
|
) |
[signal] |
Indicates when the icon has been double clicked.
| bool Plasma::Icon::isDown |
( |
|
) |
[protected] |
| void Plasma::Icon::drawActionButtonBase |
( |
QPainter * |
painter, |
|
|
const QSize & |
size, |
|
|
int |
element | |
|
) |
| | |
Property Documentation
QString Plasma::Icon::text [read, write] |
QString Plasma::Icon::infoText [read, write] |
QIcon Plasma::Icon::icon [read, write] |
QSizeF Plasma::Icon::iconSize [read] |
The documentation for this class was generated from the following files: