projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add selection to Ruler items
[pulseview.git]
/
pv
/
view
/
signal.h
diff --git
a/pv/view/signal.h
b/pv/view/signal.h
index 250d3ff36bf04c90ba542629e062f3aba8d99cd2..ece2e5a446218591f066a435454004a550b267f3 100644
(file)
--- a/
pv/view/signal.h
+++ b/
pv/view/signal.h
@@
-31,6
+31,10
@@
#include <stdint.h>
#include <stdint.h>
+#include <libsigrok/libsigrok.h>
+
+#include "selectableitem.h"
+
namespace pv {
namespace data {
namespace pv {
namespace data {
@@
-39,16
+43,17
@@
class SignalData;
namespace view {
namespace view {
-class Signal
+class Signal
: public SelectableItem
{
{
+ Q_OBJECT
+
private:
static const int LabelHitPadding;
private:
static const int LabelHitPadding;
- static const int LabelHighlightRadius;
static const QPen SignalAxisPen;
protected:
static const QPen SignalAxisPen;
protected:
- Signal(
QString nam
e);
+ Signal(
const sr_probe *const prob
e);
public:
/**
public:
/**
@@
-81,16
+86,6
@@
public:
*/
void set_v_offset(int v_offset);
*/
void set_v_offset(int v_offset);
- /**
- * Returns true if the signal has been selected by the user.
- */
- bool selected() const;
-
- /**
- * Selects or deselects the signal.
- */
- void select(bool select = true);
-
/**
* 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.
@@
-156,12
+151,12
@@
private:
QRectF get_label_rect(int y, int right);
protected:
QRectF get_label_rect(int y, int right);
protected:
+ const sr_probe *const _probe;
+
QString _name;
QColor _colour;
int _v_offset;
QString _name;
QColor _colour;
int _v_offset;
- bool _selected;
-
QSizeF _text_size;
};
QSizeF _text_size;
};