1 #ifndef __MAINWIDGET_H__
2 #define __MAINWIDGET_H__
6 #include <settings.hpp>
10 class MainWidget : public QLabel
14 RegionsTable _regions;
23 setAlignment(Qt::AlignCenter);
24 setAttribute(Qt::WA_TranslucentBackground);
26 ri = _regions.lookup (_settings.regions ()[0]);
28 setText (_settings.regions ().join (", ") + ", " + QString (ri ? ri->name () : ""));
31 QSize sizeHint() const
33 return 2 * QLabel::sizeHint();
37 void paintEvent(QPaintEvent *event)
40 p.setBrush(QColor(0, 0, 0, 128));
42 p.drawRoundedRect(rect(), 25, 25);
45 QLabel::paintEvent(event);
49 #endif /* __MAINWIDGET_H__ */