Add NOTIFYs to Q_PROPERTYs for plasma widgets
See http://reviewboard.kde.org/r/844/ for more details. svn path=/trunk/KDE/kdelibs/; revision=982204
This commit is contained in:
parent
198c7cd970
commit
390a8931d5
@ -45,7 +45,7 @@ class PLASMA_EXPORT CheckBox : public QGraphicsProxyWidget
|
|||||||
Q_PROPERTY(QString image READ image WRITE setImage)
|
Q_PROPERTY(QString image READ image WRITE setImage)
|
||||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(QCheckBox *nativeWidget READ nativeWidget)
|
Q_PROPERTY(QCheckBox *nativeWidget READ nativeWidget)
|
||||||
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked)
|
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked NOTIFY toggled)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CheckBox(QGraphicsWidget *parent = 0);
|
explicit CheckBox(QGraphicsWidget *parent = 0);
|
||||||
|
@ -116,6 +116,8 @@ ComboBox::ComboBox(QGraphicsWidget *parent)
|
|||||||
{
|
{
|
||||||
KComboBox *native = new KComboBox;
|
KComboBox *native = new KComboBox;
|
||||||
connect(native, SIGNAL(activated(const QString &)), this, SIGNAL(activated(const QString &)));
|
connect(native, SIGNAL(activated(const QString &)), this, SIGNAL(activated(const QString &)));
|
||||||
|
connect(native, SIGNAL(currentIndexChanged(const QString &)),
|
||||||
|
this, SIGNAL(textChanged(const QString &)));
|
||||||
setWidget(native);
|
setWidget(native);
|
||||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class PLASMA_EXPORT ComboBox : public QGraphicsProxyWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||||
Q_PROPERTY(QString text READ text)
|
Q_PROPERTY(QString text READ text NOTIFY textChanged)
|
||||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(KComboBox *nativeWidget READ nativeWidget)
|
Q_PROPERTY(KComboBox *nativeWidget READ nativeWidget)
|
||||||
|
|
||||||
@ -82,6 +82,7 @@ public Q_SLOTS:
|
|||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void activated(const QString & text);
|
void activated(const QString & text);
|
||||||
|
void textChanged(const QString & text);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||||
|
@ -41,7 +41,7 @@ class PLASMA_EXPORT LineEdit : public QGraphicsProxyWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||||
Q_PROPERTY(QString text READ text WRITE setText)
|
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textEdited)
|
||||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(KLineEdit *nativeWidget READ nativeWidget)
|
Q_PROPERTY(KLineEdit *nativeWidget READ nativeWidget)
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class PLASMA_EXPORT RadioButton : public QGraphicsProxyWidget
|
|||||||
Q_PROPERTY(QString image READ image WRITE setImage)
|
Q_PROPERTY(QString image READ image WRITE setImage)
|
||||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(QRadioButton *nativeWidget READ nativeWidget)
|
Q_PROPERTY(QRadioButton *nativeWidget READ nativeWidget)
|
||||||
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked)
|
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked NOTIFY toggled)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RadioButton(QGraphicsWidget *parent = 0);
|
explicit RadioButton(QGraphicsWidget *parent = 0);
|
||||||
|
@ -42,7 +42,7 @@ class PLASMA_EXPORT ScrollBar : public QGraphicsProxyWidget
|
|||||||
|
|
||||||
Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
|
Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
|
||||||
Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
|
Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
|
||||||
Q_PROPERTY(int value READ value WRITE setValue)
|
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
|
||||||
Q_PROPERTY(int minimum READ minimum)
|
Q_PROPERTY(int minimum READ minimum)
|
||||||
Q_PROPERTY(int maximum READ maximum)
|
Q_PROPERTY(int maximum READ maximum)
|
||||||
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
||||||
|
@ -43,7 +43,7 @@ class PLASMA_EXPORT Slider : public QGraphicsProxyWidget
|
|||||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||||
Q_PROPERTY(int maximum READ maximum WRITE setMinimum)
|
Q_PROPERTY(int maximum READ maximum WRITE setMinimum)
|
||||||
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
|
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
|
||||||
Q_PROPERTY(int value READ value WRITE setValue)
|
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
|
||||||
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
|
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
|
||||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(QSlider *nativeWidget READ nativeWidget)
|
Q_PROPERTY(QSlider *nativeWidget READ nativeWidget)
|
||||||
|
@ -44,7 +44,7 @@ class PLASMA_EXPORT SpinBox : public QGraphicsProxyWidget
|
|||||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||||
Q_PROPERTY(int maximum READ maximum WRITE setMinimum)
|
Q_PROPERTY(int maximum READ maximum WRITE setMinimum)
|
||||||
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
|
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
|
||||||
Q_PROPERTY(int value READ value WRITE setValue)
|
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
|
||||||
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(KIntSpinBox *nativeWidget READ nativeWidget)
|
Q_PROPERTY(KIntSpinBox *nativeWidget READ nativeWidget)
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class PLASMA_EXPORT TextBrowser : public QGraphicsProxyWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||||
Q_PROPERTY(QString text READ text WRITE setText)
|
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
|
||||||
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(KTextBrowser *nativeWidget READ nativeWidget)
|
Q_PROPERTY(KTextBrowser *nativeWidget READ nativeWidget)
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class PLASMA_EXPORT TextEdit : public QGraphicsProxyWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
|
||||||
Q_PROPERTY(QString text READ text WRITE setText)
|
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
|
||||||
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
||||||
Q_PROPERTY(KTextEdit *nativeWidget READ nativeWidget)
|
Q_PROPERTY(KTextEdit *nativeWidget READ nativeWidget)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user