20 #ifndef PLASMA_LABEL_H
21 #define PLASMA_LABEL_H
23 #include <QtGui/QGraphicsProxyWidget>
45 Q_PROPERTY(QString text READ text WRITE setText)
46 Q_PROPERTY(QString image READ image WRITE setImage)
47 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
48 Q_PROPERTY(
bool hasScaledContents READ hasScaledContents WRITE setScaledContents)
49 Q_PROPERTY(
bool textSelectable READ textSelectable WRITE setTextSelectable)
50 Q_PROPERTY(
bool wordWrap READ wordWrap WRITE setWordWrap)
51 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
52 Q_PROPERTY(QLabel *nativeWidget READ nativeWidget)
68 void setText(const QString &text);
80 void setImage(const QString &path);
85 QString image() const;
92 void setAlignment(Qt::Alignment alignment);
97 Qt::Alignment alignment() const;
104 void setScaledContents(
bool scaled);
109 bool hasScaledContents() const;
117 void setTextSelectable(
bool enable);
123 bool textSelectable() const;
131 void setWordWrap(
bool wrap);
137 bool wordWrap() const;
144 void setStyleSheet(const QString &stylesheet);
149 QString styleSheet();
154 QLabel *nativeWidget() const;
157 void linkActivated(const QString &link);
158 void linkHovered(const QString &link);
161 void dataUpdated(const QString &sourceName, const Plasma::
DataEngine::Data &data);
164 void resizeEvent(QGraphicsSceneResizeEvent *event);
165 void mousePressEvent(QGraphicsSceneMouseEvent *event);
166 void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
167 void paint(QPainter *painter,
170 void changeEvent(QEvent *event);
171 bool event(QEvent *event);
172 QVariant itemChange(GraphicsItemChange change, const QVariant & value);
173 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
174 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
177 Q_PRIVATE_SLOT(d,
void setPalette())
178 Q_PRIVATE_SLOT(d,
void setPixmap())
180 LabelPrivate * const d;
185 #endif // multiple inclusion guard
Provides a plasma-themed QLabel.
Data provider for plasmoids (Plasma plugins)