projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CursorPair: Derived from TimeItem
[pulseview.git]
/
pv
/
view
/
view.cpp
diff --git
a/pv/view/view.cpp
b/pv/view/view.cpp
index e0c49c20ad4b2f60b4e9ea1b16c69420318321ba..28408eee39db4723497d906ae8a21b02e901427d 100644
(file)
--- a/
pv/view/view.cpp
+++ b/
pv/view/view.cpp
@@
-50,14
+50,14
@@
#include "pv/session.hpp"
#include "pv/data/logic.hpp"
#include "pv/session.hpp"
#include "pv/data/logic.hpp"
-#include "pv/data/logics
napsho
t.hpp"
+#include "pv/data/logics
egmen
t.hpp"
#include "pv/util.hpp"
using boost::shared_lock;
using boost::shared_mutex;
using pv::data::SignalData;
#include "pv/util.hpp"
using boost::shared_lock;
using boost::shared_mutex;
using pv::data::SignalData;
-using pv::data::S
napsho
t;
+using pv::data::S
egmen
t;
using pv::util::format_time;
using std::back_inserter;
using pv::util::format_time;
using std::back_inserter;
@@
-195,6
+195,14
@@
const Viewport* View::viewport() const
return viewport_;
}
return viewport_;
}
+vector< shared_ptr<TimeItem> > View::time_items() const
+{
+ vector< shared_ptr<TimeItem> > items;
+ items.push_back(cursors_.first());
+ items.push_back(cursors_.second());
+ return items;
+}
+
double View::scale() const
{
return scale_;
double View::scale() const
{
return scale_;
@@
-263,9
+271,9
@@
void View::zoom_one_to_one()
double samplerate = 0.0;
for (const shared_ptr<SignalData> d : visible_data) {
assert(d);
double samplerate = 0.0;
for (const shared_ptr<SignalData> d : visible_data) {
assert(d);
- const vector< shared_ptr<S
napshot> > snapsho
ts =
- d->s
napsho
ts();
- for (const shared_ptr<S
napshot> &s : snapsho
ts)
+ const vector< shared_ptr<S
egment> > segmen
ts =
+ d->s
egmen
ts();
+ for (const shared_ptr<S
egment> &s : segmen
ts)
samplerate = max(samplerate, s->samplerate());
}
samplerate = max(samplerate, s->samplerate());
}
@@
-314,9
+322,9
@@
pair<double, double> View::get_time_extents() const
const set< shared_ptr<SignalData> > visible_data = get_visible_data();
for (const shared_ptr<SignalData> d : visible_data)
{
const set< shared_ptr<SignalData> > visible_data = get_visible_data();
for (const shared_ptr<SignalData> d : visible_data)
{
- const vector< shared_ptr<S
napshot> > snapsho
ts =
- d->s
napsho
ts();
- for (const shared_ptr<S
napshot> &s : snapsho
ts) {
+ const vector< shared_ptr<S
egment> > segmen
ts =
+ d->s
egmen
ts();
+ for (const shared_ptr<S
egment> &s : segmen
ts) {
double samplerate = s->samplerate();
samplerate = (samplerate <= 0.0) ? 1.0 : samplerate;
double samplerate = s->samplerate();
samplerate = (samplerate <= 0.0) ? 1.0 : samplerate;