9 class LED :
public QWidget
13 Q_PROPERTY(
double diameter READ diameter WRITE setDiameter)
14 Q_PROPERTY(QColor color READ color WRITE setColor)
15 Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
16 Q_PROPERTY(
bool state READ state WRITE setState)
17 Q_PROPERTY(
bool flashing READ isFlashing WRITE setFlashing)
18 Q_PROPERTY(
int flashRate READ flashRate WRITE setFlashRate)
21 explicit LED(QWidget* parent = 0);
24 double diameter()
const;
25 void setDiameter(
double diameter);
28 void setColor(
const QColor& color);
30 Qt::Alignment alignment()
const;
31 void setAlignment(Qt::Alignment alignment);
34 bool isFlashing()
const;
35 int flashRate()
const;
38 void setState(
bool state);
40 void setFlashing(
bool flashing);
41 void setFlashRate(
int rate);
46 int heightForWidth(
int width)
const;
47 QSize sizeHint()
const;
48 QSize minimumSizeHint()
const;
51 void paintEvent(QPaintEvent* event);
56 Qt::Alignment alignment_;
72 QRadialGradient gradient_;