[vlc-devel] [PATCH 13/15] qml: Add miniplayer toolbar to Editor
Rohan Rajpal
rohan17089 at iiitd.ac.in
Mon Aug 12 15:24:27 CEST 2019
Add the miniplayer tab and toolbar to the editor
---
modules/gui/qt/qml/dialogs/ToolbarEditor.qml | 32 +++++++++++++++++--
.../qml/dialogs/ToolbarEditorButtonList.qml | 1 +
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/qml/dialogs/ToolbarEditor.qml b/modules/gui/qt/qml/dialogs/ToolbarEditor.qml
index faadccf25f..a05586a687 100644
--- a/modules/gui/qt/qml/dialogs/ToolbarEditor.qml
+++ b/modules/gui/qt/qml/dialogs/ToolbarEditor.qml
@@ -42,6 +42,12 @@ Rectangle{
index: 0
text: qsTr("Mainplayer")
}
+
+ EditorTabButton {
+ id: miniPlayerTab
+ index: 1
+ text: qsTr("Miniplayer")
+ }
}
Rectangle{
Layout.preferredHeight: VLCStyle.heightBar_large
@@ -59,6 +65,14 @@ Rectangle{
Layout.fillWidth: true
model: playerControlBarModel
}
+
+ EditorDNDView {
+ id : miniPlayerBtnDND
+ Layout.preferredHeight: VLCStyle.heightBar_large
+ Layout.fillWidth: true
+ model: miniPlayerModel
+ }
+
}
}
@@ -111,8 +125,8 @@ Rectangle{
}
- function getConfig(){
- return playerControlBarModel.getConfig()
+ function getProfileConfig(){
+ return playerControlBarModel.getConfig() + "|" + miniPlayerModel.getConfig()
}
Connections{
@@ -120,8 +134,13 @@ Rectangle{
onUpdatePlayerModel: {
if (toolbarName == "MainPlayerToolbar")
playerControlBarModel.reloadConfig(config)
+ else
+ miniPlayerModel.reloadConfig(config)
+ }
+ onSaveConfig: {
+ miniPlayerModel.saveConfig()
+ playerControlBarModel.saveConfig()
}
- onSaveConfig: playerControlBarModel.saveConfig()
}
PlayerControlBarModel {
@@ -132,6 +151,13 @@ Rectangle{
Component.onCompleted: reloadModel()
}
+ PlayerControlBarModel {
+ id: miniPlayerModel
+ mainCtx: mainctx
+ configName: "MiniPlayerToolbar"
+ Component.onCompleted: reloadModel()
+ }
+
Player.ControlButtons{
id: controlButtons
}
diff --git a/modules/gui/qt/qml/dialogs/ToolbarEditorButtonList.qml b/modules/gui/qt/qml/dialogs/ToolbarEditorButtonList.qml
index 28594a5698..382dbc618a 100644
--- a/modules/gui/qt/qml/dialogs/ToolbarEditorButtonList.qml
+++ b/modules/gui/qt/qml/dialogs/ToolbarEditorButtonList.qml
@@ -54,6 +54,7 @@ GridView{
var pos = this.mapToGlobal( mouseX, mouseY)
buttonDragItem.updatePos(pos.x, pos.y)
playerBtnDND.addBtn = true
+ miniPlayerBtnDND.addBtn = true
}
onReleased: {
--
2.17.1
More information about the vlc-devel
mailing list