diff --git a/applet.h b/applet.h index 671fa21e6..ca2b23ef6 100644 --- a/applet.h +++ b/applet.h @@ -43,6 +43,14 @@ class Package; class PLASMA_EXPORT Applet : public QObject, public Widget { Q_OBJECT +// Q_PROPERTY( QRectF maxSizeHint READ maxSizeHint ) // Not sure why this fails + Q_PROPERTY( bool hasConfigurationInterface READ hasConfigurationInterface WRITE setHasConfigurationInterface ) + Q_PROPERTY( QString name READ name ) + Q_PROPERTY( QString category READ category ) + Q_PROPERTY( bool immutable READ immutable WRITE setImmutable ) + Q_PROPERTY( bool drawStandardBackground READ drawStandardBackground WRITE setDrawStandardBackground ) + Q_PROPERTY( bool failedToLaunch READ failedToLaunch WRITE setFailedToLaunch ) + Q_PROPERTY( QRectF boundingRect READ boundingRect ) public: typedef QList List; diff --git a/svg.h b/svg.h index edc450a46..90dd48db0 100644 --- a/svg.h +++ b/svg.h @@ -45,6 +45,9 @@ namespace Plasma class PLASMA_EXPORT Svg : public QObject { Q_OBJECT + Q_ENUMS( ContentType ) + Q_PROPERTY( QSize size READ size ) + Q_PROPERTY( ContentType contentType READ contentType WRITE setContentType ) public: /** @@ -117,34 +120,34 @@ class PLASMA_EXPORT Svg : public QObject * @arg width the new width * @arg height the new height **/ - void resize( int width, int height ); + Q_INVOKABLE void resize( int width, int height ); /** * Resizes the rendered image. Rendering will actually take place on * the next call to paint. * @arg size the new size of the image **/ - void resize( const QSizeF& size ); + Q_INVOKABLE void resize( const QSizeF& size ); /** * Resizes the rendered image to the natural size of the SVG. * Rendering will actually take place on the next call to paint. **/ - void resize(); + Q_INVOKABLE void resize(); /** * Size of a given element * @arg elementId the id of the element to check * @return the current size of a given element **/ - QSize elementSize( const QString& elementId ) const; + Q_INVOKABLE QSize elementSize( const QString& elementId ) const; /** * Check when an element exists in the loaded Svg * @arg elementId the id of the element to check * @return true if the element is defined in the Svg, otherwise false **/ - bool elementExists( const QString& elementId ) const; + Q_INVOKABLE bool elementExists( const QString& elementId ) const; /** * Currently set size of the SVG