]> sigrok.org Git - pulseview.git/commitdiff
Added get_context_bar_actions
authorJoel Holdsworth <redacted>
Sun, 12 May 2013 20:34:30 +0000 (21:34 +0100)
committerJoel Holdsworth <redacted>
Sun, 19 May 2013 08:46:00 +0000 (09:46 +0100)
pv/view/analogsignal.cpp
pv/view/analogsignal.h
pv/view/logicsignal.cpp
pv/view/logicsignal.h
pv/view/selectableitem.h
pv/view/timemarker.cpp
pv/view/timemarker.h

index f4a665c2ec49f225a5c8f246937e713923f89295..fff11f12eacfc368d914a145b52940b4ea501598 100644 (file)
@@ -54,6 +54,12 @@ AnalogSignal::~AnalogSignal()
 {
 }
 
 {
 }
 
+const list<QAction*> AnalogSignal::get_context_bar_actions()
+{
+       list<QAction*> actions;
+       return actions;
+}
+
 void AnalogSignal::set_scale(float scale)
 {
        _scale = scale;
 void AnalogSignal::set_scale(float scale)
 {
        _scale = scale;
index 666aec9893aa767e17e739ac7a8b168de1eac104..42c15bb0fdf8d0f1379aeef4a06f009a4f9644b1 100644 (file)
@@ -47,6 +47,8 @@ public:
 
        virtual ~AnalogSignal();
 
 
        virtual ~AnalogSignal();
 
+       const std::list<QAction*> get_context_bar_actions();
+
        void set_scale(float scale);
 
        /**
        void set_scale(float scale);
 
        /**
index e1f0377e9307d0b25d3104f47fd409c9014d5b8d..e071e720b33991a34f21e0ec240874c7f17a783d 100644 (file)
@@ -64,6 +64,12 @@ LogicSignal::~LogicSignal()
 {
 }
 
 {
 }
 
+const list<QAction*> LogicSignal::get_context_bar_actions()
+{
+       list<QAction*> actions;
+       return actions;
+}
+
 void LogicSignal::paint(QPainter &p, int y, int left, int right,
                double scale, double offset)
 {
 void LogicSignal::paint(QPainter &p, int y, int left, int right,
                double scale, double offset)
 {
index 927e96ab079e0daeda534eb706bab4e2ea8764d3..ed561e6fd842cd1dfba56549f37d5e8c47a12829 100644 (file)
@@ -50,6 +50,8 @@ public:
 
        virtual ~LogicSignal();
 
 
        virtual ~LogicSignal();
 
+       const std::list<QAction*> get_context_bar_actions();
+
        /**
         * Paints the signal with a QPainter
         * @param p the QPainter to paint into.
        /**
         * Paints the signal with a QPainter
         * @param p the QPainter to paint into.
index d8545ce6e78c2e412153335f1fe1cad28774ebcd..d38aca2eb534c3e65575b560d9288b591bda6479 100644 (file)
@@ -51,6 +51,9 @@ public:
         */
        void select(bool select = true);
 
         */
        void select(bool select = true);
 
+public:
+       virtual const std::list<QAction*> get_context_bar_actions() = 0;
+
 protected:
        static QPen highlight_pen();
 
 protected:
        static QPen highlight_pen();
 
index 75ef4ea63e69b223616ffb072207dfba3b4ed224..9d4c43c21d2321f0ad20526075b1ace4dbeb5be7 100644 (file)
@@ -24,6 +24,8 @@
 
 #include <QPainter>
 
 
 #include <QPainter>
 
+using namespace std;
+
 namespace pv {
 namespace view {
 
 namespace pv {
 namespace view {
 
@@ -53,5 +55,11 @@ void TimeMarker::paint(QPainter &p, const QRect &rect)
        p.drawLine(QPointF(x, rect.top()), QPointF(x, rect.bottom()));
 }
 
        p.drawLine(QPointF(x, rect.top()), QPointF(x, rect.bottom()));
 }
 
+const list<QAction*> TimeMarker::get_context_bar_actions()
+{
+       list<QAction*> actions;
+       return actions;
+}
+
 } // namespace view
 } // namespace pv
 } // namespace view
 } // namespace pv
index 2536db75b649694a05a3fe919c3eb7dd524fef27..8d8ae162e909c3738e628477fbdc327b77f59bc0 100644 (file)
@@ -82,6 +82,12 @@ public:
        virtual void paint_label(QPainter &p, const QRect &rect,
                unsigned int prefix) = 0;
 
        virtual void paint_label(QPainter &p, const QRect &rect,
                unsigned int prefix) = 0;
 
+       /**
+        * Returns a list of context menu items to show in the context
+        * bar.
+        */
+       const std::list<QAction*> get_context_bar_actions();
+
 signals:
        void time_changed();
 
 signals:
        void time_changed();