_view->update_viewport();
}
+void DecodeSignal::delete_pressed()
+{
+ on_delete();
+}
+
void DecodeSignal::on_delete()
{
_session.remove_decode_signal(this);
QMenu* create_context_menu(QWidget *parent);
+ void delete_pressed();
+
private:
/**
MarginWidget(parent),
_dragging(false)
{
+ setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
connect(&_view.session(), SIGNAL(signals_changed()),
t->create_context_menu(this)->exec(event->globalPos());
}
+void Header::keyPressEvent(QKeyEvent *e)
+{
+ assert(e);
+
+ switch (e->key())
+ {
+ case Qt::Key_Delete:
+ {
+ const vector< shared_ptr<Trace> > traces(_view.get_traces());
+ BOOST_FOREACH(const shared_ptr<Trace> t, traces)
+ if (t->selected())
+ t->delete_pressed();
+ break;
+ }
+ }
+}
+
void Header::on_signals_changed()
{
const vector< shared_ptr<Trace> > traces(_view.get_traces());
void contextMenuEvent(QContextMenuEvent *event);
+ void keyPressEvent(QKeyEvent *e);
+
private slots:
void on_signals_changed();
return new QMenu(parent);
}
+void SelectableItem::delete_pressed()
+{
+}
+
QPen SelectableItem::highlight_pen()
{
return QPen(QApplication::palette().brush(
virtual pv::widgets::Popup* create_popup(QWidget *parent) = 0;
+ virtual void delete_pressed();
+
protected:
static QPen highlight_pen();
return menu;
}
+void Signal::delete_pressed()
+{
+ on_disable();
+}
+
void Signal::on_disable()
{
enable(false);
QMenu* create_context_menu(QWidget *parent);
+ void delete_pressed();
+
private slots:
void on_disable();