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
428b63f4
Commit
428b63f4
authored
Dec 26, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: spatializer: simplify using groupbox
parent
b5d005ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
24 deletions
+14
-24
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+13
-22
modules/gui/qt4/components/extended_panels.hpp
modules/gui/qt4/components/extended_panels.hpp
+1
-2
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
428b63f4
...
...
@@ -1396,11 +1396,13 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
QFont
smallFont
=
QApplication
::
font
();
smallFont
.
setPointSize
(
smallFont
.
pointSize
()
-
1
);
Q
GridLayout
*
layout
=
new
QGrid
Layout
(
this
);
Q
VBoxLayout
*
layout
=
new
QVBox
Layout
(
this
);
enableCheck
=
new
QCheckBox
(
qtr
(
"Enable spatializer"
)
);
layout
->
addWidget
(
enableCheck
,
0
,
0
,
1
,
NUM_SP_CTRL
);
spatializerBox
=
new
QGroupBox
(
qtr
(
"Enable spatializer"
)
);
spatializerBox
->
setCheckable
(
true
);
layout
->
addWidget
(
spatializerBox
);
QGridLayout
*
ctrlLayout
=
new
QGridLayout
(
spatializerBox
);
for
(
int
i
=
0
;
i
<
NUM_SP_CTRL
;
i
++
)
{
spatCtrl
[
i
]
=
new
QSlider
(
Qt
::
Vertical
);
...
...
@@ -1413,9 +1415,9 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
ctrl_readout
[
i
]
=
new
QLabel
;
ctrl_readout
[
i
]
->
setFont
(
smallFont
);
layout
->
addWidget
(
spatCtrl
[
i
],
1
,
i
,
Qt
::
AlignHCenter
);
layout
->
addWidget
(
ctrl_readout
[
i
],
2
,
i
,
Qt
::
AlignHCenter
);
layout
->
addWidget
(
ctrl_texts
[
i
],
3
,
i
,
Qt
::
AlignHCenter
);
ctrlLayout
->
addWidget
(
spatCtrl
[
i
],
0
,
i
,
Qt
::
AlignHCenter
);
ctrlLayout
->
addWidget
(
ctrl_readout
[
i
],
1
,
i
,
Qt
::
AlignHCenter
);
ctrlLayout
->
addWidget
(
ctrl_texts
[
i
],
2
,
i
,
Qt
::
AlignHCenter
);
spatCtrl
[
i
]
->
setRange
(
0
,
10
);
}
spatCtrl
[
0
]
->
setRange
(
0
,
11
);
...
...
@@ -1423,8 +1425,6 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
for
(
int
i
=
0
;
i
<
NUM_SP_CTRL
;
i
++
)
CONNECT
(
spatCtrl
[
i
],
valueChanged
(
int
),
this
,
setInitValues
()
);
BUTTONACT
(
enableCheck
,
enable
()
);
/* Write down initial values */
vlc_object_t
*
p_aout
=
(
vlc_object_t
*
)
THEMIM
->
getAout
();
char
*
psz_af
;
...
...
@@ -1447,28 +1447,19 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
}
}
if
(
psz_af
&&
strstr
(
psz_af
,
"spatializer"
)
!=
NULL
)
enableCheck
->
setChecked
(
true
);
spatializerBox
->
setChecked
(
true
);
else
spatializerBox
->
setChecked
(
false
);
free
(
psz_af
);
enable
(
enableCheck
->
isChecked
()
);
setValues
();
}
void
Spatializer
::
enable
()
{
bool
en
=
enableCheck
->
isChecked
();
playlist_EnableAudioFilter
(
THEPL
,
"spatializer"
,
en
);
enable
(
en
);
playlist_EnableAudioFilter
(
THEPL
,
"spatializer"
,
spatializerBox
->
isChecked
()
);
}
void
Spatializer
::
enable
(
bool
en
)
{
for
(
int
i
=
0
;
i
<
NUM_SP_CTRL
;
i
++
)
{
spatCtrl
[
i
]
->
setEnabled
(
en
);
ctrl_texts
[
i
]
->
setEnabled
(
en
);
ctrl_readout
[
i
]
->
setEnabled
(
en
);
}
}
void
Spatializer
::
setInitValues
()
{
setValues
();
...
...
modules/gui/qt4/components/extended_panels.hpp
View file @
428b63f4
...
...
@@ -154,7 +154,7 @@ private:
float
controlVars
[
5
];
float
oldControlVars
[
5
];
Q
CheckBox
*
enableCheck
;
Q
GroupBox
*
spatializerBox
;
void
delCallbacks
(
vlc_object_t
*
);
void
addCallbacks
(
vlc_object_t
*
);
...
...
@@ -163,7 +163,6 @@ private:
void
setValues
();
private
slots
:
void
enable
(
bool
);
void
enable
();
void
setInitValues
();
};
...
...
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