#include <QFormLayout>
#include <QToolBar>
-#include "logicsignal.h"
-#include "view.h"
+#include "logicsignal.hpp"
+#include "view.hpp"
-#include <pv/sigsession.h>
-#include <pv/devicemanager.h>
-#include <pv/data/logic.h>
-#include <pv/data/logicsnapshot.h>
-#include <pv/view/view.h>
+#include <pv/sigsession.hpp>
+#include <pv/devicemanager.hpp>
+#include <pv/data/logic.hpp>
+#include <pv/data/logicsnapshot.hpp>
+#include <pv/view/view.hpp>
#include <libsigrok/libsigrok.hpp>
};
LogicSignal::LogicSignal(
- pv::SigSession &session,
+ pv::Session &session,
shared_ptr<Device> device,
shared_ptr<Channel> channel,
shared_ptr<data::Logic> data) :
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;
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;
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_);
{
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();
}