]> sigrok.org Git - pulseview.git/blobdiff - pv/view/trace.h
Added decoder stack item deletion
[pulseview.git] / pv / view / trace.h
index 462e8094048830439690f8214b68857711e53a04..72f8e8a8986a092d82870c666e64d8a361c8bb3a 100644 (file)
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef PULSEVIEW_PV_TRACE_H
-#define PULSEVIEW_PV_TRACE_H
+#ifndef PULSEVIEW_PV_VIEW_TRACE_H
+#define PULSEVIEW_PV_VIEW_TRACE_H
 
 #include <QColor>
 #include <QPainter>
@@ -31,6 +31,8 @@
 
 #include "selectableitem.h"
 
+class QFormLayout;
+
 namespace pv {
 
 class SigSession;
@@ -158,6 +160,10 @@ protected:
         */
        void paint_axis(QPainter &p, int y, int left, int right);
 
+       void add_colour_option(QWidget *parent, QFormLayout *form);
+
+       void create_popup_form();
+
        virtual void populate_popup_form(QWidget *parent, QFormLayout *form);
 
 private:
@@ -177,14 +183,16 @@ private:
        QRectF get_label_rect(int right);
 
 private slots:
-       void on_action_set_name_triggered();
+       void on_text_changed(const QString &text);
 
-       void on_action_set_colour_triggered();
+       void on_colour_changed(const QColor &colour);
 
-       void on_text_changed(const QString &text);
+       void on_popup_closed();
 
 signals:
+       void visibility_changed();
        void text_changed();    
+       void colour_changed();
 
 protected:
        pv::SigSession &_session;
@@ -195,9 +203,13 @@ protected:
        int _v_offset;
 
        QSizeF _text_size;
+
+private:
+       pv::widgets::Popup *_popup;
+       QFormLayout *_popup_form;
 };
 
 } // namespace view
 } // namespace pv
 
-#endif // PULSEVIEW_PV_TRACEL_H
+#endif // PULSEVIEW_PV_VIEW_TRACE_H