]> sigrok.org Git - pulseview.git/commitdiff
Derrived TimeMarker from SelectableItem
authorJoel Holdsworth <redacted>
Sun, 12 May 2013 16:02:21 +0000 (17:02 +0100)
committerJoel Holdsworth <redacted>
Sun, 19 May 2013 08:46:00 +0000 (09:46 +0100)
CMakeLists.txt
pv/view/selectableitem.h
pv/view/signal.h
pv/view/timemarker.cpp
pv/view/timemarker.h

index 9714d68c696f91631c6b38e0b5ecb1aa1623c537..6552df173e9b5481f0cafc3b6e9d7a10642543fd 100644 (file)
@@ -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
index 4bbd1f6993d6813ed6f7016b5029bdf083b46549..d54491370bd769a588c82ff544f58d13fb1112cd 100644 (file)
 
 #include <list>
 
+#include <QObject>
+
 class QAction;
 
 namespace pv {
 namespace view {
 
-class SelectableItem
+class SelectableItem : public QObject
 {
+       Q_OBJECT
+
 };
 
 } // namespace view
index 3a7a103df0ecbae171f6ad47ea67791ba8c48525..69c1f09cfd225ba67bb9fcc60ea1d95e3681cfbd 100644 (file)
@@ -45,6 +45,8 @@ namespace view {
 
 class Signal : public SelectableItem
 {
+       Q_OBJECT
+
 private:
        static const int LabelHitPadding;
        static const int LabelHighlightRadius;
index 8474791d485a31f888b1b68aa47b5b98617425c8..ec0ab9a4fe4f59857e47e0fcc7443747e3039a1c 100644 (file)
@@ -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)
index 3c9198899a7ec1b0ea7eeacf073eabfc873f636d..37e10a3f0e386e14feb688193bed686c99c60e6b 100644 (file)
@@ -25,6 +25,8 @@
 #include <QObject>
 #include <QRectF>
 
+#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