Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
99313a66
Commit
99313a66
authored
Sep 12, 2017
by
Oliver Bock
Browse files
Let y-axis range be -1 to 1
parent
7f130bed
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsescopewidget.cpp
View file @
99313a66
...
...
@@ -50,7 +50,7 @@ PulseScopeWidget::PulseScopeWidget(QWidget *parent) : QGraphicsView(parent),
}
m_scopeSizeH
=
360.0
;
m_scopeSizeV
=
1
.0
;
m_scopeSizeV
=
2
.0
;
m_path
=
NULL
;
m_marker
=
m_scene
.
addLine
(
0.0
,
0.0
,
0.0
,
m_scopeSizeV
);
...
...
@@ -78,9 +78,9 @@ void PulseScopeWidget::drawCurve(const QVector<double>& vector)
{
m_data
=
vector
;
QPainterPath
pulsePath
(
QPointF
(
0.0
,
m_scopeSizeV
-
m_data
.
at
(
0
)));
QPainterPath
pulsePath
(
QPointF
(
0.0
,
m_scopeSizeV
-
m_data
.
at
(
0
)
-
1.0
));
for
(
int
i
=
1
;
i
<
m_scopeSizeH
;
++
i
)
{
pulsePath
.
lineTo
(
i
,
m_scopeSizeV
-
m_data
.
at
(
i
));
pulsePath
.
lineTo
(
i
,
m_scopeSizeV
-
m_data
.
at
(
i
)
-
1.0
);
}
if
(
m_path
==
NULL
)
{
m_path
=
m_scene
.
addPath
(
pulsePath
,
QPen
(
Qt
::
yellow
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment