- shared_ptr<view::Trace> context_trace = _context_trace;
- if (!context_trace)
- return;
-
- const QString new_label = QInputDialog::getText(this, tr("Set Name"),
- tr("Name"), QLineEdit::Normal, context_trace->get_name(), &ok);
-
- if (ok)
- context_trace->set_name(new_label);
-}
-
-void Header::on_action_set_colour_triggered()
-{
- shared_ptr<view::Trace> context_trace = _context_trace;
- if (!context_trace)
- return;
-
- const QColor new_colour = QColorDialog::getColor(
- context_trace->get_colour(), this, tr("Set Colour"));
-
- if (new_colour.isValid())
- context_trace->set_colour(new_colour);
+ switch (e->key())
+ {
+ case Qt::Key_Delete:
+ {
+ const vector< shared_ptr<Trace> > traces(_view.get_traces());
+ for (const shared_ptr<Trace> t : traces)
+ if (t->selected())
+ t->delete_pressed();
+ break;
+ }
+ }