projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
137ed25
)
Added get_context_bar_actions
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 12 May 2013 20:34:30 +0000
(21:34 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 19 May 2013 08:46:00 +0000
(09:46 +0100)
pv/view/analogsignal.cpp
patch
|
blob
|
history
pv/view/analogsignal.h
patch
|
blob
|
history
pv/view/logicsignal.cpp
patch
|
blob
|
history
pv/view/logicsignal.h
patch
|
blob
|
history
pv/view/selectableitem.h
patch
|
blob
|
history
pv/view/timemarker.cpp
patch
|
blob
|
history
pv/view/timemarker.h
patch
|
blob
|
history
diff --git
a/pv/view/analogsignal.cpp
b/pv/view/analogsignal.cpp
index f4a665c2ec49f225a5c8f246937e713923f89295..fff11f12eacfc368d914a145b52940b4ea501598 100644
(file)
--- a/
pv/view/analogsignal.cpp
+++ b/
pv/view/analogsignal.cpp
@@
-54,6
+54,12
@@
AnalogSignal::~AnalogSignal()
{
}
{
}
+const list<QAction*> AnalogSignal::get_context_bar_actions()
+{
+ list<QAction*> actions;
+ return actions;
+}
+
void AnalogSignal::set_scale(float scale)
{
_scale = scale;
void AnalogSignal::set_scale(float scale)
{
_scale = scale;
diff --git
a/pv/view/analogsignal.h
b/pv/view/analogsignal.h
index 666aec9893aa767e17e739ac7a8b168de1eac104..42c15bb0fdf8d0f1379aeef4a06f009a4f9644b1 100644
(file)
--- a/
pv/view/analogsignal.h
+++ b/
pv/view/analogsignal.h
@@
-47,6
+47,8
@@
public:
virtual ~AnalogSignal();
virtual ~AnalogSignal();
+ const std::list<QAction*> get_context_bar_actions();
+
void set_scale(float scale);
/**
void set_scale(float scale);
/**
diff --git
a/pv/view/logicsignal.cpp
b/pv/view/logicsignal.cpp
index e1f0377e9307d0b25d3104f47fd409c9014d5b8d..e071e720b33991a34f21e0ec240874c7f17a783d 100644
(file)
--- a/
pv/view/logicsignal.cpp
+++ b/
pv/view/logicsignal.cpp
@@
-64,6
+64,12
@@
LogicSignal::~LogicSignal()
{
}
{
}
+const list<QAction*> LogicSignal::get_context_bar_actions()
+{
+ list<QAction*> actions;
+ return actions;
+}
+
void LogicSignal::paint(QPainter &p, int y, int left, int right,
double scale, double offset)
{
void LogicSignal::paint(QPainter &p, int y, int left, int right,
double scale, double offset)
{
diff --git
a/pv/view/logicsignal.h
b/pv/view/logicsignal.h
index 927e96ab079e0daeda534eb706bab4e2ea8764d3..ed561e6fd842cd1dfba56549f37d5e8c47a12829 100644
(file)
--- a/
pv/view/logicsignal.h
+++ b/
pv/view/logicsignal.h
@@
-50,6
+50,8
@@
public:
virtual ~LogicSignal();
virtual ~LogicSignal();
+ const std::list<QAction*> get_context_bar_actions();
+
/**
* 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.
diff --git
a/pv/view/selectableitem.h
b/pv/view/selectableitem.h
index d8545ce6e78c2e412153335f1fe1cad28774ebcd..d38aca2eb534c3e65575b560d9288b591bda6479 100644
(file)
--- a/
pv/view/selectableitem.h
+++ b/
pv/view/selectableitem.h
@@
-51,6
+51,9
@@
public:
*/
void select(bool select = true);
*/
void select(bool select = true);
+public:
+ virtual const std::list<QAction*> get_context_bar_actions() = 0;
+
protected:
static QPen highlight_pen();
protected:
static QPen highlight_pen();
diff --git
a/pv/view/timemarker.cpp
b/pv/view/timemarker.cpp
index 75ef4ea63e69b223616ffb072207dfba3b4ed224..9d4c43c21d2321f0ad20526075b1ace4dbeb5be7 100644
(file)
--- a/
pv/view/timemarker.cpp
+++ b/
pv/view/timemarker.cpp
@@
-24,6
+24,8
@@
#include <QPainter>
#include <QPainter>
+using namespace std;
+
namespace pv {
namespace view {
namespace pv {
namespace view {
@@
-53,5
+55,11
@@
void TimeMarker::paint(QPainter &p, const QRect &rect)
p.drawLine(QPointF(x, rect.top()), QPointF(x, rect.bottom()));
}
p.drawLine(QPointF(x, rect.top()), QPointF(x, rect.bottom()));
}
+const list<QAction*> TimeMarker::get_context_bar_actions()
+{
+ list<QAction*> actions;
+ return actions;
+}
+
} // namespace view
} // namespace pv
} // namespace view
} // namespace pv
diff --git
a/pv/view/timemarker.h
b/pv/view/timemarker.h
index 2536db75b649694a05a3fe919c3eb7dd524fef27..8d8ae162e909c3738e628477fbdc327b77f59bc0 100644
(file)
--- a/
pv/view/timemarker.h
+++ b/
pv/view/timemarker.h
@@
-82,6
+82,12
@@
public:
virtual void paint_label(QPainter &p, const QRect &rect,
unsigned int prefix) = 0;
virtual void paint_label(QPainter &p, const QRect &rect,
unsigned int prefix) = 0;
+ /**
+ * Returns a list of context menu items to show in the context
+ * bar.
+ */
+ const std::list<QAction*> get_context_bar_actions();
+
signals:
void time_changed();
signals:
void time_changed();