projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CursorHeader: Use the same number format as the ruler.
[pulseview.git]
/
pv
/
view
/
logicsignal.cpp
diff --git
a/pv/view/logicsignal.cpp
b/pv/view/logicsignal.cpp
index 52cf4ac1ab24af7ae09051d4c30ec93e36b3c819..77771f82e494d4f3d953c1b4006ad173a32debf2 100644
(file)
--- a/
pv/view/logicsignal.cpp
+++ b/
pv/view/logicsignal.cpp
@@
-20,7
+20,8
@@
#include <extdef.h>
#include <extdef.h>
-#include <math.h>
+#include <cassert>
+#include <cmath>
#include <QFormLayout>
#include <QToolBar>
#include <QFormLayout>
#include <QToolBar>
@@
-34,11
+35,11
@@
#include <pv/data/logicsnapshot.h>
#include <pv/view/view.h>
#include <pv/data/logicsnapshot.h>
#include <pv/view/view.h>
-using boost::shared_ptr;
using std::deque;
using std::max;
using std::min;
using std::pair;
using std::deque;
using std::max;
using std::min;
using std::pair;
+using std::shared_ptr;
using std::vector;
namespace pv {
using std::vector;
namespace pv {
@@
-64,7
+65,7
@@
const QColor LogicSignal::SignalColours[10] = {
};
LogicSignal::LogicSignal(shared_ptr<pv::device::DevInst> dev_inst,
};
LogicSignal::LogicSignal(shared_ptr<pv::device::DevInst> dev_inst,
- const sr_
probe
*const probe, shared_ptr<data::Logic> data) :
+ const sr_
channel
*const probe, shared_ptr<data::Logic> data) :
Signal(dev_inst, probe),
_data(data),
_trigger_none(NULL),
Signal(dev_inst, probe),
_data(data),
_trigger_none(NULL),
@@
-155,9
+156,7
@@
void LogicSignal::paint_mid(QPainter &p, int left, int right)
QLineF *const edge_lines = new QLineF[edge_count];
line = edge_lines;
QLineF *const edge_lines = new QLineF[edge_count];
line = edge_lines;
- for (vector<pv::data::LogicSnapshot::EdgePair>::const_iterator i =
- edges.begin() + 1;
- i != edges.end() - 1; i++) {
+ for (auto i = edges.cbegin() + 1; i != edges.cend() - 1; i++) {
const float x = ((*i).first / samples_per_pixel -
pixels_offset) + left;
*line++ = QLineF(x, high_offset, x, low_offset);
const float x = ((*i).first / samples_per_pixel -
pixels_offset) + left;
*line++ = QLineF(x, high_offset, x, low_offset);
@@
-188,8
+187,7
@@
void LogicSignal::paint_caps(QPainter &p, QLineF *const lines,
{
QLineF *line = lines;
{
QLineF *line = lines;
- for (vector<pv::data::LogicSnapshot::EdgePair>::const_iterator i =
- edges.begin(); i != (edges.end() - 1); i++)
+ for (auto i = edges.begin(); i != (edges.end() - 1); i++)
if ((*i).second == level) {
*line++ = QLineF(
((*i).first / samples_per_pixel -
if ((*i).second == level) {
*line++ = QLineF(
((*i).first / samples_per_pixel -
@@
-306,7
+304,7
@@
void LogicSignal::set_trigger(char type)
const sr_dev_inst *const sdi = _dev_inst->dev_inst();
assert(sdi);
const sr_dev_inst *const sdi = _dev_inst->dev_inst();
assert(sdi);
- const int probe_count = g_slist_length(sdi->
probe
s);
+ const int probe_count = g_slist_length(sdi->
channel
s);
assert(probe_count > 0);
assert(_probe && _probe->index < probe_count);
assert(probe_count > 0);
assert(_probe && _probe->index < probe_count);