From: Joel Holdsworth Date: Sat, 18 May 2013 17:33:05 +0000 (+0100) Subject: Made TimeMarker::_view a non-const reference X-Git-Tag: pulseview-0.2.0~345 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8debe10dd47a5f519cd6e9069231f8e77c9c04e1;p=pulseview.git Made TimeMarker::_view a non-const reference --- diff --git a/pv/view/cursor.cpp b/pv/view/cursor.cpp index 6eb575e3..1b30518e 100644 --- a/pv/view/cursor.cpp +++ b/pv/view/cursor.cpp @@ -47,7 +47,7 @@ const int Cursor::Offset = 1; const int Cursor::ArrowSize = 4; -Cursor::Cursor(const View &view, double time) : +Cursor::Cursor(View &view, double time) : TimeMarker(view, LineColour, time) { } diff --git a/pv/view/cursor.h b/pv/view/cursor.h index 89ea1e71..290365e8 100644 --- a/pv/view/cursor.h +++ b/pv/view/cursor.h @@ -52,7 +52,7 @@ public: * @param view A reference to the view that owns this cursor pair. * @param time The time to set the flag to. */ - Cursor(const View &view, double time); + Cursor(View &view, double time); public: /** diff --git a/pv/view/cursorpair.cpp b/pv/view/cursorpair.cpp index 70c7bac9..83e6f733 100644 --- a/pv/view/cursorpair.cpp +++ b/pv/view/cursorpair.cpp @@ -33,7 +33,7 @@ namespace view { const int CursorPair::DeltaPadding = 8; -CursorPair::CursorPair(const View &view) : +CursorPair::CursorPair(View &view) : _first(new Cursor(view, 0.0)), _second(new Cursor(view, 1.0)), _view(view) diff --git a/pv/view/cursorpair.h b/pv/view/cursorpair.h index 2e70f7da..815276e2 100644 --- a/pv/view/cursorpair.h +++ b/pv/view/cursorpair.h @@ -42,7 +42,7 @@ public: * Constructor. * @param view A reference to the view that owns this cursor pair. */ - CursorPair(const View &view); + CursorPair(View &view); /** * Returns a pointer to the first cursor. diff --git a/pv/view/timemarker.cpp b/pv/view/timemarker.cpp index 9d4c43c2..5db9e9fe 100644 --- a/pv/view/timemarker.cpp +++ b/pv/view/timemarker.cpp @@ -29,8 +29,7 @@ using namespace std; namespace pv { namespace view { -TimeMarker::TimeMarker(const View &view, const QColor &colour, - double time) : +TimeMarker::TimeMarker(View &view, const QColor &colour, double time) : _view(view), _colour(colour), _time(time) diff --git a/pv/view/timemarker.h b/pv/view/timemarker.h index 8d8ae162..f12fa296 100644 --- a/pv/view/timemarker.h +++ b/pv/view/timemarker.h @@ -46,7 +46,7 @@ protected: * @param colour A reference to the colour of this cursor. * @param time The time to set the flag to. */ - TimeMarker(const View &view, const QColor &colour, double time); + TimeMarker(View &view, const QColor &colour, double time); public: /** @@ -92,7 +92,7 @@ signals: void time_changed(); protected: - const View &_view; + View &_view; const QColor &_colour; double _time;