]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decodesignal.h
Added decode error display
[pulseview.git] / pv / view / decodesignal.h
index ab1a1608c692e52976c5caaa982eab19340095f6..efa3449575942e1a4b69170276c3094b770c8256 100644 (file)
@@ -39,6 +39,7 @@ class DecodeSignal : public Trace
 
 private:
        static const QColor DecodeColours[4];
+       static const QColor ErrorBgColour;
 
 public:
        DecodeSignal(pv::SigSession &session,
@@ -46,6 +47,8 @@ public:
 
        bool enabled() const;
 
+       const boost::shared_ptr<pv::data::Decoder>& decoder() const;
+
        void set_view(pv::view::View *view);
 
        /**
@@ -66,13 +69,11 @@ public:
 
        QMenu* create_context_menu(QWidget *parent);
 
-private:
+       void delete_pressed();
 
-       /**
-        * When painting into the rectangle, calculate the y
-        * offset of the zero point.
-        **/
-       int get_nominal_offset(const QRect &rect) const;
+private:
+       void draw_error(QPainter &p, const QString &message,
+               int left, int right);
 
 private slots:
        void on_new_decode_data();