1 #ifndef GRAPHLABELWIDGET_H
2 #define GRAPHLABELWIDGET_H
8 * A very simple label widget, basically a box with text in.
10 class GraphLabelWidget : public QWidget {
12 GraphLabelWidget(QString text = QString(), QWidget* parent = 0) :
14 m_flags(Qt::AlignHCenter | Qt::AlignVCenter),
19 void setText(const QString& text)
24 void setFlags(int flags)
29 virtual void paintEvent(QPaintEvent *)
31 QPainter painter(this);
32 painter.setPen(Qt::black);
33 painter.fillRect(rect(), Qt::lightGray);
34 painter.drawText(rect(), m_flags, m_text);