Plasma
Go to the documentation of this file.
20 #ifndef PLASMA_TOOLBUTTON_H
21 #define PLASMA_TOOLBUTTON_H
23 #include <QtGui/QGraphicsProxyWidget>
32 class ToolButtonPrivate;
44 Q_PROPERTY(QString text READ text WRITE setText)
45 Q_PROPERTY(
bool autoRaise READ autoRaise WRITE setAutoRaise)
46 Q_PROPERTY(QString image READ image WRITE setImage)
47 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
48 Q_PROPERTY(QToolButton *nativeWidget READ nativeWidget)
49 Q_PROPERTY(QAction *action READ action WRITE setAction)
50 Q_PROPERTY(
bool down READ isDown WRITE setDown)
52 Q_PROPERTY(qreal animationUpdate READ animationUpdate WRITE setAnimationUpdate)
63 void setAutoRaise(
bool raise);
68 bool autoRaise()
const;
75 void setText(
const QString &text);
87 void setImage(
const QString &path);
97 void setImage(
const QString &path,
const QString &elementid);
102 QString image()
const;
110 void setDown(
bool down);
123 void setStyleSheet(
const QString &stylesheet);
128 QString styleSheet();
137 void setAction(QAction *action);
144 QAction *action()
const;
153 void setIcon(
const QIcon &icon);
165 QToolButton *nativeWidget()
const;
179 void paint(QPainter *painter,
182 void resizeEvent(QGraphicsSceneResizeEvent *event);
183 void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
184 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
185 void changeEvent(QEvent *event);
186 QVariant itemChange(GraphicsItemChange change,
const QVariant &value);
187 QSizeF sizeHint(Qt::SizeHint which,
const QSizeF & constraint)
const;
190 void setAnimationUpdate(qreal progress);
191 qreal animationUpdate()
const;
194 Q_PRIVATE_SLOT(d,
void syncBorders())
195 Q_PRIVATE_SLOT(d,
void syncToAction())
196 Q_PRIVATE_SLOT(d,
void clearAction())
197 Q_PRIVATE_SLOT(d,
void setPixmap())
198 Q_PRIVATE_SLOT(d,
void setPalette())
200 friend class ToolButtonPrivate;
201 ToolButtonPrivate *const d;
206 #endif // multiple inclusion guard
Namespace for everything in libplasma.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri Nov 14 2014 00:36:55 by
doxygen 1.8.8 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.