projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RowItem: Replaced fixed signal heights with extents
[pulseview.git]
/
pv
/
view
/
viewport.cpp
diff --git
a/pv/view/viewport.cpp
b/pv/view/viewport.cpp
index 221714051504a81a7e48b47056217d98f67e05cb..82d13c92b985985efa7c9033760d80307c181bb6 100644
(file)
--- a/
pv/view/viewport.cpp
+++ b/
pv/view/viewport.cpp
@@
-52,19
+52,17
@@
Viewport::Viewport(View &parent) :
setAutoFillBackground(true);
setBackgroundRole(QPalette::Base);
setAutoFillBackground(true);
setBackgroundRole(QPalette::Base);
- connect(&_view.session(), SIGNAL(signals_changed()),
- this, SLOT(on_signals_changed()));
-
connect(&_view, SIGNAL(signals_moved()),
this, SLOT(on_signals_moved()));
}
connect(&_view, SIGNAL(signals_moved()),
this, SLOT(on_signals_moved()));
}
-int Viewport::get_total_height() const
+void Viewport::signals_updated()
{
{
- int h = 0;
- for (auto &i : _view)
- h = max(i->v_offset() + View::SignalHeight, h);
- return h;
+ for (shared_ptr<RowItem> r : _view) {
+ assert(r);
+ connect(r.get(), SIGNAL(appearance_changed()),
+ this, SLOT(update()));
+ }
}
void Viewport::paintEvent(QPaintEvent*)
}
void Viewport::paintEvent(QPaintEvent*)
@@
-225,15
+223,6
@@
bool Viewport::touchEvent(QTouchEvent *event)
return true;
}
return true;
}
-void Viewport::on_signals_changed()
-{
- for (shared_ptr<RowItem> r : _view) {
- assert(r);
- connect(r.get(), SIGNAL(appearance_changed()),
- this, SLOT(update()));
- }
-}
-
void Viewport::on_signals_moved()
{
update();
void Viewport::on_signals_moved()
{
update();