]> sigrok.org Git - pulseview.git/commitdiff
LogicSignal: Renamed action_match and match_action
authorJoel Holdsworth <redacted>
Sun, 23 Nov 2014 17:59:00 +0000 (17:59 +0000)
committerJoel Holdsworth <redacted>
Sun, 23 Nov 2014 17:59:00 +0000 (17:59 +0000)
pv/view/logicsignal.cpp
pv/view/logicsignal.hpp

index e33c197a7be7ce31696c0465b82dd9cd4794f5c3..aa581d0a4955351c0738b00ba0fb396c9da3eb64 100644 (file)
@@ -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;
@@ -341,7 +341,7 @@ void LogicSignal::populate_popup_form(QWidget *parent, QFormLayout *form)
        for (auto type_id : trig_types) {
                const TriggerMatchType *const type =
                        TriggerMatchType::get(type_id);
-               QAction *const action = match_action(type);
+               QAction *const action = action_from_trigger_type(type);
                trigger_bar_->addAction(action);
                action->setChecked(trigger_match_ == type);
        }
@@ -382,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();
 }
index 0d422d7ce5b1534ef47b1b620f7b6f1d35d7ad5a..30dea6f4fb39c9d271c7448d44d52d2713d491ca 100644 (file)
@@ -98,8 +98,10 @@ private:
 
        void init_trigger_actions(QWidget *parent);
 
-       QAction* match_action(const sigrok::TriggerMatchType *match);
-       const sigrok::TriggerMatchType *action_match(QAction *action);
+       QAction* action_from_trigger_type(
+               const sigrok::TriggerMatchType *match);
+       const sigrok::TriggerMatchType* trigger_type_from_action(
+               QAction *action);
        void populate_popup_form(QWidget *parent, QFormLayout *form);
        void modify_trigger();