Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
77bcf64b
Commit
77bcf64b
authored
Apr 17, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt, controller: put all buttons in QHBoxLayouts
This will be needed for special styling
parent
33b0d9dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
13 deletions
+43
-13
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+41
-12
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+2
-1
No files found.
modules/gui/qt4/components/controller.cpp
View file @
77bcf64b
...
...
@@ -61,6 +61,7 @@ AbstractController::AbstractController( intf_thread_t * _p_i, QWidget *_parent )
{
p_intf
=
_p_i
;
advControls
=
NULL
;
buttonGroupLayout
=
NULL
;
/* Main action provider */
toolbarActionsMapper
=
new
QSignalMapper
(
this
);
...
...
@@ -111,7 +112,7 @@ void AbstractController::parseAndCreate( const QString& config,
QStringList
list2
=
list
.
at
(
i
).
split
(
"-"
);
if
(
list2
.
size
()
<
1
)
{
msg_Warn
(
p_intf
,
"Parsing error
. Report this
"
);
msg_Warn
(
p_intf
,
"Parsing error
1. Please, report this.
"
);
continue
;
}
...
...
@@ -120,7 +121,7 @@ void AbstractController::parseAndCreate( const QString& config,
buttonType_e
i_type
=
(
buttonType_e
)
list2
.
at
(
0
).
toInt
(
&
ok
);
if
(
!
ok
)
{
msg_Warn
(
p_intf
,
"Parsing error
0. Please report this
"
);
msg_Warn
(
p_intf
,
"Parsing error
2. Please report this.
"
);
continue
;
}
...
...
@@ -129,13 +130,19 @@ void AbstractController::parseAndCreate( const QString& config,
i_option
=
list2
.
at
(
1
).
toInt
(
&
ok
);
if
(
!
ok
)
{
msg_Warn
(
p_intf
,
"Parsing error
1. Please report this
"
);
msg_Warn
(
p_intf
,
"Parsing error
3. Please, report this.
"
);
continue
;
}
}
createAndAddWidget
(
controlLayout
,
-
1
,
i_type
,
i_option
);
}
if
(
buttonGroupLayout
)
{
controlLayout
->
addLayout
(
buttonGroupLayout
);
buttonGroupLayout
=
NULL
;
}
}
void
AbstractController
::
createAndAddWidget
(
QBoxLayout
*
controlLayout
,
...
...
@@ -143,23 +150,45 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout,
buttonType_e
i_type
,
int
i_option
)
{
VLC_UNUSED
(
i_index
);
// i_index should only be required for edition
/* Close the current buttonGroup if we have a special widget or a spacer */
if
(
buttonGroupLayout
&&
i_type
>
BUTTON_MAX
)
{
controlLayout
->
addLayout
(
buttonGroupLayout
);
buttonGroupLayout
=
NULL
;
}
/* Special case for SPACERS, who aren't QWidgets */
if
(
i_type
==
WIDGET_SPACER
)
{
controlLayout
->
insertSpacing
(
i_index
,
12
);
return
;
controlLayout
->
addSpacing
(
12
);
}
if
(
i_type
==
WIDGET_SPACER_EXTEND
)
else
if
(
i_type
==
WIDGET_SPACER_EXTEND
)
{
controlLayout
->
insertStretch
(
i_index
,
12
);
return
;
controlLayout
->
addStretch
(
12
);
}
else
{
/* Create the widget */
QWidget
*
widg
=
createWidget
(
i_type
,
i_option
);
if
(
!
widg
)
return
;
controlLayout
->
insertWidget
(
i_index
,
widg
);
/* Buttons */
if
(
i_type
<
BUTTON_MAX
)
{
if
(
!
buttonGroupLayout
)
{
buttonGroupLayout
=
new
QHBoxLayout
;
}
buttonGroupLayout
->
addWidget
(
widg
);
}
else
/* Special widgets */
{
controlLayout
->
addWidget
(
widg
);
}
}
}
...
...
modules/gui/qt4/components/controller.hpp
View file @
77bcf64b
...
...
@@ -163,6 +163,8 @@ private:
QFrame
*
discFrame
();
QFrame
*
telexFrame
();
void
applyAttributes
(
QToolButton
*
,
bool
b_flat
,
bool
b_big
);
QHBoxLayout
*
buttonGroupLayout
;
protected
slots
:
virtual
void
setStatus
(
int
);
...
...
@@ -197,7 +199,6 @@ public:
/* p_intf, advanced control visible or not, blingbling or not */
ControlsWidget
(
intf_thread_t
*
_p_i
,
bool
b_advControls
,
QWidget
*
_parent
=
0
);
virtual
~
ControlsWidget
();
protected:
friend
class
MainInterface
;
...
...
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