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