1 #ifndef __MAINWIDGET_H__
2 #define __MAINWIDGET_H__
6 #include <settings.hpp>
10 class MainWidget : public QLabel
14 RegionsTable _regions;
23 setAlignment(Qt::AlignCenter);
25 setAttribute(Qt::WA_TranslucentBackground);
27 ri = _regions.lookup (_settings.regions ()[0]);
29 setText (_settings.regions ().join (", ") + ", " + QString (ri ? ri->name () : ""));
32 QSize sizeHint() const
34 return QLabel::sizeHint() + QSize (20, 0);
38 void paintEvent(QPaintEvent *event)
41 p.setBrush(QColor(0, 0, 0, 128));
43 p.drawRoundedRect(rect(), 10, 10);
46 QLabel::paintEvent(event);
50 #endif /* __MAINWIDGET_H__ */