Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3cd4baea
Commit
3cd4baea
authored
Aug 16, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: stop abusing MACROS in extended_panels
parent
5e426991
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+23
-22
No files found.
modules/gui/qt4/components/extended_panels.cpp
View file @
3cd4baea
...
...
@@ -80,38 +80,39 @@ QString OptionFromWidgetName( QObject *obj )
return
option
;
}
ExtVideo
::
ExtVideo
(
intf_thread_t
*
_p_intf
,
QTabWidget
*
_parent
)
:
QObject
(
_parent
),
p_intf
(
_p_intf
)
static
inline
void
setup_vfilter
(
intf_thread_t
*
p_intf
,
const
char
*
psz_name
,
QWidget
*
widget
)
{
ui
.
setupUi
(
_parent
);
vlc_object_t
*
p_obj
=
(
vlc_object_t
*
)
vlc_object_find_name
(
p_intf
->
p_libvlc
,
psz_name
);
QCheckBox
*
checkbox
=
qobject_cast
<
QCheckBox
*>
(
widget
);
QGroupBox
*
groupbox
=
qobject_cast
<
QGroupBox
*>
(
widget
);
if
(
p_obj
)
{
vlc_object_release
(
p_obj
);
\
if
(
checkbox
)
checkbox
->
setChecked
(
true
);
\
else
if
(
groupbox
)
groupbox
->
setChecked
(
true
);
\
}
else
{
if
(
checkbox
)
checkbox
->
setChecked
(
false
);
else
if
(
groupbox
)
groupbox
->
setChecked
(
false
);
}
}
#define SETUP_VFILTER( widget ) \
{ \
vlc_object_t *p_obj = ( vlc_object_t * ) \
vlc_object_find_name( p_intf->p_libvlc, \
#widget ); \
QCheckBox *checkbox = qobject_cast<QCheckBox*>( ui.widget##Enable ); \
QGroupBox *groupbox = qobject_cast<QGroupBox*>( ui.widget##Enable ); \
if( p_obj ) \
{ \
vlc_object_release( p_obj ); \
if( checkbox ) checkbox->setChecked( true ); \
else if (groupbox) groupbox->setChecked( true ); \
} \
else \
{ \
if( checkbox ) checkbox->setChecked( false ); \
else if (groupbox) groupbox->setChecked( false ); \
} \
} \
setup_vfilter( p_intf, #widget, ui.widget##Enable ); \
CONNECT( ui.widget##Enable, clicked(), this, updateFilters() );
#define SETUP_VFILTER_OPTION( widget, signal ) \
initComboBoxItems( ui.widget ); \
setWidgetValue( ui.widget ); \
CONNECT( ui.widget, signal, this, updateFilterOptions() );
ExtVideo
::
ExtVideo
(
intf_thread_t
*
_p_intf
,
QTabWidget
*
_parent
)
:
QObject
(
_parent
),
p_intf
(
_p_intf
)
{
ui
.
setupUi
(
_parent
);
SETUP_VFILTER
(
adjust
)
SETUP_VFILTER_OPTION
(
hueSlider
,
valueChanged
(
int
)
)
SETUP_VFILTER_OPTION
(
contrastSlider
,
valueChanged
(
int
)
)
...
...
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