+LogicSignal::LogicSignal(pv::SigSession &session, const sr_probe *const probe,
+ shared_ptr<data::Logic> data) :
+ Signal(session, probe),
+ _data(data),
+ _separator(NULL),
+ _trigger_none(NULL),
+ _trigger_rising(NULL),
+ _trigger_high(NULL),
+ _trigger_falling(NULL),
+ _trigger_low(NULL),
+ _trigger_change(NULL)
+{
+ _colour = SignalColours[probe->index % countof(SignalColours)];
+}
+
+LogicSignal::~LogicSignal()
+{
+}
+
+void LogicSignal::init_context_bar_actions(QWidget *parent)
+{
+ Signal::init_context_bar_actions(parent);
+
+ _separator = new QAction(parent);
+ _separator->setSeparator(true);
+
+ _trigger_none = new QAction(QIcon(":/icons/trigger-none.svg"),
+ tr("No trigger"), this);
+ _trigger_none->setCheckable(true);
+ connect(_trigger_none, SIGNAL(triggered()),
+ this, SLOT(on_trigger_none()));
+
+ _trigger_rising = new QAction(QIcon(":/icons/trigger-rising.svg"),
+ tr("Trigger on rising edge"), this);
+ _trigger_rising->setCheckable(true);
+ connect(_trigger_rising, SIGNAL(triggered()),
+ this, SLOT(on_trigger_rising()));
+
+ _trigger_high = new QAction(QIcon(":/icons/trigger-low.svg"),
+ tr("Trigger on high level"), this);
+ _trigger_high->setCheckable(true);
+ connect(_trigger_high, SIGNAL(triggered()),
+ this, SLOT(on_trigger_high()));
+
+ _trigger_falling = new QAction(QIcon(":/icons/trigger-falling.svg"),
+ tr("Trigger on falling edge"), this);
+ _trigger_falling->setCheckable(true);
+ connect(_trigger_falling, SIGNAL(triggered()),
+ this, SLOT(on_trigger_falling()));
+
+ _trigger_low = new QAction(QIcon(":/icons/trigger-low.svg"),
+ tr("Trigger on low level"), this);
+ _trigger_low->setCheckable(true);
+ connect(_trigger_low, SIGNAL(triggered()),
+ this, SLOT(on_trigger_low()));
+
+ _trigger_change = new QAction(QIcon(":/icons/trigger-change.svg"),
+ tr("Trigger on rising or falling edge"), this);
+ _trigger_change->setCheckable(true);
+ connect(_trigger_change, SIGNAL(triggered()),
+ this, SLOT(on_trigger_change()));
+}
+
+const list<QAction*> LogicSignal::get_context_bar_actions()