projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RowItem: Bundled painting parameters into RowItemPaintParams
[pulseview.git]
/
pv
/
view
/
viewport.cpp
diff --git
a/pv/view/viewport.cpp
b/pv/view/viewport.cpp
index 220a10aada3adebb151df3f0970c7417f7649dea..bc010b4bd02fa3cd11270397c87e2588df2af461 100644
(file)
--- a/
pv/view/viewport.cpp
+++ b/
pv/view/viewport.cpp
@@
-22,11
+22,12
@@
#include <cmath>
#include <algorithm>
#include <cmath>
#include <algorithm>
-#include "view.h"
-#include "viewport.h"
+#include "rowitempaintparams.hpp"
+#include "signal.hpp"
+#include "view.hpp"
+#include "viewport.hpp"
-#include "signal.h"
-#include "../sigsession.h"
+#include <pv/session.hpp>
#include <QMouseEvent>
#include <QMouseEvent>
@@
-69,18
+70,20
@@
void Viewport::paintEvent(QPaintEvent*)
if (view_.cursors_shown())
view_.cursors().draw_viewport_background(p, rect());
if (view_.cursors_shown())
view_.cursors().draw_viewport_background(p, rect());
+ const RowItemPaintParams pp(0, width());
+
// Plot the signal
for (const shared_ptr<RowItem> r : row_items)
{
assert(r);
// Plot the signal
for (const shared_ptr<RowItem> r : row_items)
{
assert(r);
- r->paint_back(p,
0, width()
);
+ r->paint_back(p,
pp
);
}
for (const shared_ptr<RowItem> r : row_items)
}
for (const shared_ptr<RowItem> r : row_items)
- r->paint_mid(p,
0, width()
);
+ r->paint_mid(p,
pp
);
for (const shared_ptr<RowItem> r : row_items)
for (const shared_ptr<RowItem> r : row_items)
- r->paint_fore(p,
0, width()
);
+ r->paint_fore(p,
pp
);
if (view_.cursors_shown())
view_.cursors().draw_viewport_foreground(p, rect());
if (view_.cursors_shown())
view_.cursors().draw_viewport_foreground(p, rect());