libplasma
Plasma::SvgPanel Class Reference
#include <svgpanel.h>

Detailed Description
Definition at line 44 of file svgpanel.h.
Public Types | |
| enum | BorderFlag { DrawTopBorder = 1, DrawBottomBorder = 2, DrawLeftBorder = 4, DrawRightBorder = 8, ContentAtOrigin = 16, DrawAllBorders } |
Signals | |
| void | repaintNeeded () |
Public Member Functions | |
| ~SvgPanel () | |
| void | setFile (const QString &imagePath) |
| QString | file () const |
| void | setBorderFlags (const BorderFlags flags) |
| BorderFlags | borderFlags () const |
| void | resize (const QSizeF &size) |
| qreal | marginSize (const Plasma::MarginEdge edge) const |
| void | setPos (const QPointF &pos) |
| QPointF | pos () const |
| Q_INVOKABLE void | paint (QPainter *painter, const QRectF &rect) |
Related Functions | |
| (Note that these are not member functions.) | |
| SvgPanel (const QString &imagePath=QString(), QObject *parent=0) | |
Member Enumeration Documentation
These flags represents what borders should be drawn.
- Enumerator:
-
DrawTopBorder DrawBottomBorder DrawLeftBorder DrawRightBorder ContentAtOrigin DrawAllBorders
Definition at line 51 of file svgpanel.h.
Constructor & Destructor Documentation
| Plasma::SvgPanel::~SvgPanel | ( | ) |
Definition at line 74 of file svgpanel.cpp.
Member Function Documentation
| void Plasma::SvgPanel::setFile | ( | const QString & | imagePath | ) |
| QString Plasma::SvgPanel::file | ( | ) | const |
Convenience method to get the svg filepath and name of svg.
- Returns:
- the svg's filepath including name of the svg.
Definition at line 89 of file svgpanel.cpp.
| void Plasma::SvgPanel::setBorderFlags | ( | const BorderFlags | flags | ) |
Sets what borders should be painted.
- flags borders we want to paint
Definition at line 94 of file svgpanel.cpp.
| SvgPanel::BorderFlags Plasma::SvgPanel::borderFlags | ( | ) | const |
Convenience method to get the border flags.
- Returns:
- what borders are painted
Definition at line 104 of file svgpanel.cpp.
| void Plasma::SvgPanel::resize | ( | const QSizeF & | size | ) |
Resize the panel maintaining the same border size.
- size the new size of the panel
Definition at line 120 of file svgpanel.cpp.
| qreal Plasma::SvgPanel::marginSize | ( | const Plasma::MarginEdge | edge | ) | const |
Returns the margin size given the margin edge we want.
- edge the margin edge we want, top, bottom, left or right
- Returns:
- the margin size
Definition at line 130 of file svgpanel.cpp.
| void Plasma::SvgPanel::setPos | ( | const QPointF & | pos | ) |
Sets the position of the SvgPanel.
- pos where it should be positioned at
Definition at line 109 of file svgpanel.cpp.
| QPointF Plasma::SvgPanel::pos | ( | ) | const |
Returns the position of the SvgPanel.
- Returns:
- the position
Definition at line 114 of file svgpanel.cpp.
Paints the loaded SVG with the elements that represents the border.
- painter the QPainter to use
- rect the exposed rect to draw into
Definition at line 156 of file svgpanel.cpp.
| void Plasma::SvgPanel::repaintNeeded | ( | ) | [signal] |
Friends And Related Function Documentation
| Plasma::SvgPanel::SvgPanel | ( | const QString & | imagePath = QString(), |
|
| QObject * | parent = 0 | |||
| ) | [related] |
Constructs a new SvgPanel that paints the proper named subelements as borders.
The size is initialized to be the SVG's native size.
- imagePath the image to show. If a relative path is passed, then Plasma::Theme is used to load the SVG.
- parent options QObject to parent this to
Definition at line 63 of file svgpanel.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference