X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Flogicsignal.cpp;h=aa581d0a4955351c0738b00ba0fb396c9da3eb64;hb=aa5e914074b759c82974d1096f22164481eec006;hp=5beb39df4fa6b4f126686b97aec6d35ecab731a2;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329;p=pulseview.git diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 5beb39d..aa581d0 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -82,7 +82,7 @@ const QColor LogicSignal::SignalColours[10] = { }; LogicSignal::LogicSignal( - pv::SigSession &session, + pv::Session &session, shared_ptr device, shared_ptr channel, shared_ptr data) : @@ -272,7 +272,7 @@ void LogicSignal::init_trigger_actions(QWidget *parent) connect(trigger_change_, SIGNAL(triggered()), this, SLOT(on_trigger())); } -QAction* LogicSignal::match_action(const TriggerMatchType *type) +QAction* LogicSignal::action_from_trigger_type(const TriggerMatchType *type) { QAction *action; @@ -302,7 +302,7 @@ QAction* LogicSignal::match_action(const TriggerMatchType *type) return action; } -const TriggerMatchType *LogicSignal::action_match(QAction *action) +const TriggerMatchType *LogicSignal::trigger_type_from_action(QAction *action) { if (action == trigger_low_) return TriggerMatchType::ZERO; @@ -339,9 +339,11 @@ void LogicSignal::populate_popup_form(QWidget *parent, QFormLayout *form) Glib::VariantBase::cast_dynamic>>( gvar).get(); for (auto type_id : trig_types) { - auto type = TriggerMatchType::get(type_id); - trigger_bar_->addAction(match_action(type)); - match_action(type)->setChecked(trigger_match_ == type); + const TriggerMatchType *const type = + TriggerMatchType::get(type_id); + QAction *const action = action_from_trigger_type(type); + trigger_bar_->addAction(action); + action->setChecked(trigger_match_ == type); } form->addRow(tr("Trigger"), trigger_bar_); @@ -380,11 +382,11 @@ void LogicSignal::on_trigger() { QAction *action; - match_action(trigger_match_)->setChecked(false); + action_from_trigger_type(trigger_match_)->setChecked(false); action = (QAction *)sender(); action->setChecked(true); - trigger_match_ = action_match(action); + trigger_match_ = trigger_type_from_action(action); modify_trigger(); }