Widget wich displays light.
[yandex-traffic] / mainwidget.cpp
1 #include <QtGui>
2
3 #include "mainwidget.hpp"
4
5
6
7 // --------------------------------------------------
8 // MainWidget
9 // --------------------------------------------------
10 MainWidget::MainWidget ()
11     : QWidget ()
12 {
13 #ifdef Q_WS_MAEMO_5
14         setAttribute(Qt::WA_TranslucentBackground);
15 #endif
16         _light = new TrafficLight (this);
17         _label = new QLabel (this);
18
19         QHBoxLayout *layout = new QHBoxLayout;
20         layout->addWidget (_light);
21         layout->addWidget (_label);
22         setLayout (layout);
23
24         _label->setText ("Bla-bla");
25 }
26
27
28 QSize MainWidget::sizeHint() const
29 {
30     return QWidget::sizeHint () + QSize (20, 0);
31 }