projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf0edd2
)
Rename Trace::channel_ to Trace::base_, including dependencies
author
Soeren Apel
<soeren@apelpie.net>
Tue, 16 Aug 2016 19:10:40 +0000
(21:10 +0200)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Thu, 18 Aug 2016 22:36:02 +0000
(
00:36
+0200)
14 files changed:
pv/data/decode/decoder.cpp
patch
|
blob
|
history
pv/popups/channels.cpp
patch
|
blob
|
history
pv/session.cpp
patch
|
blob
|
history
pv/storesession.cpp
patch
|
blob
|
history
pv/view/analogsignal.cpp
patch
|
blob
|
history
pv/view/analogsignal.hpp
patch
|
blob
|
history
pv/view/decodetrace.cpp
patch
|
blob
|
history
pv/view/logicsignal.cpp
patch
|
blob
|
history
pv/view/logicsignal.hpp
patch
|
blob
|
history
pv/view/signal.cpp
patch
|
blob
|
history
pv/view/signal.hpp
patch
|
blob
|
history
pv/view/trace.cpp
patch
|
blob
|
history
pv/view/trace.hpp
patch
|
blob
|
history
pv/view/view.cpp
patch
|
blob
|
history
diff --git
a/pv/data/decode/decoder.cpp
b/pv/data/decode/decoder.cpp
index 1513b20be5cb70156db3dfe33c43c8c0e4fd594b..bd1d307fb5d00006bb4aa01d611d37467c681b82 100644
(file)
--- a/
pv/data/decode/decoder.cpp
+++ b/
pv/data/decode/decoder.cpp
@@
-137,7
+137,7
@@
srd_decoder_inst* Decoder::create_decoder_inst(srd_session *session) const
for (const auto& channel : channels_) {
shared_ptr<view::LogicSignal> signal(channel.second);
GVariant *const gvar = g_variant_new_int32(
for (const auto& channel : channels_) {
shared_ptr<view::LogicSignal> signal(channel.second);
GVariant *const gvar = g_variant_new_int32(
- signal->
channel
()->index());
+ signal->
base
()->index());
g_variant_ref_sink(gvar);
g_hash_table_insert(channels, channel.first->id, gvar);
}
g_variant_ref_sink(gvar);
g_hash_table_insert(channels, channel.first->id, gvar);
}
diff --git
a/pv/popups/channels.cpp
b/pv/popups/channels.cpp
index 7489b93f81b832d0f8bb64586155c75b7502556c..f8f94d1a4273534d09fbf9a2bb6766db518810c7 100644
(file)
--- a/
pv/popups/channels.cpp
+++ b/
pv/popups/channels.cpp
@@
-83,7
+83,7
@@
Channels::Channels(Session &session, QWidget *parent) :
unordered_set< shared_ptr<SignalBase> > sigs;
for (const shared_ptr<view::Signal> s : session_.signals())
unordered_set< shared_ptr<SignalBase> > sigs;
for (const shared_ptr<view::Signal> s : session_.signals())
- sigs.insert(s->
channel
());
+ sigs.insert(s->
base
());
for (const shared_ptr<SignalBase> &sig : sigs)
signal_map[sig->channel()] = sig;
for (const shared_ptr<SignalBase> &sig : sigs)
signal_map[sig->channel()] = sig;
diff --git
a/pv/session.cpp
b/pv/session.cpp
index 9c3a2c259e2a635f2eed79f5a8a607a9c33d490c..e1a1f010cf065dcad630f391161f819b5f494f0e 100644
(file)
--- a/
pv/session.cpp
+++ b/
pv/session.cpp
@@
-299,7
+299,7
@@
bool Session::add_decoder(srd_decoder *const dec)
dynamic_pointer_cast<view::LogicSignal>(s);
if (l && QString::fromUtf8(pdch->name).
toLower().contains(
dynamic_pointer_cast<view::LogicSignal>(s);
if (l && QString::fromUtf8(pdch->name).
toLower().contains(
- s->
channel
()->name().toLower()))
+ s->
base
()->name().toLower()))
channels[pdch] = l;
}
channels[pdch] = l;
}
@@
-412,7
+412,7
@@
void Session::update_signals()
const auto iter = std::find_if(
prev_sigs.cbegin(), prev_sigs.cend(),
[&](const shared_ptr<view::Signal> &s) {
const auto iter = std::find_if(
prev_sigs.cbegin(), prev_sigs.cend(),
[&](const shared_ptr<view::Signal> &s) {
- return s->
channel
()->channel() == channel;
+ return s->
base
()->channel() == channel;
});
if (iter != prev_sigs.end()) {
// Copy the signal from the old set to the new
});
if (iter != prev_sigs.end()) {
// Copy the signal from the old set to the new
diff --git
a/pv/storesession.cpp
b/pv/storesession.cpp
index f8ab2e69bc78c1a2ed985e86d176c662b56084d3..00f6af63ed0a9e1374e673bbc5adfb22e9db3b54 100644
(file)
--- a/
pv/storesession.cpp
+++ b/
pv/storesession.cpp
@@
-151,7
+151,7
@@
bool StoreSession::start()
asegment_list.push_back(asegments.front());
any_segment = asegments.front();
asegment_list.push_back(asegments.front());
any_segment = asegments.front();
- achannel_list.push_back(signal->
channel
());
+ achannel_list.push_back(signal->
base
());
}
}
}
}
diff --git
a/pv/view/analogsignal.cpp
b/pv/view/analogsignal.cpp
index 8ccad390eb4730ee8436d34007f133833579d329..cd57da06b6073e0143f3f859bad2b70a8120a426 100644
(file)
--- a/
pv/view/analogsignal.cpp
+++ b/
pv/view/analogsignal.cpp
@@
-71,9
+71,9
@@
const int AnalogSignal::InfoTextMarginBottom = 5;
AnalogSignal::AnalogSignal(
pv::Session &session,
AnalogSignal::AnalogSignal(
pv::Session &session,
- shared_ptr<data::SignalBase>
channel
,
+ shared_ptr<data::SignalBase>
base
,
shared_ptr<data::Analog> data) :
shared_ptr<data::Analog> data) :
- Signal(session,
channel
),
+ Signal(session,
base
),
data_(data),
scale_index_(4), // 20 per div
scale_index_drag_offset_(0),
data_(data),
scale_index_(4), // 20 per div
scale_index_drag_offset_(0),
@@
-81,7
+81,7
@@
AnalogSignal::AnalogSignal(
vdivs_(1),
resolution_(0)
{
vdivs_(1),
resolution_(0)
{
-
channel_->set_colour(SignalColours[channel
_->index() % countof(SignalColours)]);
+
base_->set_colour(SignalColours[base
_->index() % countof(SignalColours)]);
update_scale();
}
update_scale();
}
@@
-127,7
+127,7
@@
void AnalogSignal::scale_handle_drag_release()
void AnalogSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
void AnalogSignal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
- if (
channel
_->enabled()) {
+ if (
base
_->enabled()) {
Trace::paint_back(p, pp);
paint_axis(p, pp, get_visual_y());
}
Trace::paint_back(p, pp);
paint_axis(p, pp, get_visual_y());
}
@@
-140,7
+140,7
@@
void AnalogSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
const int y = get_visual_y();
const int y = get_visual_y();
- if (!
channel
_->enabled())
+ if (!
base
_->enabled())
return;
paint_grid(p, y, pp.left(), pp.right());
return;
paint_grid(p, y, pp.left(), pp.right());
@@
-186,7
+186,7
@@
void AnalogSignal::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
// Show the info section on the right side of the trace
const QString infotext = QString("%1 V/div").arg(resolution_);
// Show the info section on the right side of the trace
const QString infotext = QString("%1 V/div").arg(resolution_);
- p.setPen(
channel
_->colour());
+ p.setPen(
base
_->colour());
p.setFont(QApplication::font());
const QRectF bounding_rect = QRectF(pp.left(),
p.setFont(QApplication::font());
const QRectF bounding_rect = QRectF(pp.left(),
@@
-235,7
+235,7
@@
void AnalogSignal::paint_trace(QPainter &p,
const float *const samples = segment->get_samples(start, end);
assert(samples);
const float *const samples = segment->get_samples(start, end);
assert(samples);
- p.setPen(
channel
_->colour());
+ p.setPen(
base
_->colour());
QPointF *points = new QPointF[sample_count];
QPointF *point = points;
QPointF *points = new QPointF[sample_count];
QPointF *point = points;
@@
-267,7
+267,7
@@
void AnalogSignal::paint_envelope(QPainter &p,
return;
p.setPen(QPen(Qt::NoPen));
return;
p.setPen(QPen(Qt::NoPen));
- p.setBrush(
channel
_->colour());
+ p.setBrush(
base
_->colour());
QRectF *const rects = new QRectF[e.length];
QRectF *rect = rects;
QRectF *const rects = new QRectF[e.length];
QRectF *rect = rects;
diff --git
a/pv/view/analogsignal.hpp
b/pv/view/analogsignal.hpp
index 601ae110d0403fb9c54745dff5e156a030f9f828..f35fe79f1eb839ee719f452c3ca0183b4c7348ad 100644
(file)
--- a/
pv/view/analogsignal.hpp
+++ b/
pv/view/analogsignal.hpp
@@
-53,7
+53,7
@@
private:
public:
AnalogSignal(pv::Session &session,
public:
AnalogSignal(pv::Session &session,
- std::shared_ptr<data::SignalBase>
channel
,
+ std::shared_ptr<data::SignalBase>
base
,
std::shared_ptr<pv::data::Analog> data);
virtual ~AnalogSignal() = default;
std::shared_ptr<pv::data::Analog> data);
virtual ~AnalogSignal() = default;
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 3ece1303ca513e5d40b6bc0d49848aa66dbea56c..2d9a6bf82227a3b50f59c3fa746a216fcc5e3ef5 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-851,8
+851,8
@@
QComboBox* DecodeTrace::create_channel_selector(
vector< shared_ptr<Signal> > sig_list(sigs.begin(), sigs.end());
std::sort(sig_list.begin(), sig_list.end(),
[](const shared_ptr<Signal> &a, const shared_ptr<Signal> b) {
vector< shared_ptr<Signal> > sig_list(sigs.begin(), sigs.end());
std::sort(sig_list.begin(), sig_list.end(),
[](const shared_ptr<Signal> &a, const shared_ptr<Signal> b) {
- return strnatcasecmp(a->
channel
()->name().toStdString(),
- b->
channel
()->name().toStdString()) < 0; });
+ return strnatcasecmp(a->
base
()->name().toStdString(),
+ b->
base
()->name().toStdString()) < 0; });
assert(decoder_stack_);
const auto channel_iter = dec->channels().find(pdch);
assert(decoder_stack_);
const auto channel_iter = dec->channels().find(pdch);
@@
-867,7
+867,7
@@
QComboBox* DecodeTrace::create_channel_selector(
for (const shared_ptr<view::Signal> &s : sig_list) {
assert(s);
if (dynamic_pointer_cast<LogicSignal>(s) && s->enabled()) {
for (const shared_ptr<view::Signal> &s : sig_list) {
assert(s);
if (dynamic_pointer_cast<LogicSignal>(s) && s->enabled()) {
- selector->addItem(s->
channel
()->name(),
+ selector->addItem(s->
base
()->name(),
qVariantFromValue((void*)s.get()));
if (channel_iter != dec->channels().end() &&
qVariantFromValue((void*)s.get()));
if (channel_iter != dec->channels().end() &&
diff --git
a/pv/view/logicsignal.cpp
b/pv/view/logicsignal.cpp
index 7bb2ee0caebaa9803e51f56af205d80520491e21..52a2d22dab76050dfdf4345801dd74724dcf198b 100644
(file)
--- a/
pv/view/logicsignal.cpp
+++ b/
pv/view/logicsignal.cpp
@@
-99,9
+99,9
@@
QCache<QString, const QPixmap> LogicSignal::pixmap_cache_;
LogicSignal::LogicSignal(
pv::Session &session,
shared_ptr<devices::Device> device,
LogicSignal::LogicSignal(
pv::Session &session,
shared_ptr<devices::Device> device,
- shared_ptr<data::SignalBase>
channel
,
+ shared_ptr<data::SignalBase>
base
,
shared_ptr<data::Logic> data) :
shared_ptr<data::Logic> data) :
- Signal(session,
channel
),
+ Signal(session,
base
),
signal_height_(QFontMetrics(QApplication::font()).height() * 2),
device_(device),
data_(data),
signal_height_(QFontMetrics(QApplication::font()).height() * 2),
device_(device),
data_(data),
@@
-114,7
+114,7
@@
LogicSignal::LogicSignal(
{
shared_ptr<Trigger> trigger;
{
shared_ptr<Trigger> trigger;
-
channel_->set_colour(SignalColours[channel
->index() % countof(SignalColours)]);
+
base_->set_colour(SignalColours[base
->index() % countof(SignalColours)]);
/* Populate this channel's trigger setting with whatever we
* find in the current session trigger, if anything. */
/* Populate this channel's trigger setting with whatever we
* find in the current session trigger, if anything. */
@@
-122,7
+122,7
@@
LogicSignal::LogicSignal(
if ((trigger = session_.session()->trigger()))
for (auto stage : trigger->stages())
for (auto match : stage->matches())
if ((trigger = session_.session()->trigger()))
for (auto stage : trigger->stages())
for (auto match : stage->matches())
- if (match->channel() ==
channel
_->channel())
+ if (match->channel() ==
base
_->channel())
trigger_match_ = match->type();
}
trigger_match_ = match->type();
}
@@
-166,13
+166,13
@@
void LogicSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
vector< pair<int64_t, bool> > edges;
vector< pair<int64_t, bool> > edges;
- assert(
channel
_);
+ assert(
base
_);
assert(data_);
assert(owner_);
const int y = get_visual_y();
assert(data_);
assert(owner_);
const int y = get_visual_y();
- if (!
channel
_->enabled())
+ if (!
base
_->enabled())
return;
const float high_offset = y - signal_height_ + 0.5f;
return;
const float high_offset = y - signal_height_ + 0.5f;
@@
-205,7
+205,7
@@
void LogicSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
(int64_t)0), last_sample);
segment->get_subsampled_edges(edges, start_sample, end_sample,
(int64_t)0), last_sample);
segment->get_subsampled_edges(edges, start_sample, end_sample,
- samples_per_pixel / Oversampling,
channel
_->index());
+ samples_per_pixel / Oversampling,
base
_->index());
assert(edges.size() >= 2);
// Paint the edges
assert(edges.size() >= 2);
// Paint the edges
@@
-240,7
+240,7
@@
void LogicSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
void LogicSignal::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
{
// Draw the trigger marker
void LogicSignal::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
{
// Draw the trigger marker
- if (!trigger_match_ || !
channel
_->enabled())
+ if (!trigger_match_ || !
base
_->enabled())
return;
const int y = get_visual_y();
return;
const int y = get_visual_y();
@@
-430,12
+430,12
@@
void LogicSignal::modify_trigger()
const auto &matches = stage->matches();
if (std::none_of(matches.begin(), matches.end(),
[&](shared_ptr<TriggerMatch> match) {
const auto &matches = stage->matches();
if (std::none_of(matches.begin(), matches.end(),
[&](shared_ptr<TriggerMatch> match) {
- return match->channel() !=
channel
_->channel(); }))
+ return match->channel() !=
base
_->channel(); }))
continue;
auto new_stage = new_trigger->add_stage();
for (auto match : stage->matches()) {
continue;
auto new_stage = new_trigger->add_stage();
for (auto match : stage->matches()) {
- if (match->channel() ==
channel
_->channel())
+ if (match->channel() ==
base
_->channel())
continue;
new_stage->add_match(match->channel(), match->type());
}
continue;
new_stage->add_match(match->channel(), match->type());
}
@@
-449,7
+449,7
@@
void LogicSignal::modify_trigger()
if (new_trigger->stages().empty())
new_trigger->add_stage();
if (new_trigger->stages().empty())
new_trigger->add_stage();
- new_trigger->stages().back()->add_match(
channel
_->channel(),
+ new_trigger->stages().back()->add_match(
base
_->channel(),
trigger_match_);
}
trigger_match_);
}
diff --git
a/pv/view/logicsignal.hpp
b/pv/view/logicsignal.hpp
index 9bd91ba93a54eb6994f5569337921aa7580f472c..14eeed4baf82bbd272e390c46468d8e30d9b1dd8 100644
(file)
--- a/
pv/view/logicsignal.hpp
+++ b/
pv/view/logicsignal.hpp
@@
-66,7
+66,7
@@
private:
public:
LogicSignal(pv::Session &session,
std::shared_ptr<devices::Device> device,
public:
LogicSignal(pv::Session &session,
std::shared_ptr<devices::Device> device,
- std::shared_ptr<data::SignalBase>
channel
,
+ std::shared_ptr<data::SignalBase>
base
,
std::shared_ptr<pv::data::Logic> data);
virtual ~LogicSignal() = default;
std::shared_ptr<pv::data::Logic> data);
virtual ~LogicSignal() = default;
diff --git
a/pv/view/signal.cpp
b/pv/view/signal.cpp
index fc90eba1fcd11cf6f5b5d0e132895304b8cbc9f9..a8de4d504aaa36b0fdb9960fb4f5b72c5b2391ae 100644
(file)
--- a/
pv/view/signal.cpp
+++ b/
pv/view/signal.cpp
@@
-67,7
+67,7
@@
Signal::Signal(pv::Session &session,
items_({scale_handle_}),
name_widget_(nullptr)
{
items_({scale_handle_}),
name_widget_(nullptr)
{
- assert(
channel
_);
+ assert(
base
_);
}
void Signal::set_name(QString name)
}
void Signal::set_name(QString name)
@@
-80,20
+80,20
@@
void Signal::set_name(QString name)
bool Signal::enabled() const
{
bool Signal::enabled() const
{
- return
channel
_->enabled();
+ return
base
_->enabled();
}
void Signal::enable(bool enable)
{
}
void Signal::enable(bool enable)
{
-
channel
_->set_enabled(enable);
+
base
_->set_enabled(enable);
if (owner_)
owner_->extents_changed(true, true);
}
if (owner_)
owner_->extents_changed(true, true);
}
-shared_ptr<data::SignalBase> Signal::
channel
() const
+shared_ptr<data::SignalBase> Signal::
base
() const
{
{
- return
channel
_;
+ return
base
_;
}
const ViewItemOwner::item_list& Signal::child_items() const
}
const ViewItemOwner::item_list& Signal::child_items() const
@@
-103,7
+103,7
@@
const ViewItemOwner::item_list& Signal::child_items() const
void Signal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
void Signal::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
- if (
channel
_->enabled())
+ if (
base
_->enabled())
Trace::paint_back(p, pp);
}
Trace::paint_back(p, pp);
}
@@
-116,10
+116,10
@@
void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
for (unsigned int i = 0; i < countof(ChannelNames); i++)
name_widget_->insertItem(i, ChannelNames[i]);
for (unsigned int i = 0; i < countof(ChannelNames); i++)
name_widget_->insertItem(i, ChannelNames[i]);
- const int index = name_widget_->findText(
channel
_->name(), Qt::MatchExactly);
+ const int index = name_widget_->findText(
base
_->name(), Qt::MatchExactly);
if (index == -1) {
if (index == -1) {
- name_widget_->insertItem(0,
channel
_->name());
+ name_widget_->insertItem(0,
base
_->name());
name_widget_->setCurrentIndex(0);
} else {
name_widget_->setCurrentIndex(index);
name_widget_->setCurrentIndex(0);
} else {
name_widget_->setCurrentIndex(index);
diff --git
a/pv/view/signal.hpp
b/pv/view/signal.hpp
index 36d87d4594d0a6def78eb2f29daeb1c42408ace4..72c97e1d00c6f1720cc5cebabfbb38ee05b7f0a9 100644
(file)
--- a/
pv/view/signal.hpp
+++ b/
pv/view/signal.hpp
@@
-66,7
+66,7
@@
public:
void enable(bool enable = true);
void enable(bool enable = true);
- std::shared_ptr<data::SignalBase>
channel
() const;
+ std::shared_ptr<data::SignalBase>
base
() const;
/**
* Returns a list of row items owned by this object.
/**
* Returns a list of row items owned by this object.
diff --git
a/pv/view/trace.cpp
b/pv/view/trace.cpp
index d6a4fec6045ad1bf21ee3dd5ee3d01685d43c47c..d9cccdb649e94a0669be4d30084323341cc5077d 100644
(file)
--- a/
pv/view/trace.cpp
+++ b/
pv/view/trace.cpp
@@
-45,7
+45,7
@@
const QColor Trace::BrightGrayBGColour = QColor(0, 0, 0, 10*255/100);
const QColor Trace::DarkGrayBGColour = QColor(0, 0, 0, 15*255/100);
Trace::Trace(std::shared_ptr<data::SignalBase> channel) :
const QColor Trace::DarkGrayBGColour = QColor(0, 0, 0, 15*255/100);
Trace::Trace(std::shared_ptr<data::SignalBase> channel) :
-
channel
_(channel),
+
base
_(channel),
coloured_bg_(true), // Default setting is set in MainWindow::setup_ui()
popup_(nullptr),
popup_form_(nullptr)
coloured_bg_(true), // Default setting is set in MainWindow::setup_ui()
popup_(nullptr),
popup_form_(nullptr)
@@
-65,7
+65,7
@@
void Trace::paint_label(QPainter &p, const QRect &rect, bool hover)
{
const int y = get_visual_y();
{
const int y = get_visual_y();
- p.setBrush(
channel
_->colour());
+ p.setBrush(
base
_->colour());
if (!enabled())
return;
if (!enabled())
return;
@@
-96,23
+96,23
@@
void Trace::paint_label(QPainter &p, const QRect &rect, bool hover)
}
p.setPen(Qt::transparent);
}
p.setPen(Qt::transparent);
- p.setBrush(hover ?
channel_->colour().lighter() : channel
_->colour());
+ p.setBrush(hover ?
base_->colour().lighter() : base
_->colour());
p.drawPolygon(points, countof(points));
p.drawPolygon(points, countof(points));
- p.setPen(
channel
_->colour().lighter());
+ p.setPen(
base
_->colour().lighter());
p.setBrush(Qt::transparent);
p.drawPolygon(highlight_points, countof(highlight_points));
p.setBrush(Qt::transparent);
p.drawPolygon(highlight_points, countof(highlight_points));
- p.setPen(
channel
_->colour().darker());
+ p.setPen(
base
_->colour().darker());
p.setBrush(Qt::transparent);
p.drawPolygon(points, countof(points));
// Paint the text
p.setBrush(Qt::transparent);
p.drawPolygon(points, countof(points));
// Paint the text
- p.setPen(select_text_colour(
channel
_->colour()));
+ p.setPen(select_text_colour(
base
_->colour()));
p.setFont(QApplication::font());
p.drawText(QRectF(r.x(), r.y(),
r.width() - label_arrow_length, r.height()),
p.setFont(QApplication::font());
p.drawText(QRectF(r.x(), r.y(),
r.width() - label_arrow_length, r.height()),
- Qt::AlignCenter | Qt::AlignVCenter,
channel
_->name());
+ Qt::AlignCenter | Qt::AlignVCenter,
base
_->name());
}
QMenu* Trace::create_context_menu(QWidget *parent)
}
QMenu* Trace::create_context_menu(QWidget *parent)
@@
-144,7
+144,7
@@
QRectF Trace::label_rect(const QRectF &rect) const
QFontMetrics m(QApplication::font());
const QSize text_size(
QFontMetrics m(QApplication::font());
const QSize text_size(
- m.boundingRect(QRect(), 0,
channel
_->name()).width(), m.height());
+ m.boundingRect(QRect(), 0,
base
_->name()).width(), m.height());
const QSizeF label_size(
text_size.width() + LabelPadding.width() * 2,
ceilf((text_size.height() + LabelPadding.height() * 2) / 2) * 2);
const QSizeF label_size(
text_size.width() + LabelPadding.width() * 2,
ceilf((text_size.height() + LabelPadding.height() * 2) / 2) * 2);
@@
-159,7
+159,7
@@
QRectF Trace::label_rect(const QRectF &rect) const
void Trace::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
if (coloured_bg_)
void Trace::paint_back(QPainter &p, const ViewItemPaintParams &pp)
{
if (coloured_bg_)
- p.setBrush(
channel
_->bgcolour());
+ p.setBrush(
base
_->bgcolour());
else
p.setBrush(bgcolour_state_ ? BrightGrayBGColour : DarkGrayBGColour);
else
p.setBrush(bgcolour_state_ ? BrightGrayBGColour : DarkGrayBGColour);
@@
-192,7
+192,7
@@
void Trace::add_colour_option(QWidget *parent, QFormLayout *form)
ColourButton *const colour_button = new ColourButton(
TracePalette::Rows, TracePalette::Cols, parent);
colour_button->set_palette(TracePalette::Colours);
ColourButton *const colour_button = new ColourButton(
TracePalette::Rows, TracePalette::Cols, parent);
colour_button->set_palette(TracePalette::Colours);
- colour_button->set_colour(
channel
_->colour());
+ colour_button->set_colour(
base
_->colour());
connect(colour_button, SIGNAL(selected(const QColor&)),
this, SLOT(on_colouredit_changed(const QColor&)));
connect(colour_button, SIGNAL(selected(const QColor&)),
this, SLOT(on_colouredit_changed(const QColor&)));
@@
-222,7
+222,7
@@
void Trace::create_popup_form()
void Trace::populate_popup_form(QWidget *parent, QFormLayout *form)
{
QLineEdit *const name_edit = new QLineEdit(parent);
void Trace::populate_popup_form(QWidget *parent, QFormLayout *form)
{
QLineEdit *const name_edit = new QLineEdit(parent);
- name_edit->setText(
channel
_->name());
+ name_edit->setText(
base
_->name());
connect(name_edit, SIGNAL(textChanged(const QString&)),
this, SLOT(on_nameedit_changed(const QString&)));
form->addRow(tr("Name"), name_edit);
connect(name_edit, SIGNAL(textChanged(const QString&)),
this, SLOT(on_nameedit_changed(const QString&)));
form->addRow(tr("Name"), name_edit);
@@
-232,12
+232,12
@@
void Trace::populate_popup_form(QWidget *parent, QFormLayout *form)
void Trace::set_name(QString name)
{
void Trace::set_name(QString name)
{
-
channel
_->set_name(name);
+
base
_->set_name(name);
}
void Trace::set_colour(QColor colour)
{
}
void Trace::set_colour(QColor colour)
{
-
channel
_->set_colour(colour);
+
base
_->set_colour(colour);
}
void Trace::on_name_changed(const QString &text)
}
void Trace::on_name_changed(const QString &text)
diff --git
a/pv/view/trace.hpp
b/pv/view/trace.hpp
index 397ec7c0d108380719d13313114eb6d9553dafd8..0a6735f59d0787539fec1ef1cdac4e5eb91c645c 100644
(file)
--- a/
pv/view/trace.hpp
+++ b/
pv/view/trace.hpp
@@
-127,7
+127,7
@@
private Q_SLOTS:
void on_colouredit_changed(const QColor &colour);
protected:
void on_colouredit_changed(const QColor &colour);
protected:
- std::shared_ptr<data::SignalBase>
channel
_;
+ std::shared_ptr<data::SignalBase>
base
_;
bool coloured_bg_, coloured_bg_state_;
private:
bool coloured_bg_, coloured_bg_state_;
private:
diff --git
a/pv/view/view.cpp
b/pv/view/view.cpp
index e7308ddf69f0586064b0112e2586d07eab423957..570e7b766a4c80f980e5feb5e9417f0c12b3d0b9 100644
(file)
--- a/
pv/view/view.cpp
+++ b/
pv/view/view.cpp
@@
-976,7
+976,7
@@
void View::signals_changed()
unordered_map<shared_ptr<data::SignalBase>, shared_ptr<Signal> >
signal_map;
for (const shared_ptr<Signal> &sig : sigs)
unordered_map<shared_ptr<data::SignalBase>, shared_ptr<Signal> >
signal_map;
for (const shared_ptr<Signal> &sig : sigs)
- signal_map[sig->
channel
()] = sig;
+ signal_map[sig->
base
()] = sig;
// Populate channel groups
if (sr_dev)
// Populate channel groups
if (sr_dev)