Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
2c1bb9ac
Commit
2c1bb9ac
authored
Feb 21, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: update EQ slider when reselecting the same preset (fixes #3322)
parent
56bdcd25
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
34 deletions
+22
-34
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+22
-33
modules/gui/qt4/components/extended_panels.hpp
modules/gui/qt4/components/extended_panels.hpp
+0
-1
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
2c1bb9ac
...
...
@@ -855,8 +855,6 @@ Equalizer::Equalizer( intf_thread_t *_p_intf, QWidget *_parent ) :
/* Setup of presetsComboBox */
presetsComboBox
=
ui
.
presetsCombo
;
CONNECT
(
presetsComboBox
,
currentIndexChanged
(
int
),
this
,
updateUISliderValues
(
int
)
);
CONNECT
(
presetsComboBox
,
activated
(
int
),
this
,
setCorePreset
(
int
)
);
/* Add the sliders for the Bands */
...
...
@@ -1040,37 +1038,6 @@ void Equalizer::setCoreBands()
}
}
void
Equalizer
::
updateUISliderValues
(
int
i_preset
)
{
if
(
i_preset
<
0
)
return
;
char
*
p
=
createValuesFromPreset
(
i_preset
);
char
*
psz
=
p
;
float
f_preamp
=
eqz_preset_10b
[
i_preset
]
->
f_preamp
;
if
(
p
)
{
for
(
int
i
=
0
;
i
<
BANDS
;
i
++
)
{
const
float
f
=
us_strtod
(
p
,
&
p
);
bands
[
i
]
->
setValue
(
(
int
)(
(
f
+
20
)
*
10
)
);
band_texts
[
i
]
->
setText
(
band_frequencies
[
i
]
+
"
\n
"
+
QString
(
"%1"
).
arg
(
f
,
5
,
'f'
,
1
)
+
"dB"
);
if
(
p
==
NULL
||
*
p
==
'\0'
)
break
;
p
++
;
if
(
*
p
==
'\0'
)
break
;
}
free
(
psz
);
}
ui
.
preampSlider
->
setValue
(
(
int
)(
(
f_preamp
+
20
)
*
10
)
);
ui
.
preampLabel
->
setText
(
qtr
(
"Preamp
\n
"
)
+
QString
::
number
(
f_preamp
,
'f'
,
1
)
+
qtr
(
"dB"
)
);
}
char
*
Equalizer
::
createValuesFromPreset
(
int
i_preset
)
{
QString
values
;
...
...
@@ -1085,9 +1052,31 @@ char * Equalizer::createValuesFromPreset( int i_preset )
void
Equalizer
::
setCorePreset
(
int
i_preset
)
{
if
(
i_preset
<
0
)
return
;
/* Update pre-amplification in the UI */
float
f_preamp
=
eqz_preset_10b
[
i_preset
]
->
f_preamp
;
ui
.
preampSlider
->
setValue
(
(
int
)(
(
f_preamp
+
20
)
*
10
)
);
ui
.
preampLabel
->
setText
(
qtr
(
"Preamp
\n
"
)
+
QString
::
number
(
f_preamp
,
'f'
,
1
)
+
qtr
(
"dB"
)
);
char
*
psz_values
=
createValuesFromPreset
(
i_preset
);
if
(
!
psz_values
)
return
;
char
*
p
=
psz_values
;
for
(
int
i
=
0
;
i
<
BANDS
&&
*
p
;
i
++
)
{
const
float
f
=
us_strtod
(
p
,
&
p
);
bands
[
i
]
->
setValue
(
(
int
)(
(
f
+
20
)
*
10
)
);
band_texts
[
i
]
->
setText
(
band_frequencies
[
i
]
+
"
\n
"
+
QString
(
"%1"
).
arg
(
f
,
5
,
'f'
,
1
)
+
"dB"
);
if
(
*
p
)
p
++
;
/* skip separator */
}
/* Apply presets to audio output */
aout_instance_t
*
p_aout
=
THEMIM
->
getAout
();
if
(
p_aout
)
{
...
...
modules/gui/qt4/components/extended_panels.hpp
View file @
2c1bb9ac
...
...
@@ -113,7 +113,6 @@ private slots:
void
setPreamp
();
void
setCoreBands
();
void
setCorePreset
(
int
);
void
updateUISliderValues
(
int
);
};
class
Spatializer
:
public
QWidget
...
...
Write
Preview
Markdown
is supported
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