X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fsignal.h;fp=pv%2Fsignal.h;h=2afe9528dfe8cceac605d38c6600977f7381b61c;hp=951ae3172bc576cd12e76dd9ccf349d937584cd4;hb=b3b57abc4fcfea1471529e9d116eaf11905f6639;hpb=f224292974bed0d34333c5a2158968200e42238c diff --git a/pv/signal.h b/pv/signal.h index 951ae317..2afe9528 100644 --- a/pv/signal.h +++ b/pv/signal.h @@ -23,6 +23,7 @@ #include +#include #include #include #include @@ -52,6 +53,16 @@ public: */ void set_name(QString name); + /** + * Get the colour of the signal. + */ + QColor get_colour() const; + + /** + * Set the colour of the signal. + */ + void set_colour(QColor colour); + /** * Paints the signal with a QPainter * @param p the QPainter to paint into. @@ -96,11 +107,6 @@ private: QRectF get_label_rect(const QRect &rect); protected: - /** - * Get the colour of the logic signal - */ - virtual QColor get_colour() const = 0; - /** * When painting into the rectangle, calculate the y * offset of the zero point. @@ -109,6 +115,8 @@ protected: protected: QString _name; + QColor _colour; + QSizeF _text_size; };