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
a50bb327
Commit
a50bb327
authored
Jun 11, 2009
by
Francois Cartegnie
Committed by
Jean-Baptiste Kempf
Jun 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI: Sprefs_audio fixes and enhancements
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
11e07b57
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
536 additions
and
387 deletions
+536
-387
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+3
-4
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+3
-3
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+21
-9
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/components/simple_preferences.hpp
+1
-0
modules/gui/qt4/ui/sprefs_audio.ui
modules/gui/qt4/ui/sprefs_audio.ui
+508
-371
No files found.
modules/gui/qt4/components/preferences_widgets.cpp
View file @
a50bb327
...
...
@@ -1037,7 +1037,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
BoolConfigControl
::
BoolConfigControl
(
vlc_object_t
*
_p_this
,
module_config_t
*
_p_item
,
QLabel
*
_label
,
Q
CheckBox
*
_checkbox
,
Q
AbstractButton
*
_checkbox
,
bool
bycat
)
:
VIntConfigControl
(
_p_this
,
_p_item
)
{
...
...
@@ -1048,14 +1048,13 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
void
BoolConfigControl
::
finish
()
{
checkbox
->
setCheckState
(
p_item
->
value
.
i
==
true
?
Qt
::
Checked
:
Qt
::
Unchecked
);
checkbox
->
setChecked
(
p_item
->
value
.
i
==
true
);
checkbox
->
setToolTip
(
formatTooltip
(
qtr
(
p_item
->
psz_longtext
))
);
}
int
BoolConfigControl
::
getValue
()
{
return
checkbox
->
checkState
()
==
Qt
::
Checked
?
true
:
false
;
return
checkbox
->
isChecked
()
;
}
/**************************************************************************
...
...
modules/gui/qt4/components/preferences_widgets.hpp
View file @
a50bb327
...
...
@@ -201,14 +201,14 @@ public:
BoolConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QWidget
*
,
QGridLayout
*
,
int
&
);
BoolConfigControl
(
vlc_object_t
*
,
module_config_t
*
,
QLabel
*
,
Q
CheckBox
*
,
bool
);
QLabel
*
,
Q
AbstractButton
*
,
bool
);
virtual
~
BoolConfigControl
()
{};
virtual
int
getValue
();
virtual
void
show
()
{
checkbox
->
show
();
}
virtual
void
hide
()
{
checkbox
->
hide
();
}
virtual
int
getType
()
{
return
CONFIG_ITEM_BOOL
;
}
private:
Q
CheckBox
*
checkbox
;
private:
Q
AbstractButton
*
checkbox
;
void
finish
();
};
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
a50bb327
...
...
@@ -223,6 +223,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
START_SPREFS_CAT
(
Audio
,
qtr
(
"Audio Settings"
)
);
CONFIG_GENERIC
(
"audio"
,
Bool
,
NULL
,
enableAudio
);
ui
.
SPrefsAudio_zone
->
setEnabled
(
ui
.
enableAudio
->
isChecked
()
);
CONNECT
(
ui
.
enableAudio
,
toggled
(
bool
),
ui
.
SPrefsAudio_zone
,
setEnabled
(
bool
)
);
#define audioCommon( name ) \
QWidget * name ## Control = new QWidget( ui.outputAudioBox ); \
...
...
@@ -230,7 +233,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
name ## Layout->setMargin( 0 ); \
name ## Layout->setSpacing( 0 ); \
QLabel * name ## Label = new QLabel( qtr( "Device:" ), name ## Control ); \
name ## Label->setMinimumSize(QSize(
10
0, 0)); \
name ## Label->setMinimumSize(QSize(
25
0, 0)); \
name ## Layout->addWidget( name ## Label ); \
#define audioControl( name) \
...
...
@@ -249,12 +252,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
name ## Layout->addWidget( name ## Browse ); \
outputAudioLayout->addWidget( name ## Control, outputAudioLayout->rowCount(), 0, 1, -1 );
/* hide if necessary */
ui
.
lastfm_user_edit
->
hide
();
ui
.
lastfm_user_label
->
hide
();
ui
.
lastfm_pass_edit
->
hide
();
ui
.
lastfm_pass_label
->
hide
();
/* Build if necessary */
QGridLayout
*
outputAudioLayout
=
qobject_cast
<
QGridLayout
*>
(
ui
.
outputAudioBox
->
layout
());
#ifdef WIN32
...
...
@@ -292,13 +289,17 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC_NO_BOOL
(
"volume"
,
IntegerRangeSlider
,
NULL
,
defaultVolume
);
CONNECT
(
ui
.
defaultVolume
,
valueChanged
(
int
),
this
,
updateAudioVolume
(
int
)
);
this
,
updateAudioVolume
(
int
)
);
CONFIG_GENERIC
(
"qt-autosave-volume"
,
Bool
,
NULL
,
keepVolumeRadio
);
ui
.
defaultVolume_zone
->
setEnabled
(
ui
.
resetVolumeRadio
->
isChecked
()
);
CONNECT
(
ui
.
resetVolumeRadio
,
toggled
(
bool
),
ui
.
defaultVolume_zone
,
setEnabled
(
bool
)
);
CONFIG_GENERIC
(
"audio-language"
,
String
,
ui
.
langLabel
,
preferredAudioLanguage
);
CONFIG_GENERIC
(
"spdif"
,
Bool
,
NULL
,
spdifBox
);
CONFIG_GENERIC
(
"qt-autosave-volume"
,
Bool
,
NULL
,
saveVolBox
);
CONFIG_GENERIC
(
"force-dolby-surround"
,
IntegerList
,
ui
.
dolbyLabel
,
detectionDolby
);
...
...
@@ -326,6 +327,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui
.
volumeValue
->
setButtonSymbols
(
QAbstractSpinBox
::
NoButtons
);
optionWidgets
.
append
(
ui
.
volumeValue
);
optionWidgets
.
append
(
ui
.
headphoneEffect
);
optionWidgets
.
append
(
ui
.
spdifBox
);
updateAudioOptions
(
ui
.
outputModule
->
currentIndex
()
);
/* LastFM */
...
...
@@ -340,11 +342,19 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui
.
lastfm
->
setChecked
(
true
);
else
ui
.
lastfm
->
setChecked
(
false
);
ui
.
lastfm_zone
->
setEnabled
(
ui
.
lastfm
->
isChecked
()
);
CONNECT
(
ui
.
lastfm
,
toggled
(
bool
),
ui
.
lastfm_zone
,
setEnabled
(
bool
)
);
CONNECT
(
ui
.
lastfm
,
stateChanged
(
int
),
this
,
lastfm_Changed
(
int
)
);
}
else
{
ui
.
lastfm
->
hide
();
ui
.
lastfm_zone
->
hide
();
}
/* Normalizer */
CONNECT
(
ui
.
volNormBox
,
toggled
(
bool
),
ui
.
volNormSpin
,
...
...
@@ -647,6 +657,8 @@ void SPrefsPanel::updateAudioOptions( int number)
optionWidgets
[
alsaW
]
->
setVisible
(
(
value
==
"alsa"
)
);
#endif
optionWidgets
[
fileW
]
->
setVisible
(
(
value
==
"aout_file"
)
);
optionWidgets
[
spdifChB
]
->
setVisible
(
(
value
!=
"aout_file"
&&
value
!=
"dummy"
)
);
}
...
...
modules/gui/qt4/components/simple_preferences.hpp
View file @
a50bb327
...
...
@@ -75,6 +75,7 @@ enum {
normalizerChB
,
volLW
,
headphoneB
,
spdifChB
,
};
enum
{
inputLE
,
cachingCoB
};
enum
{
skinRB
,
qtRB
};
...
...
modules/gui/qt4/ui/sprefs_audio.ui
View file @
a50bb327
This diff is collapsed.
Click to expand it.
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