Skip to content
GitLab
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
e27978d5
Commit
e27978d5
authored
Jan 26, 2009
by
Oliver Bock
Browse files
Display semi major axis value in red if out of slider range (capped)
parent
d14613a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pulsatingscience.cpp
View file @
e27978d5
...
...
@@ -52,7 +52,6 @@ PulsatingScience::PulsatingScience(QWidget *parent) : QMainWindow(parent)
on_sliderPulsarSpinFrequency_valueChanged
(
ui
.
sliderPulsarSpinFrequency
->
value
());
on_sliderPulsarSpinAxisInclination_valueChanged
(
ui
.
sliderPulsarSpinAxisInclination
->
value
());
on_sliderPulsarMagneticAxisInclination_valueChanged
(
ui
.
sliderPulsarMagneticAxisInclination
->
value
());
}
PulsatingScience
::~
PulsatingScience
()
...
...
@@ -140,6 +139,7 @@ void PulsatingScience::on_sliderPulsarSemiMajorAxis_valueChanged(int value)
{
ui
.
pulsarGlWidget
->
setPulsarSemiMajorAxis
(
value
*
0.001
f
);
ui
.
lcdPulsarSemiMajorAxis
->
display
(
QString
::
number
(
value
*
0.001
f
,
'f'
,
1
));
ui
.
lcdPulsarSemiMajorAxis
->
setStyleSheet
(
"color: black"
);
}
void
PulsatingScience
::
on_actionMenu_bar_toggled
(
bool
checked
)
...
...
@@ -165,4 +165,9 @@ void PulsatingScience::on_actionAbout_activated()
void
PulsatingScience
::
updatePulsarSemiMajorAxisValue
(
double
value
)
{
ui
.
sliderPulsarSemiMajorAxis
->
setValue
(
value
*
1000.0
);
if
(
value
<
1.0
||
value
>
20.0
)
{
ui
.
lcdPulsarSemiMajorAxis
->
setStyleSheet
(
"color: red"
);
ui
.
lcdPulsarSemiMajorAxis
->
display
(
QString
::
number
(
value
,
'f'
,
1
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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