X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fdecodesignal.h;h=efa3449575942e1a4b69170276c3094b770c8256;hb=ad50ac1af2b9e8bc0a8c520d80debfd8ad95c904;hp=673d65499509a409ca1266c5fbcd693ed4d97cd4;hpb=9cef95672622f4ecdb21edef9d81a10c789daf1e;p=pulseview.git diff --git a/pv/view/decodesignal.h b/pv/view/decodesignal.h index 673d6549..efa34495 100644 --- a/pv/view/decodesignal.h +++ b/pv/view/decodesignal.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_DECODESIGNAL_H -#define PULSEVIEW_PV_DECODESIGNAL_H +#ifndef PULSEVIEW_PV_VIEW_DECODESIGNAL_H +#define PULSEVIEW_PV_VIEW_DECODESIGNAL_H #include "trace.h" @@ -39,15 +39,16 @@ class DecodeSignal : public Trace private: static const QColor DecodeColours[4]; + static const QColor ErrorBgColour; public: DecodeSignal(pv::SigSession &session, boost::shared_ptr decoder, int index); - void init_context_bar_actions(QWidget *parent); - bool enabled() const; + const boost::shared_ptr& decoder() const; + void set_view(pv::view::View *view); /** @@ -66,19 +67,19 @@ public: **/ void paint_mid(QPainter &p, int left, int right); - const std::list get_context_bar_actions(); + 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(); + void on_delete(); + private: boost::shared_ptr _decoder; @@ -88,4 +89,4 @@ private: } // namespace view } // namespace pv -#endif // PULSEVIEW_PV_DECODESIGNAL_H +#endif // PULSEVIEW_PV_VIEW_DECODESIGNAL_H