LogicSignal: Renamed action_match and match_action
[pulseview.git] / pv / view / logicsignal.cpp
index 5beb39df4fa6b4f126686b97aec6d35ecab731a2..aa581d0a4955351c0738b00ba0fb396c9da3eb64 100644 (file)
@@ -82,7 +82,7 @@ const QColor LogicSignal::SignalColours[10] = {
 };
 
 LogicSignal::LogicSignal(
-       pv::SigSession &session,
+       pv::Session &session,
        shared_ptr<Device> device,
        shared_ptr<Channel> channel,
        shared_ptr<data::Logic> 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<Glib::Variant<vector<int32_t>>>(
                        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();
 }