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()));
-
- // Trigger the initial event manually. The default device has signals
- // which were created before this object came into being
- on_signals_changed();
}
-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*)
return true;
}
-void Viewport::on_signals_changed()
-{
- for (shared_ptr<RowItem> r : _view) {
- assert(r);
- connect(r.get(), SIGNAL(visibility_changed()),
- this, SLOT(update()));
- }
-}
-
void Viewport::on_signals_moved()
{
update();