- QMenu menu(this);
- menu.addAction(_action_set_name);
- menu.addAction(_action_set_colour);
-
- _context_signal = s;
- menu.exec(event->globalPos());
- _context_signal.reset();
-}
-
-void Header::on_action_set_name_triggered()
-{
- bool ok = false;
-
- shared_ptr<view::Signal> context_signal = _context_signal;
- if (!context_signal)
- return;
-
- const QString new_label = QInputDialog::getText(this, tr("Set Name"),
- tr("Name"), QLineEdit::Normal, context_signal->get_name(), &ok);
-
- if (ok)
- context_signal->set_name(new_label);