projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c23b29d
)
Added clear_selection to Ruler and Header
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Mon, 13 May 2013 21:42:09 +0000
(22:42 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 19 May 2013 08:46:00 +0000
(09:46 +0100)
pv/view/header.cpp
patch
|
blob
|
history
pv/view/header.h
patch
|
blob
|
history
pv/view/marginwidget.h
patch
|
blob
|
history
pv/view/ruler.cpp
patch
|
blob
|
history
pv/view/ruler.h
patch
|
blob
|
history
diff --git
a/pv/view/header.cpp
b/pv/view/header.cpp
index 8fb5b4bd3c126a104b2f37d133ceb65405ddb380..cb161a6961ad0cd3aa164f9bbb0523e0fbfbd651 100644
(file)
--- a/
pv/view/header.cpp
+++ b/
pv/view/header.cpp
@@
-78,6
+78,18
@@
boost::shared_ptr<pv::view::Signal> Header::get_mouse_over_signal(
return shared_ptr<Signal>();
}
return shared_ptr<Signal>();
}
+void Header::clear_selection()
+{
+ const vector< shared_ptr<Signal> > sigs(
+ _view.session().get_signals());
+ BOOST_FOREACH(const shared_ptr<Signal> s, sigs) {
+ assert(s);
+ s->select(false);
+ }
+
+ update();
+}
+
void Header::paintEvent(QPaintEvent*)
{
const int w = width();
void Header::paintEvent(QPaintEvent*)
{
const int w = width();
diff --git
a/pv/view/header.h
b/pv/view/header.h
index 504011b6a63a348763be0495c9f5b305b4339c66..cb1d36246c3d76abb40b21ef89c7905f3f7062cf 100644
(file)
--- a/
pv/view/header.h
+++ b/
pv/view/header.h
@@
-46,6
+46,8
@@
private:
boost::shared_ptr<pv::view::Signal> get_mouse_over_signal(
const QPoint &pt);
boost::shared_ptr<pv::view::Signal> get_mouse_over_signal(
const QPoint &pt);
+ void clear_selection();
+
private:
void paintEvent(QPaintEvent *event);
private:
void paintEvent(QPaintEvent *event);
diff --git
a/pv/view/marginwidget.h
b/pv/view/marginwidget.h
index 239692ca26b81bbc9880f891846ebad9305c0a0f..6f2effcffbb462333d1fce5d1989fa80daefdf50 100644
(file)
--- a/
pv/view/marginwidget.h
+++ b/
pv/view/marginwidget.h
@@
-35,6
+35,9
@@
class MarginWidget : public QWidget
public:
MarginWidget(pv::view::View &parent);
public:
MarginWidget(pv::view::View &parent);
+public slots:
+ virtual void clear_selection() = 0;
+
protected:
pv::view::View &_view;
};
protected:
pv::view::View &_view;
};
diff --git
a/pv/view/ruler.cpp
b/pv/view/ruler.cpp
index 654e6f45caea7652ae3ff5246492606833d42e82..049cc4af196a8c2203d0ef3ee285e9fa33f17a84 100644
(file)
--- a/
pv/view/ruler.cpp
+++ b/
pv/view/ruler.cpp
@@
-58,6
+58,14
@@
Ruler::Ruler(View &parent) :
this, SLOT(hover_point_changed()));
}
this, SLOT(hover_point_changed()));
}
+void Ruler::clear_selection()
+{
+ CursorPair &cursors = _view.cursors();
+ cursors.first().select(false);
+ cursors.second().select(false);
+ update();
+}
+
QString Ruler::format_time(double t, unsigned int prefix,
unsigned int precision)
{
QString Ruler::format_time(double t, unsigned int prefix,
unsigned int precision)
{
diff --git
a/pv/view/ruler.h
b/pv/view/ruler.h
index 461ec05cfbd0e7ef97bb44de2ca0f579543b0424..ba03f312103fce4c42dfcb518c63ab82c35cade6 100644
(file)
--- a/
pv/view/ruler.h
+++ b/
pv/view/ruler.h
@@
-45,6
+45,8
@@
private:
public:
Ruler(View &parent);
public:
Ruler(View &parent);
+ void clear_selection();
+
static QString format_time(double t, unsigned int prefix,
unsigned precision = 0);
static QString format_time(double t, unsigned int prefix,
unsigned precision = 0);