+
+ // Prepare for OpenGL rendering
+ makeCurrent();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+
+ setupViewport(width(), height());
+
+ qglClearColor(Qt::white);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ // Plot the signal
+ offset = 0;
+ BOOST_FOREACH(const shared_ptr<Signal> s, sigs)
+ {
+ assert(s);
+
+ const QRect signal_rect(LabelMarginWidth, offset,
+ width() - LabelMarginWidth, SignalHeight);
+
+ s->paint(*this, signal_rect, _scale, _offset);
+
+ offset += SignalHeight;
+ }
+
+ // Prepare for QPainter rendering
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ // Paint the label
+ offset = 0;