diff --git a/widgets/icon.h b/widgets/icon.h index 76ba7f4d8..97dba5dfe 100644 --- a/widgets/icon.h +++ b/widgets/icon.h @@ -47,6 +47,10 @@ namespace Plasma class PLASMA_EXPORT Icon : public QObject, public QGraphicsItem, public LayoutItem { Q_OBJECT + Q_PROPERTY( QString text READ text WRITE setText ) + Q_PROPERTY( QString infoText READ infoText WRITE setInfoText ) + Q_PROPERTY( QSizeF iconSize READ iconSize WRITE setIconSize ) + public: /** * Creates a new Plasma::Icon. @@ -101,14 +105,14 @@ class PLASMA_EXPORT Icon : public QObject, public QGraphicsItem, public LayoutIt * Sets the graphical icon for this Plasma::Icon. * @param icon the QIcon to associate with this icon. */ - void setIcon(const QIcon& icon); + Q_INVOKABLE void setIcon(const QIcon& icon); /** * Convenience method to set the icon of this Plasma::Icon * using a QString path to the icon. * @param icon the path to the icon to associate with this Plasma::Icon. */ - void setIcon(const QString& icon); + Q_INVOKABLE void setIcon(const QString& icon); /** * Returns the size of this Plasma::Icon's graphical icon. @@ -126,7 +130,7 @@ class PLASMA_EXPORT Icon : public QObject, public QGraphicsItem, public LayoutIt * @param height the height of the icon. * @param width the width of the icon. */ - void setIconSize(int height, int width); + Q_INVOKABLE void setIconSize(int height, int width); /** diff --git a/widgets/label.h b/widgets/label.h index 27927a37b..115ad4f8a 100644 --- a/widgets/label.h +++ b/widgets/label.h @@ -36,6 +36,10 @@ namespace Plasma */ class PLASMA_EXPORT Label : public Plasma::Widget { + Q_OBJECT + Q_PROPERTY( QString text READ text WRITE setText ) + Q_PROPERTY( Qt::Alignment alignment READ alignment WRITE setAlignment ) + public: /** diff --git a/widgets/pushbutton.h b/widgets/pushbutton.h index 466f99ea0..f0996b271 100644 --- a/widgets/pushbutton.h +++ b/widgets/pushbutton.h @@ -41,6 +41,10 @@ namespace Plasma class PLASMA_EXPORT PushButton : public Plasma::Widget { Q_OBJECT + Q_ENUMS( ButtonShape ) + Q_ENUMS( ButtonState ) + Q_PROPERTY( QString text READ text WRITE setText ) + Q_PROPERTY( QString icon WRITE setIcon ) public: enum ButtonShape diff --git a/widgets/radiobutton.h b/widgets/radiobutton.h index b3935feac..18b60f6e0 100644 --- a/widgets/radiobutton.h +++ b/widgets/radiobutton.h @@ -50,6 +50,8 @@ namespace Plasma class PLASMA_EXPORT RadioButton : public Plasma::Widget { Q_OBJECT + Q_PROPERTY( QString text READ text WRITE setText ) + Q_PROPERTY( bool checked READ isChecked WRITE setChecked ) public: RadioButton(QGraphicsItem *parent = 0); virtual ~RadioButton();