header_(new Header(*this)),
scale_(1e-6),
offset_(0),
- v_offset_(0),
updating_scroll_(false),
tick_period_(0.0),
tick_prefix_(0),
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)),
this, SLOT(h_scroll_value_changed(int)));
connect(verticalScrollBar(), SIGNAL(valueChanged(int)),
- this, SLOT(v_scroll_value_changed(int)));
+ this, SLOT(v_scroll_value_changed()));
connect(&session_, SIGNAL(signals_changed()),
this, SLOT(signals_changed()));
int View::owner_visual_v_offset() const
{
- return -v_offset_;
+ return -verticalScrollBar()->sliderPosition();
}
unsigned int View::depth() const
viewport_->update();
}
-void View::v_scroll_value_changed(int value)
+void View::v_scroll_value_changed()
{
- v_offset_ = value;
header_->update();
viewport_->update();
}
* seconds.
*/
double offset() const;
+
+ /**
+ * Returns the vertical scroll offset.
+ */
int owner_visual_v_offset() const;
/**
private Q_SLOTS:
void h_scroll_value_changed(int value);
- void v_scroll_value_changed(int value);
+ void v_scroll_value_changed();
void signals_changed();
void data_updated();
/// The view time offset in seconds.
double offset_;
- int v_offset_;
bool updating_scroll_;
double tick_period_;