connect(view_, SIGNAL(always_zoom_to_fit_changed(bool)),
this, SLOT(on_always_zoom_to_fit_changed(bool)));
+ connect(view_, SIGNAL(cursor_state_changed(bool)),
+ this, SLOT(on_cursor_state_changed(bool)));
+
if (add_default_widgets)
add_toolbar_widgets();
}
void StandardBar::on_actionViewShowCursors_triggered()
{
- const bool show = !view_->cursors_shown();
+ const bool show = action_view_show_cursors_->isChecked();
+
if (show)
view_->centre_cursors();
}
}
+void StandardBar::on_cursor_state_changed(bool show)
+{
+ action_view_show_cursors_->setChecked(show);
+}
+
} // namespace trace
} // namespace views
} // namespace pv
void on_actionViewZoomOneToOne_triggered();
void on_actionViewShowCursors_triggered();
+ void on_cursor_state_changed(bool show);
void on_actionSDMLast_triggered();
void on_actionSDMLastComplete_triggered();
suppress_zoom_to_fit_after_acq_ = false;
show_cursors_ = false;
+ cursor_state_changed(show_cursors_);
flags_.clear();
// Update the zoom state
void View::show_cursors(bool show)
{
show_cursors_ = show;
+ cursor_state_changed(show);
ruler_->update();
viewport_->update();
}
/// @param mode is a value of Trace::SegmentDisplayMode
void segment_display_mode_changed(int mode, bool segment_selectable);
+ /// Emitted when the cursors are shown/hidden
+ void cursor_state_changed(bool show);
+
public Q_SLOTS:
void trigger_event(int segment_id, util::Timestamp location);