Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
5d934dae
Commit
5d934dae
authored
Nov 10, 2012
by
Rémi Denis-Courmont
Browse files
Qt4: allow dial control for float variables
parent
3feac244
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/qt4/components/extended_panels.cpp
View file @
5d934dae
...
...
@@ -29,6 +29,8 @@
# include "config.h"
#endif
#include <math.h>
#include <QLabel>
#include <QVariant>
#include <QString>
...
...
@@ -551,6 +553,7 @@ void ExtVideo::setWidgetValue( QObject *widget )
{
if
(
slider
)
slider
->
setValue
(
(
int
)(
val
.
f_float
*
(
double
)
slider
->
tickInterval
()
)
);
/* hack alert! */
else
if
(
doublespinbox
)
doublespinbox
->
setValue
(
val
.
f_float
);
else
if
(
dial
)
dial
->
setValue
(
(
540
-
lroundf
(
val
.
f_float
))
%
360
);
else
msg_Warn
(
p_intf
,
"Could not find the correct Float widget"
);
}
else
if
(
i_type
==
VLC_VAR_STRING
)
...
...
@@ -631,6 +634,7 @@ void ExtVideo::updateFilterOptions()
if
(
slider
)
f_float
=
(
double
)
slider
->
value
()
/
(
double
)
slider
->
tickInterval
();
/* hack alert! */
else
if
(
doublespinbox
)
f_float
=
doublespinbox
->
value
();
else
if
(
dial
)
f_float
=
(
540
-
dial
->
value
())
%
360
;
else
if
(
lineedit
)
f_float
=
lineedit
->
text
().
toDouble
();
else
msg_Warn
(
p_intf
,
"Could not find the correct Float widget"
);
config_PutFloat
(
p_intf
,
qtu
(
option
),
f_float
);
...
...
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