Plasma
radiobutton.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PLASMA_RADIOBUTTON_H
00021 #define PLASMA_RADIOBUTTON_H
00022
00023 #include <QtGui/QGraphicsProxyWidget>
00024
00025 class QRadioButton;
00026
00027 #include <plasma/plasma_export.h>
00028
00029 namespace Plasma
00030 {
00031
00032 class RadioButtonPrivate;
00033
00039 class PLASMA_EXPORT RadioButton : public QGraphicsProxyWidget
00040 {
00041 Q_OBJECT
00042
00043 Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
00044 Q_PROPERTY(QString text READ text WRITE setText)
00045 Q_PROPERTY(QString image READ image WRITE setImage)
00046 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
00047 Q_PROPERTY(QRadioButton *nativeWidget READ nativeWidget)
00048 Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked NOTIFY toggled)
00049
00050 public:
00051 explicit RadioButton(QGraphicsWidget *parent = 0);
00052 ~RadioButton();
00053
00059 void setText(const QString &text);
00060
00064 QString text() const;
00065
00071 void setImage(const QString &path);
00072
00076 QString image() const;
00077
00083 void setStyleSheet(const QString &stylesheet);
00084
00088 QString styleSheet();
00089
00093 QRadioButton *nativeWidget() const;
00094
00100 void setChecked(bool checked);
00101
00105 bool isChecked() const;
00106
00107 Q_SIGNALS:
00108 void toggled(bool);
00109
00110 protected:
00111 void resizeEvent(QGraphicsSceneResizeEvent *event);
00112
00113 private:
00114 Q_PRIVATE_SLOT(d, void setPixmap())
00115
00116 RadioButtonPrivate * const d;
00117 };
00118
00119 }
00120
00121 #endif // multiple inclusion guard