projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make traces only selectable in the header area
[pulseview.git]
/
pv
/
view
/
signal.cpp
diff --git
a/pv/view/signal.cpp
b/pv/view/signal.cpp
index 9f97d5bca7194562f40d4939b77e47f46e19502b..09a6da8f17a3d7b9b2377cfa0dc1a251e454edde 100644
(file)
--- a/
pv/view/signal.cpp
+++ b/
pv/view/signal.cpp
@@
-35,6
+35,7
@@
#include "view.hpp"
using std::shared_ptr;
#include "view.hpp"
using std::shared_ptr;
+using std::make_shared;
using sigrok::Channel;
using sigrok::Channel;
@@
-63,6
+64,8
@@
Signal::Signal(pv::Session &session,
Trace(QString::fromUtf8(channel->name().c_str())),
session_(session),
channel_(channel),
Trace(QString::fromUtf8(channel->name().c_str())),
session_(session),
channel_(channel),
+ scale_handle_(make_shared<SignalScaleHandle>(*this)),
+ items_({scale_handle_}),
name_widget_(nullptr),
updating_name_widget_(false)
{
name_widget_(nullptr),
updating_name_widget_(false)
{
@@
-99,13
+102,24
@@
shared_ptr<Channel> Signal::channel() const
return channel_;
}
return channel_;
}
+const ViewItemOwner::item_list& Signal::child_items() const
+{
+ return items_;
+}
+
+void Signal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+{
+ if (channel_->enabled())
+ Trace::paint_back(p, pp);
+}
+
void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
{
name_widget_ = new QComboBox(parent);
name_widget_->setEditable(true);
name_widget_->setCompleter(0);
void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
{
name_widget_ = new QComboBox(parent);
name_widget_->setEditable(true);
name_widget_->setCompleter(0);
- for(unsigned int i = 0; i < countof(ChannelNames); i++)
+ for
(unsigned int i = 0; i < countof(ChannelNames); i++)
name_widget_->insertItem(i, ChannelNames[i]);
const int index = name_widget_->findText(name_, Qt::MatchExactly);
name_widget_->insertItem(i, ChannelNames[i]);
const int index = name_widget_->findText(name_, Qt::MatchExactly);