From aa5e914074b759c82974d1096f22164481eec006 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sun, 23 Nov 2014 17:59:00 +0000 Subject: [PATCH] LogicSignal: Renamed action_match and match_action --- pv/view/logicsignal.cpp | 10 +++++----- pv/view/logicsignal.hpp | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index e33c197a..aa581d0a 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -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(); } diff --git a/pv/view/logicsignal.hpp b/pv/view/logicsignal.hpp index 0d422d7c..30dea6f4 100644 --- a/pv/view/logicsignal.hpp +++ b/pv/view/logicsignal.hpp @@ -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(); -- 2.30.2