Plasma::Meter Class Reference
Provides generic meter widget for
Plasma.
More...
#include <Plasma/Widgets/Meter>
List of all members.
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
- Author:
- Petri Damstén
Definition at line 54 of file meter.h.
Member Enumeration Documentation
Meter types enum.
- Enumerator:
-
BarMeterHorizontal |
Horizontal bar meter (like thermometer).
|
BarMeterVertical |
Vertical bar meter (like thermometer).
|
AnalogMeter |
Analog meter (like tachometer).
|
Definition at line 68 of file meter.h.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
Definition at line 283 of file meter.cpp.
Plasma::Meter::~Meter |
( |
|
) |
|
Member Function Documentation
QString Plasma::Meter::label |
( |
int |
index |
) |
const |
- Parameters:
-
- Returns:
- text label for the meter
Definition at line 353 of file meter.cpp.
Qt::Alignment Plasma::Meter::labelAlignment |
( |
int |
index |
) |
const |
- Parameters:
-
- Returns:
- text label alignment for the meter
Definition at line 392 of file meter.cpp.
QColor Plasma::Meter::labelColor |
( |
int |
index |
) |
const |
- Parameters:
-
- Returns:
- text label color for the meter
Definition at line 366 of file meter.cpp.
QFont Plasma::Meter::labelFont |
( |
int |
index |
) |
const |
- Parameters:
-
- Returns:
- text label font for the meter
Definition at line 379 of file meter.cpp.
QRectF Plasma::Meter::labelRect |
( |
int |
index |
) |
const |
- Parameters:
-
- Returns:
- the size of this label.
Definition at line 397 of file meter.cpp.
int Plasma::Meter::maximum |
( |
|
) |
const |
- Returns:
- maximum value for the meter
int Plasma::Meter::minimum |
( |
|
) |
const |
- Returns:
- minimum value for the meter
Reimplemented from Plasma::Widget.
Definition at line 459 of file meter.cpp.
void Plasma::Meter::setLabel |
( |
int |
index, |
|
|
const QString & |
text | |
|
) |
| | |
Set text label for the meter.
- Parameters:
-
| index | label index. |
| text | text for the label. |
Definition at line 345 of file meter.cpp.
void Plasma::Meter::setLabelAlignment |
( |
int |
index, |
|
|
const Qt::Alignment |
alignment | |
|
) |
| | |
Set text label alignment for the meter.
- Parameters:
-
| index | label index |
| alignment | the text alignment to apply to the label |
Definition at line 384 of file meter.cpp.
void Plasma::Meter::setLabelColor |
( |
int |
index, |
|
|
const QColor & |
color | |
|
) |
| | |
Set text label color for the meter.
- Parameters:
-
| index | label index |
| color | the color to apply to the label |
Definition at line 358 of file meter.cpp.
void Plasma::Meter::setLabelFont |
( |
int |
index, |
|
|
const QFont & |
font | |
|
) |
| | |
Set text label font for the meter.
- Parameters:
-
| index | label index |
| font | the font to apply to the label |
Definition at line 371 of file meter.cpp.
void Plasma::Meter::setMaximum |
( |
int |
maximum |
) |
|
Set maximum value for the meter.
Definition at line 295 of file meter.cpp.
void Plasma::Meter::setMeterType |
( |
MeterType |
type |
) |
|
Set meter type.
Note: setSvg gets called automatically with the proper default values if svg is not set.
Definition at line 439 of file meter.cpp.
void Plasma::Meter::setMinimum |
( |
int |
minimum |
) |
|
Set minimum value for the meter.
Definition at line 305 of file meter.cpp.
void Plasma::Meter::setSvg |
( |
const QString & |
svg |
) |
|
Set svg file name.
Definition at line 418 of file meter.cpp.
void Plasma::Meter::setValue |
( |
int |
value |
) |
|
Set value for the meter.
Definition at line 315 of file meter.cpp.
QString Plasma::Meter::svg |
( |
|
) |
const |
int Plasma::Meter::value |
( |
|
) |
const |
- Returns:
- value for the meter
Property Documentation
int Plasma::Meter::maximum [read, write] |
int Plasma::Meter::minimum [read, write] |
QString Plasma::Meter::svg [read, write] |
int Plasma::Meter::value [read, write] |
The documentation for this class was generated from the following files: