Plasma
Public Types |
Public Slots |
Signals |
Public Member Functions |
Protected Member Functions |
Properties |
List of all members
Plasma::Meter Class Reference
#include <Plasma/Widgets/Meter>
Inheritance diagram for Plasma::Meter:
Public Types | |
| enum | MeterType { BarMeterHorizontal , BarMeterVertical , AnalogMeter } |
Public Slots | |
| void | dataUpdated (const QString &sourceName, const Plasma::DataEngine::Data &data) |
| void | setMaximum (int maximum) |
| void | setMinimum (int minimum) |
| void | setValue (int value) |
Signals | |
| void | valueChanged (const int &value) |
Public Member Functions | |
| Meter (QGraphicsItem *parent=0) | |
| ~Meter () | |
| QString | label (int index) const |
| Qt::Alignment | labelAlignment (int index) const |
| QColor | labelColor (int index) const |
| QFont | labelFont (int index) const |
| QRectF | labelRect (int index) const |
| int | maximum () const |
| MeterType | meterType () const |
| int | minimum () const |
| void | setLabel (int index, const QString &text) |
| void | setLabelAlignment (int index, const Qt::Alignment alignment) |
| void | setLabelColor (int index, const QColor &color) |
| void | setLabelFont (int index, const QFont &font) |
| void | setMeterType (MeterType type) |
| void | setSvg (const QString &svg) |
| QString | svg () const |
| int | value () const |
Protected Member Functions | |
| virtual void | paint (QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| QSizeF | sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const |
Properties | |
| int | maximum |
| MeterType | meterType |
| int | minimum |
| QString | svg |
| int | value |
Detailed Description
Provides generic meter widget for Plasma.
Analog and bar meters are supported.
Svgs can have following ids:
- background: Drawn first to the bottom background can be a FrameSvg
- label0, label1, ...: Rectangles mark the label places
- bar: Bar for the bar meter can be replaced with bar-active and bar-inactive FrameSvg
- pointer: Pointer for analog meter
- rotatecenter: Marks the place of pointer rotation center
- rotateminmax: Width and height of this object are the Min and Max rotate angles for the pointer
- foreground: Is drawn to top
Member Enumeration Documentation
◆ MeterType
Constructor & Destructor Documentation
◆ Meter()
|
explicit |
◆ ~Meter()
Member Function Documentation
◆ dataUpdated
|
slot |
Used when connecting to a DataEngine.
◆ label()
| QString Plasma::Meter::label | ( | int | index | ) | const |
◆ labelAlignment()
| Qt::Alignment Plasma::Meter::labelAlignment | ( | int | index | ) | const |
◆ labelColor()
| QColor Plasma::Meter::labelColor | ( | int | index | ) | const |
◆ labelFont()
| QFont Plasma::Meter::labelFont | ( | int | index | ) | const |
◆ labelRect()
| QRectF Plasma::Meter::labelRect | ( | int | index | ) | const |
◆ maximum()
| int Plasma::Meter::maximum | ( | ) | const |
◆ meterType()
| Meter::MeterType Plasma::Meter::meterType | ( | ) | const |
◆ minimum()
| int Plasma::Meter::minimum | ( | ) | const |
◆ paint()
|
protectedvirtual |
◆ setLabel()
| void Plasma::Meter::setLabel | ( | int | index, |
| const QString & | text ) |
◆ setLabelAlignment()
| void Plasma::Meter::setLabelAlignment | ( | int | index, |
| const Qt::Alignment | alignment ) |
◆ setLabelColor()
| void Plasma::Meter::setLabelColor | ( | int | index, |
| const QColor & | color ) |
◆ setLabelFont()
| void Plasma::Meter::setLabelFont | ( | int | index, |
| const QFont & | font ) |
◆ setMaximum
|
slot |
◆ setMeterType()
| void Plasma::Meter::setMeterType | ( | MeterType | type | ) |
◆ setMinimum
|
slot |
◆ setSvg()
| void Plasma::Meter::setSvg | ( | const QString & | svg | ) |
◆ setValue
|
slot |
◆ sizeHint()
|
protected |
◆ svg()
◆ value()
| int Plasma::Meter::value | ( | ) | const |
◆ valueChanged
|
signal |
This signal is sent when the value of the meter changes programmatically.
The meter's value is passed.
Property Documentation
◆ maximum
◆ meterType
◆ minimum
◆ svg
◆ value
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2026 The KDE developers.
Generated on by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2026 The KDE developers.
Generated on by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.