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
46bc5558
Commit
46bc5558
authored
Jan 19, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: save and honour the above-video parameter to allow old-fashion GUI.
parent
9cf2944f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
28 deletions
+40
-28
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+7
-9
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/components/controller.hpp
+7
-0
modules/gui/qt4/dialogs/toolbar.cpp
modules/gui/qt4/dialogs/toolbar.cpp
+15
-10
modules/gui/qt4/dialogs/toolbar.hpp
modules/gui/qt4/dialogs/toolbar.hpp
+2
-0
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+9
-9
No files found.
modules/gui/qt4/components/controller.cpp
View file @
46bc5558
...
...
@@ -704,14 +704,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
QHBoxLayout
*
controlLayout1
=
new
QHBoxLayout
;
controlLayout1
->
setSpacing
(
0
);
QString
line1
=
getSettings
()
->
value
(
"MainToolbar1"
,
"64;38;64;37-4;65;"
)
.
toString
();
QString
line1
=
getSettings
()
->
value
(
"MainToolbar1"
,
MAIN_TB1_DEFAULT
)
.
toString
();
parseAndCreate
(
line1
,
controlLayout1
);
QHBoxLayout
*
controlLayout2
=
new
QHBoxLayout
;
controlLayout2
->
setSpacing
(
0
);
QString
line2
=
getSettings
()
->
value
(
"MainToolbar2"
,
"0-2;64;3;1;4;64;7;10;9;64-4;36-4;65;35-4;"
)
.
toString
();
QString
line2
=
getSettings
()
->
value
(
"MainToolbar2"
,
MAIN_TB2_DEFAULT
)
.
toString
();
parseAndCreate
(
line2
,
controlLayout2
);
if
(
!
b_advancedVisible
&&
advControls
)
advControls
->
hide
();
...
...
@@ -747,7 +747,7 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i, QWidget *_parent ) :
controlLayout
->
setMargin
(
0
);
controlLayout
->
setSpacing
(
0
);
QString
line
=
getSettings
()
->
value
(
"AdvToolbar"
,
"12;11;13;14"
)
QString
line
=
getSettings
()
->
value
(
"AdvToolbar"
,
ADV_TB_DEFAULT
)
.
toString
();
parseAndCreate
(
line
,
controlLayout
);
}
...
...
@@ -759,8 +759,7 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent
controlLayout
->
setMargin
(
0
);
controlLayout
->
setSpacing
(
0
);
QString
line
=
getSettings
()
->
value
(
"InputToolbar"
,
"5-1;33;6-1"
).
toString
();
QString
line
=
getSettings
()
->
value
(
"InputToolbar"
,
INPT_TB_DEFAULT
).
toString
();
parseAndCreate
(
line
,
controlLayout
);
}
/**********************************************************************
...
...
@@ -799,8 +798,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
controlLayout2
->
addWidget
(
inputC
);
controlLayout
=
new
QHBoxLayout
;
QString
line
=
getSettings
()
->
value
(
"FSCtoolbar"
,
"0-2;64;3;1;4;64;36;64;37;64;8;65;35-4;34;"
).
toString
();
QString
line
=
getSettings
()
->
value
(
"FSCtoolbar"
,
FSC_TB_DEFAULT
).
toString
();
parseAndCreate
(
line
,
controlLayout
);
controlLayout2
->
addLayout
(
controlLayout
);
...
...
modules/gui/qt4/components/controller.hpp
View file @
46bc5558
...
...
@@ -35,6 +35,13 @@
#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
#define MAIN_TB1_DEFAULT "64;38;64;37-4;65"
#define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;10;9;64-4;36-4;65;35-4"
#define ADV_TB_DEFAULT "12;11;13;14"
#define INPT_TB_DEFAULT "5-1;33;6-1"
#define FSC_TB_DEFAULT "0-2;64;3;1;4;64;36;64;37;64;8;65;35-4;34"
class
QPixmap
;
class
QLabel
;
...
...
modules/gui/qt4/dialogs/toolbar.cpp
View file @
46bc5558
...
...
@@ -74,20 +74,22 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
QLabel
*
label
=
new
QLabel
(
qtr
(
"Toolbar position:"
)
);
mainTboxLayout
->
addWidget
(
label
,
0
,
0
,
1
,
2
);
QComboBox
*
positionCombo
=
new
QComboBox
;
positionCombo
->
addItem
s
(
QStringList
()
<<
qtr
(
"Above the Video"
)
<<
qtr
(
"Under the Video"
)
);
positionCombo
=
new
QComboBox
;
positionCombo
->
addItem
(
qtr
(
"Under the Video"
),
QVariant
(
0
)
);
positionCombo
->
addItem
(
qtr
(
"Above the Video"
),
QVariant
(
1
)
);
mainTboxLayout
->
addWidget
(
positionCombo
,
0
,
2
,
1
,
1
);
QLabel
*
line1Label
=
new
QLabel
(
"Line 1:"
);
QString
line1
=
getSettings
()
->
value
(
"MainWindow/MainToolbar1"
).
toString
();
QString
line1
=
getSettings
()
->
value
(
"MainWindow/MainToolbar1"
,
MAIN_TB1_DEFAULT
).
toString
();
controller1
=
new
DroppingController
(
p_intf
,
line1
,
this
);
mainTboxLayout
->
addWidget
(
line1Label
,
1
,
0
,
1
,
1
);
mainTboxLayout
->
addWidget
(
controller1
,
1
,
1
,
1
,
2
);
QLabel
*
line2Label
=
new
QLabel
(
"Line 2:"
);
QString
line2
=
getSettings
()
->
value
(
"MainWindow/MainToolbar2"
).
toString
();
QString
line2
=
getSettings
()
->
value
(
"MainWindow/MainToolbar2"
,
MAIN_TB2_DEFAULT
).
toString
();
controller2
=
new
DroppingController
(
p_intf
,
line2
,
this
);
mainTboxLayout
->
addWidget
(
line2Label
,
2
,
0
,
1
,
1
);
...
...
@@ -95,8 +97,8 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
/* Advanced ToolBar */
QLabel
*
advLabel
=
new
QLabel
(
qtr
(
"Advanced Widget toolbar:"
)
);
QString
lineA
=
getSettings
()
->
value
(
"MainWindow/AdvToolbar"
)
.
toString
();
QString
lineA
=
getSettings
()
->
value
(
"MainWindow/AdvToolbar"
,
ADV_TB_DEFAULT
)
.
toString
();
controllerA
=
new
DroppingController
(
p_intf
,
lineA
,
this
);
mainTboxLayout
->
addWidget
(
advLabel
,
3
,
0
,
1
,
2
);
...
...
@@ -108,7 +110,8 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
QGroupBox
*
timeToolbarBox
=
new
QGroupBox
(
qtr
(
"Time Toolbar"
)
,
this
);
QGridLayout
*
timeTboxLayout
=
new
QGridLayout
(
timeToolbarBox
);
QString
line
=
getSettings
()
->
value
(
"MainWindow/InputToolbar"
).
toString
();
QString
line
=
getSettings
()
->
value
(
"MainWindow/InputToolbar"
,
INPT_TB_DEFAULT
).
toString
();
controller
=
new
DroppingController
(
p_intf
,
line
,
this
);
timeTboxLayout
->
addWidget
(
controller
,
0
,
0
,
1
,
-
1
);
...
...
@@ -120,8 +123,8 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
this
);
QGridLayout
*
FSCTboxLayout
=
new
QGridLayout
(
FSCToolbarBox
);
QString
lineFSC
=
getSettings
()
->
value
(
"MainWindow/FSCtoolbar"
)
.
toString
();
QString
lineFSC
=
getSettings
()
->
value
(
"MainWindow/FSCtoolbar"
,
FSC_TB_DEFAULT
)
.
toString
();
controllerFSC
=
new
DroppingController
(
p_intf
,
lineFSC
,
this
);
FSCTboxLayout
->
addWidget
(
controllerFSC
,
0
,
0
,
1
,
-
1
);
...
...
@@ -149,6 +152,8 @@ void ToolbarEditDialog::close()
{
msg_Dbg
(
p_intf
,
"Close and save"
);
hide
();
getSettings
()
->
setValue
(
"MainWindow/ToolbarPos"
,
positionCombo
->
itemData
(
positionCombo
->
currentIndex
()
).
toInt
()
);
getSettings
()
->
setValue
(
"MainWindow/MainToolbar1"
,
controller1
->
getValue
()
);
getSettings
()
->
setValue
(
"MainWindow/MainToolbar2"
,
controller2
->
getValue
()
);
getSettings
()
->
setValue
(
"MainWindow/AdvToolbar"
,
controllerA
->
getValue
()
);
...
...
modules/gui/qt4/dialogs/toolbar.hpp
View file @
46bc5558
...
...
@@ -34,6 +34,7 @@
class
ToolbarEditDialog
;
class
DroppingController
;
class
QCheckBox
;
class
QComboBox
;
class
WidgetListing
:
public
QListWidget
{
...
...
@@ -65,6 +66,7 @@ private:
static
ToolbarEditDialog
*
instance
;
QCheckBox
*
flatBox
,
*
bigBox
,
*
shinyBox
;
QComboBox
*
positionCombo
;
WidgetListing
*
widgetListing
;
DroppingController
*
controller1
,
*
controller2
,
*
controllerA
;
...
...
modules/gui/qt4/main_interface.cpp
View file @
46bc5558
...
...
@@ -362,11 +362,7 @@ void MainInterface::handleMainUi( QSettings *settings )
this
,
doComponentsUpdate
()
);
inputC
=
new
InputControlsWidget
(
p_intf
,
this
);
/* Add the controls Widget to the main Widget */
mainLayout
->
insertWidget
(
0
,
controls
,
0
,
Qt
::
AlignBottom
);
mainLayout
->
insertWidget
(
0
,
inputC
,
0
,
Qt
::
AlignBottom
);
/* Visualisation */
/* Visualisation */
/* Disabled for now, they SUCK */
#if 0
visualSelector = new VisualSelector( p_intf );
...
...
@@ -379,7 +375,6 @@ void MainInterface::handleMainUi( QSettings *settings )
bgWidget
->
resize
(
settings
->
value
(
"backgroundSize"
,
QSize
(
300
,
200
)
).
toSize
()
);
bgWidget
->
updateGeometry
();
mainLayout
->
insertWidget
(
0
,
bgWidget
);
CONNECT
(
this
,
askBgWidgetToToggle
(),
bgWidget
,
toggle
()
);
if
(
i_visualmode
!=
QT_ALWAYS_VIDEO_MODE
&&
...
...
@@ -390,10 +385,15 @@ void MainInterface::handleMainUi( QSettings *settings )
/* And video Outputs */
if
(
videoEmbeddedFlag
)
{
videoWidget
=
new
VideoWidget
(
p_intf
);
mainLayout
->
insertWidget
(
0
,
videoWidget
,
10
);
}
/* Add the controls Widget to the main Widget */
mainLayout
->
insertWidget
(
0
,
bgWidget
);
if
(
videoWidget
)
mainLayout
->
insertWidget
(
0
,
videoWidget
,
10
);
mainLayout
->
insertWidget
(
2
,
inputC
,
0
,
Qt
::
AlignBottom
);
mainLayout
->
insertWidget
(
settings
->
value
(
"ToolbarPos"
,
0
).
toInt
()
?
0
:
3
,
controls
,
0
,
Qt
::
AlignBottom
);
/* Finish the sizing */
main
->
updateGeometry
();
...
...
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