setFocusPolicy(Qt::ClickFocus);
setMouseTracking(true);
- connect(&_view.session(), SIGNAL(signals_changed()),
- this, SLOT(on_signals_changed()));
-
connect(&_view, SIGNAL(signals_moved()),
this, SLOT(on_signals_moved()));
}
update();
}
+void Header::signals_updated()
+{
+ for (shared_ptr<RowItem> r : _view) {
+ assert(r);
+ connect(r.get(), SIGNAL(appearance_changed()),
+ this, SLOT(on_trace_changed()));
+ }
+}
+
void Header::show_popup(const shared_ptr<RowItem> &item)
{
using pv::widgets::Popup;
}
}
-void Header::on_signals_changed()
-{
- for (shared_ptr<RowItem> r : _view) {
- assert(r);
- connect(r.get(), SIGNAL(visibility_changed()),
- this, SLOT(on_trace_changed()));
- connect(r.get(), SIGNAL(text_changed()),
- this, SLOT(on_trace_changed()));
- connect(r.get(), SIGNAL(colour_changed()),
- this, SLOT(update()));
- }
-}
-
void Header::on_signals_moved()
{
update();
*/
static const int BaselineOffset;
+ void signals_updated();
+
private:
std::shared_ptr<pv::view::RowItem> get_mouse_over_row_item(
const QPoint &pt);
void keyPressEvent(QKeyEvent *e);
private Q_SLOTS:
- void on_signals_changed();
-
void on_signals_moved();
void on_trace_changed();
update_layout();
normalize_layout();
+
+ // Update the child widgets
+ _header->signals_updated();
+ _viewport->signals_updated();
}
void View::data_updated()
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()));
}
return h;
}
+void Viewport::signals_updated()
+{
+ for (shared_ptr<RowItem> r : _view) {
+ assert(r);
+ connect(r.get(), SIGNAL(appearance_changed()),
+ this, SLOT(update()));
+ }
+}
+
void Viewport::paintEvent(QPaintEvent*)
{
vector< shared_ptr<RowItem> > row_items(_view.begin(), _view.end());
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();
int get_total_height() const;
+ void signals_updated();
+
protected:
void paintEvent(QPaintEvent *event);
bool touchEvent(QTouchEvent *e);
private Q_SLOTS:
- void on_signals_changed();
void on_signals_moved();
private: