From: Joel Holdsworth Date: Sun, 12 May 2013 16:02:21 +0000 (+0100) Subject: Derrived TimeMarker from SelectableItem X-Git-Tag: pulseview-0.2.0~357 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2a2512b21581ea346fea7d96bd3deeb37f1cfed4;p=pulseview.git Derrived TimeMarker from SelectableItem --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9714d68c..6552df17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,8 @@ set(pulseview_HEADERS pv/view/cursor.h pv/view/header.h pv/view/ruler.h + pv/view/selectableitem.h + pv/view/signal.h pv/view/timemarker.h pv/view/view.h pv/view/viewport.h diff --git a/pv/view/selectableitem.h b/pv/view/selectableitem.h index 4bbd1f69..d5449137 100644 --- a/pv/view/selectableitem.h +++ b/pv/view/selectableitem.h @@ -23,13 +23,17 @@ #include +#include + class QAction; namespace pv { namespace view { -class SelectableItem +class SelectableItem : public QObject { + Q_OBJECT + }; } // namespace view diff --git a/pv/view/signal.h b/pv/view/signal.h index 3a7a103d..69c1f09c 100644 --- a/pv/view/signal.h +++ b/pv/view/signal.h @@ -45,6 +45,8 @@ namespace view { class Signal : public SelectableItem { + Q_OBJECT + private: static const int LabelHitPadding; static const int LabelHighlightRadius; diff --git a/pv/view/timemarker.cpp b/pv/view/timemarker.cpp index 8474791d..ec0ab9a4 100644 --- a/pv/view/timemarker.cpp +++ b/pv/view/timemarker.cpp @@ -36,7 +36,6 @@ TimeMarker::TimeMarker(const View &view, const QColor &colour, } TimeMarker::TimeMarker(const TimeMarker &s) : - QObject(), _view(s._view), _colour(s._colour), _time(s._time) diff --git a/pv/view/timemarker.h b/pv/view/timemarker.h index 3c919889..37e10a3f 100644 --- a/pv/view/timemarker.h +++ b/pv/view/timemarker.h @@ -25,6 +25,8 @@ #include #include +#include "selectableitem.h" + class QPainter; class QRect; @@ -33,7 +35,7 @@ namespace view { class View; -class TimeMarker : public QObject +class TimeMarker : public SelectableItem { Q_OBJECT