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
f729cfdf
Commit
f729cfdf
authored
Dec 09, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Qt] Fix small glitches, issues, because of previous commits.
parent
06825f81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
34 deletions
+41
-34
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+24
-21
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+5
-4
modules/gui/qt4/dialogs/toolbar.cpp
modules/gui/qt4/dialogs/toolbar.cpp
+8
-6
modules/gui/qt4/dialogs/toolbar.hpp
modules/gui/qt4/dialogs/toolbar.hpp
+2
-1
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+2
-2
No files found.
modules/gui/qt4/components/controller.cpp
View file @
f729cfdf
...
...
@@ -59,7 +59,8 @@
* This has helper to create any toolbar, any buttons and to manage the actions
*
*****/
AbstractController
::
AbstractController
(
intf_thread_t
*
_p_i
)
:
QFrame
(
NULL
)
AbstractController
::
AbstractController
(
intf_thread_t
*
_p_i
,
QWidget
*
_parent
)
:
QFrame
(
_parent
)
{
p_intf
=
_p_i
;
advControls
=
NULL
;
...
...
@@ -329,11 +330,11 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
break
;
case
MENU_BUTTONS
:
widget
=
discFrame
();
//
widget->hide();
widget
->
hide
();
break
;
case
TELETEXT_BUTTONS
:
widget
=
telexFrame
();
//
widget->hide();
widget
->
hide
();
break
;
case
VOLUME
:
{
...
...
@@ -359,7 +360,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
break
;
case
ADVANCED_CONTROLLER
:
{
advControls
=
new
AdvControlsWidget
(
p_intf
);
advControls
=
new
AdvControlsWidget
(
p_intf
,
this
);
widget
=
advControls
;
}
break
;
...
...
@@ -373,7 +374,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
}
break
;
default:
msg_Warn
(
p_intf
,
"This should not happen
"
);
msg_Warn
(
p_intf
,
"This should not happen
%i"
,
button
);
break
;
}
...
...
@@ -780,8 +781,9 @@ void AbstractController::frame()
* DA Control Widget !
*****************************/
ControlsWidget
::
ControlsWidget
(
intf_thread_t
*
_p_i
,
bool
b_advControls
)
:
AbstractController
(
_p_i
)
bool
b_advControls
,
QWidget
*
_parent
)
:
AbstractController
(
_p_i
,
_parent
)
{
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Maximum
);
...
...
@@ -795,21 +797,22 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
controlLayout1
->
setSpacing
(
0
);
QString
line1
=
getSettings
()
->
value
(
"MainWindow/Controls1"
,
"
18;19;25"
).
toString
();
"
64;36;37;38;65"
).
toString
();
parseAndCreate
(
line1
,
controlLayout1
);
/*
QString line2 = QString( "%1-2;%2;%3;%4;%5;%6;%6;%7;%8;%9;%6;%10;%11-4")
/*
QString line2 = QString( "%1-2;%2;%3;%4;%5;%6;%6;%7;%8;%9;%6;%10;%11-4")
.arg( PLAY_BUTTON ) .arg( WIDGET_SPACER )
.arg( PREVIOUS_BUTTON ) .arg( STOP_BUTTON )
.arg( NEXT_BUTTON ) .arg( WIDGET_SPACER )
.arg( FULLSCREEN_BUTTON ) .arg( PLAYLIST_BUTTON )
.arg( EXTENDED_BUTTON ) .arg( WIDGET_SPACER_EXTEND )
.arg( VOLUME ); */
.arg( VOLUME );
msg_Dbg( p_intf, "%s", qtu( line2 )); */
QHBoxLayout
*
controlLayout2
=
new
QHBoxLayout
;
controlLayout2
->
setSpacing
(
0
);
QString
line2
=
getSettings
()
->
value
(
"MainWindow/Controls2"
,
"0-2;
21;4;2;5;21;8;11;10;21;22;20
-4"
).
toString
();
"0-2;
64;3;1;4;64;7;10;9;65;34
-4"
).
toString
();
parseAndCreate
(
line2
,
controlLayout2
);
if
(
!
b_advancedVisible
&&
advControls
)
advControls
->
hide
();
...
...
@@ -838,8 +841,8 @@ void ControlsWidget::toggleAdvanced()
emit
advancedControlsToggled
(
b_advancedVisible
);
}
AdvControlsWidget
::
AdvControlsWidget
(
intf_thread_t
*
_p_i
)
:
AbstractController
(
_p_i
)
AdvControlsWidget
::
AdvControlsWidget
(
intf_thread_t
*
_p_i
,
QWidget
*
_parent
)
:
AbstractController
(
_p_i
,
_parent
)
{
controlLayout
=
new
QHBoxLayout
(
this
);
controlLayout
->
setMargin
(
0
);
...
...
@@ -851,12 +854,12 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) :
.arg( FRAME_BUTTON ); */
QString
line
=
getSettings
()
->
value
(
"MainWindow/AdvControl"
,
"12;1
3;14;15
"
).
toString
();
"12;1
1;13;14
"
).
toString
();
parseAndCreate
(
line
,
controlLayout
);
}
InputControlsWidget
::
InputControlsWidget
(
intf_thread_t
*
_p_i
)
:
AbstractController
(
_p_i
)
InputControlsWidget
::
InputControlsWidget
(
intf_thread_t
*
_p_i
,
QWidget
*
_parent
)
:
AbstractController
(
_p_i
,
_parent
)
{
controlLayout
=
new
QHBoxLayout
(
this
);
controlLayout
->
setMargin
(
0
);
...
...
@@ -867,7 +870,7 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i ) :
.arg( INPUT_SLIDER )
.arg( FASTER_BUTTON ); */
QString
line
=
getSettings
()
->
value
(
"MainWindow/InputControl"
,
"
6-1;16;7
-1"
).
toString
();
"
5-1;33;6
-1"
).
toString
();
parseAndCreate
(
line
,
controlLayout
);
}
/**********************************************************************
...
...
@@ -901,11 +904,11 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
controlLayout
->
setLayoutMargins
(
5
,
2
,
5
,
2
,
5
);
/* First line */
InputControlsWidget
*
inputC
=
new
InputControlsWidget
(
p_intf
);
// controlLayout->addWidget( inputC, 0, 0, 1, -1
);
InputControlsWidget
*
inputC
=
new
InputControlsWidget
(
p_intf
,
this
);
controlLayout
->
addWidget
(
inputC
);
/* Second line */
/* QString line2
= QString( "%1-2;%2;%3;%4;%5;%2;%6;%2;%7;%2;%8;%9;%10-4")
/* QString line
= QString( "%1-2;%2;%3;%4;%5;%2;%6;%2;%7;%2;%8;%9;%10-4")
.arg( PLAY_BUTTON )
.arg( WIDGET_SPACER )
.arg( PREVIOUS_BUTTON )
...
...
@@ -919,7 +922,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
.arg( VOLUME ); */
QString
line
=
getSettings
()
->
value
(
"MainWindow/FSCline"
,
"0-2;
21;4;2;5;21;18;21;19;21;9;22;23-
4"
).
toString
();
"0-2;
64;3;1;4;64;36;64;37;64;8;65;35-4;3
4"
).
toString
();
parseAndCreate
(
line
,
controlLayout
);
/* hiding timer */
...
...
modules/gui/qt4/components/controller.hpp
View file @
f729cfdf
...
...
@@ -143,7 +143,7 @@ class AbstractController : public QFrame
Q_OBJECT
public:
AbstractController
(
intf_thread_t
*
_p_i
);
AbstractController
(
intf_thread_t
*
_p_i
,
QWidget
*
_parent
=
0
);
protected:
intf_thread_t
*
p_intf
;
...
...
@@ -251,7 +251,7 @@ class AdvControlsWidget : public AbstractController
{
Q_OBJECT
public:
AdvControlsWidget
(
intf_thread_t
*
);
AdvControlsWidget
(
intf_thread_t
*
,
QWidget
*
_parent
=
0
);
};
/* Slider Bar */
...
...
@@ -259,7 +259,7 @@ class InputControlsWidget : public AbstractController
{
Q_OBJECT
public:
InputControlsWidget
(
intf_thread_t
*
);
InputControlsWidget
(
intf_thread_t
*
,
QWidget
*
_parent
=
0
);
};
/* Button Bar */
...
...
@@ -268,7 +268,8 @@ class ControlsWidget : public AbstractController
Q_OBJECT
public:
/* p_intf, advanced control visible or not, blingbling or not */
ControlsWidget
(
intf_thread_t
*
_p_i
,
bool
b_advControls
);
ControlsWidget
(
intf_thread_t
*
_p_i
,
bool
b_advControls
,
QWidget
*
_parent
=
0
);
virtual
~
ControlsWidget
();
protected:
...
...
modules/gui/qt4/dialogs/toolbar.cpp
View file @
f729cfdf
...
...
@@ -54,14 +54,15 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
QSizePolicy
::
MinimumExpanding
);
QGridLayout
*
boxLayout
=
new
QGridLayout
(
widgetBox
);
boxLayout
->
addWidget
(
new
WidgetListing
(
p_intf
,
this
),
0
,
0
,
1
,
-
1
);
flatBox
=
new
QCheckBox
(
qtr
(
"Flat Button"
)
);
bigBox
=
new
QCheckBox
(
qtr
(
"Big Button"
)
);
shinyBox
=
new
QCheckBox
(
qtr
(
"Native Slider"
)
);
shinyBox
->
setChecked
(
true
);
boxLayout
->
addWidget
(
new
WidgetListing
(
p_intf
,
this
),
0
,
0
,
1
,
-
1
);
boxLayout
->
addWidget
(
flatBox
,
1
,
0
);
boxLayout
->
addWidget
(
bigBox
,
1
,
1
);
boxLayout
->
addWidget
(
big
Box
,
1
,
2
);
boxLayout
->
addWidget
(
shiny
Box
,
1
,
2
);
mainLayout
->
addWidget
(
widgetBox
,
0
,
0
,
1
,
-
1
);
...
...
@@ -174,8 +175,8 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
break
;
case
VOLUME
:
{
bool
b_shiny
=
false
;
SoundWidget
*
snd
=
new
SoundWidget
(
this
,
p_intf
,
b_shiny
);
SoundWidget
*
snd
=
new
SoundWidget
(
this
,
p_intf
,
parent
->
getOptions
()
&
WIDGET_SHINY
);
widget
=
snd
;
}
widgetItem
->
setText
(
qtr
(
"Volume"
)
);
...
...
@@ -232,7 +233,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
break
;
case
ADVANCED_CONTROLLER
:
{
AdvControlsWidget
*
advControls
=
new
AdvControlsWidget
(
p_intf
);
AdvControlsWidget
*
advControls
=
new
AdvControlsWidget
(
p_intf
,
this
);
widget
=
advControls
;
}
widgetItem
->
setText
(
qtr
(
"Advanced Buttons"
)
);
...
...
@@ -288,7 +289,7 @@ DroppingController::DroppingController( intf_thread_t *_p_intf )
setFrameShadow
(
QFrame
::
Raised
);
QString
line2
=
getSettings
()
->
value
(
"MainWindow/Controls2"
,
"0-2;
21;4;2;5;21;8;11;10;21;22;20
-4"
).
toString
();
"0-2;
64;3;1;4;64;7;10;9;65;34
-4"
).
toString
();
parseAndCreate
(
line2
,
controlLayout
);
...
...
@@ -329,6 +330,7 @@ void DroppingController::createAndAddWidget( QBoxLayout *controlLayout,
/* Some Widgets are deactivated at creation */
widg
->
setEnabled
(
true
);
widg
->
show
();
controlLayout
->
insertWidget
(
i_index
,
widg
);
}
}
...
...
modules/gui/qt4/dialogs/toolbar.hpp
View file @
f729cfdf
...
...
@@ -55,7 +55,8 @@ public:
}
virtual
~
ToolbarEditDialog
();
int
getOptions
()
{
return
flatBox
->
isChecked
()
*
WIDGET_FLAT
+
bigBox
->
isChecked
()
*
WIDGET_BIG
;
}
bigBox
->
isChecked
()
*
WIDGET_BIG
+
shinyBox
->
isChecked
()
*
WIDGET_SHINY
;
}
private:
ToolbarEditDialog
(
intf_thread_t
*
);
static
ToolbarEditDialog
*
instance
;
...
...
modules/gui/qt4/main_interface.cpp
View file @
f729cfdf
...
...
@@ -375,10 +375,10 @@ void MainInterface::handleMainUi( QSettings *settings )
/* Create the CONTROLS Widget */
controls
=
new
ControlsWidget
(
p_intf
,
settings
->
value
(
"adv-controls"
,
false
).
toBool
()
);
settings
->
value
(
"adv-controls"
,
false
).
toBool
()
,
this
);
CONNECT
(
controls
,
advancedControlsToggled
(
bool
),
this
,
doComponentsUpdate
()
);
InputControlsWidget
*
inputC
=
new
InputControlsWidget
(
p_intf
);
InputControlsWidget
*
inputC
=
new
InputControlsWidget
(
p_intf
,
this
);
/* Add the controls Widget to the main Widget */
mainLayout
->
insertWidget
(
0
,
controls
,
0
,
Qt
::
AlignBottom
);
...
...
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