- p.setPen(get_text_colour());
- p.drawText(label_rect, Qt::AlignCenter | Qt::AlignVCenter, _name);
+ p.setPen(select_text_colour(colour_));
+ p.setFont(QApplication::font());
+ p.drawText(QRectF(r.x(), r.y(),
+ r.width() - label_arrow_length, r.height()),
+ Qt::AlignCenter | Qt::AlignVCenter, name_);
+}
+
+QMenu* Trace::create_context_menu(QWidget *parent)
+{
+ QMenu *const menu = ViewItem::create_context_menu(parent);
+
+ return menu;
+}
+
+pv::widgets::Popup* Trace::create_popup(QWidget *parent)
+{
+ using pv::widgets::Popup;
+
+ popup_ = new Popup(parent);
+ popup_->set_position(parent->mapToGlobal(
+ point(parent->rect())), Popup::Right);
+
+ create_popup_form();
+
+ connect(popup_, SIGNAL(closed()),
+ this, SLOT(on_popup_closed()));
+
+ return popup_;