Go to the documentation of this file.
25#include <QtGui/QGraphicsWidget>
82 explicit Meter(QGraphicsItem *parent = 0);
107 void setSvg(
const QString &svg);
118 void setMeterType(MeterType
type);
123 MeterType meterType()
const;
130 void setLabel(
int index,
const QString &text);
136 QString label(
int index)
const;
143 void setLabelColor(
int index,
const QColor &color);
149 QColor labelColor(
int index)
const;
156 void setLabelFont(
int index,
const QFont &font);
162 QFont labelFont(
int index)
const;
169 void setLabelAlignment(
int index,
const Qt::Alignment alignment);
175 Qt::Alignment labelAlignment(
int index)
const;
181 QRectF labelRect(
int index)
const;
192 void setMaximum(
int maximum);
197 void setMinimum(
int minimum);
202 void setValue(
int value);
215 virtual void paint(QPainter *p,
218 QSizeF
sizeHint(Qt::SizeHint which,
const QSizeF &constraint = QSizeF())
const;
221 MeterPrivate *
const d;
QHash< QString, QVariant > Data
Provides generic meter widget for Plasma.
void setValue(int value)
Set value for the meter.
virtual void paint(QPainter *p, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Reimplemented from Plasma::Widget.
void setMaximum(int maximum)
Set maximum value for the meter.
void setSvg(const QString &svg)
Set svg file name.
void setMinimum(int minimum)
Set minimum value for the meter.
Meter(QGraphicsItem *parent=0)
Constructor.
void valueChanged(const int &value)
This signal is sent when the value of the meter changes programmatically.
MeterType
Meter types enum.
@ BarMeterHorizontal
Horizontal bar meter (like thermometer).
@ BarMeterVertical
Vertical bar meter (like thermometer).
@ AnalogMeter
Analog meter (like tachometer).
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
void setMeterType(MeterType type)
Set meter type.
Namespace for everything in libplasma.
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
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
KDE's Doxygen guidelines are available online.