20 #include <QPaintEvent> 22 #include <ui_CurveItemWidget.h> 38 ui_->frameColor->installEventFilter(
this);
52 disconnect(
config_, SIGNAL(titleChanged(
const QString&)),
this,
66 connect(config, SIGNAL(titleChanged(
const QString&)),
this,
95 if ((
object ==
ui_->frameColor) && (event->type() == QEvent::Paint)) {
96 QPaintEvent* paintEvent =
static_cast<QPaintEvent*
>(event);
98 QPainter painter(
ui_->frameColor);
101 painter.setBrush(color);
102 painter.setPen((color.lightnessF() > 0.5) ? Qt::black : Qt::white);
104 painter.fillRect(paintEvent->rect(), color);
105 painter.drawText(paintEvent->rect(), color.name().toUpper(),
106 Qt::AlignHCenter | Qt::AlignVCenter);
129 text +=
"/receipt_time";
131 ui_->labelXAxis->setText(text);
142 text +=
"/receipt_time";
144 ui_->labelYAxis->setText(text);
149 ui_->frameColor->repaint();
const QString & getTopic() const
CurveAxisConfig * getAxisConfig(Axis axis) const
FieldType getFieldType() const
const QString & getField() const
const QString & getTitle() const
QColor getCurrentColor() const
CurveColorConfig * getColorConfig() const