diff --git a/widgets/signalplotter.h b/widgets/signalplotter.h index 818425e2c..9df390fc8 100644 --- a/widgets/signalplotter.h +++ b/widgets/signalplotter.h @@ -21,6 +21,7 @@ #define SIGNALPLOTTER_H #include +#include namespace Plasma { @@ -33,6 +34,27 @@ struct PlotColor class PLASMA_EXPORT SignalPlotter : public Widget { + Q_OBJECT + Q_PROPERTY( QString title READ title WRITE setTitle ) + Q_PROPERTY( QString unit READ unit WRITE setUnit ) + Q_PROPERTY( qreal scale READ scaledBy WRITE scale ) // Note: The naming of the functions here is poor + Q_PROPERTY( bool useAutoRange READ useAutoRange WRITE setUseAutoRange ) + Q_PROPERTY( uint horizontalScale READ horizontalScale WRITE setHorizontalScale ) + Q_PROPERTY( bool showVerticalLines READ showVerticalLines WRITE setShowVerticalLines ) + Q_PROPERTY( QColor verticalLinesColor READ verticalLinesColor WRITE setVerticalLinesColor ) + Q_PROPERTY( uint verticalLinesDistance READ verticalLinesDistance WRITE setVerticalLinesDistance ) + Q_PROPERTY( bool verticalLinesScroll READ verticalLinesScroll WRITE setVerticalLinesScroll ) + Q_PROPERTY( bool showHorizontalLines READ showHorizontalLines WRITE setShowHorizontalLines ) + Q_PROPERTY( QColor horizontalLinesColor READ horizontalLinesColor WRITE setHorizontalLinesColor ) + Q_PROPERTY( QColor fontColor READ fontColor WRITE setFontColor ) + Q_PROPERTY( QFont font READ font WRITE setFont ) + Q_PROPERTY( uint horizontalLinesCount READ horizontalLinesCount WRITE setHorizontalLinesCount ) + Q_PROPERTY( bool showLabels READ showLabels WRITE setShowLabels ) + Q_PROPERTY( bool showTopBar READ showTopBar WRITE setShowTopBar ) + Q_PROPERTY( QColor backgroundColor READ backgroundColor WRITE setBackgroundColor ) + Q_PROPERTY( QString svgBackground READ svgBackground WRITE setSvgBackground ) + Q_PROPERTY( bool thinFrame WRITE setThinFrame ) + Q_PROPERTY( bool stackPlots READ stackPlots WRITE setStackPlots ) public: SignalPlotter(Widget *parent = 0); diff --git a/widgets/widget.h b/widgets/widget.h index 2f0503661..498ed3c57 100644 --- a/widgets/widget.h +++ b/widgets/widget.h @@ -56,6 +56,7 @@ class PLASMA_EXPORT Widget : public QObject, Q_PROPERTY( QRectF geometry READ geometry WRITE setGeometry ) Q_PROPERTY( QSizeF sizeHint READ sizeHint ) Q_PROPERTY( QSizeF size READ size WRITE resize ) + Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity ) public: