projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a label colour chooser dialog
[pulseview.git]
/
pv
/
signal.h
diff --git
a/pv/signal.h
b/pv/signal.h
index 951ae3172bc576cd12e76dd9ccf349d937584cd4..2afe9528dfe8cceac605d38c6600977f7381b61c 100644
(file)
--- a/
pv/signal.h
+++ b/
pv/signal.h
@@
-23,6
+23,7
@@
#include <boost/shared_ptr.hpp>
#include <boost/shared_ptr.hpp>
+#include <QColor>
#include <QPainter>
#include <QRect>
#include <QString>
#include <QPainter>
#include <QRect>
#include <QString>
@@
-52,6
+53,16
@@
public:
*/
void set_name(QString name);
*/
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.
/**
* 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:
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.
/**
* When painting into the rectangle, calculate the y
* offset of the zero point.
@@
-109,6
+115,8
@@
protected:
protected:
QString _name;
protected:
QString _name;
+ QColor _colour;
+
QSizeF _text_size;
};
QSizeF _text_size;
};