Skip to content

Commit

Permalink
qmlplayer: ui update
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Dec 2, 2015
1 parent 3298dc0 commit 990968f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/QMLPlayer/qml/QMLPlayer/Button.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
Copyright (C) 2013 Wang Bin <[email protected]>
Copyright (C) 2013-2015 Wang Bin <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
27 changes: 15 additions & 12 deletions examples/QMLPlayer/qml/QMLPlayer/MiscPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Page {
Row {
width: parent.width
height: Utils.kItemHeight
visible: Qt.platform.os === "linux"
Button {
text: "EGL"
visible: Qt.platform.os === "linux"
checkable: true
checked: PlayerConfig.EGL
width: parent.width/3
Expand All @@ -47,27 +47,29 @@ Page {
width: parent.width*2/3
height: parent.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr("Requirement") + ": Qt>=5.5+XCB"
}
}
Text {
width: parent.width
height: Utils.kItemHeight
color: "white"
font.pixelSize: Utils.kFontSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
visible: glSet.visible
text: "OpenGL (" + qsTr("Restart to apply") + ")"
}
Row {
id: glSet
width: parent.width
height: 3*Utils.kItemHeight
height: 5*Utils.kItemHeight
spacing: Utils.kSpacing
visible: Qt.platform.os === "windows"
Text {
width: parent.width/3
height: parent.height
color: "white"
font.pixelSize: Utils.kFontSize
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
visible: glSet.visible
text: "OpenGL\n(" + qsTr("Restart to apply") + ")"
}
Menu {
width: parent.width/3
height: parent.height
itemWidth: width
model: ListModel {
id: glModel
Expand Down Expand Up @@ -135,6 +137,7 @@ Page {
width: parent.width/3
height: parent.height
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "Log"
}
Menu {
Expand Down
2 changes: 1 addition & 1 deletion examples/QMLPlayer/qml/QMLPlayer/ProgressBar.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
Copyright (C) 2013 Wang Bin <[email protected]>
Copyright (C) 2013-2015 Wang Bin <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion examples/QMLPlayer/qml/QMLPlayer/Slider.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
Copyright (C) 2013 Wang Bin <[email protected]>
Copyright (C) 2013-2015 Wang Bin <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion examples/QMLPlayer/qml/QMLPlayer/VideoCodec.qml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Page {
Component.onCompleted: {
if (Qt.platform.os == "windows") {
codecMode.append({ name: "DXVA", hardware: true, zcopy: true, description: "DirectX Video Acceleration (Windows)\nUse OpenGLES(ANGLE) + D3D to support 0-copy" })
codecMode.append({ name: "CUDA", hardware: true, zcopy: true, description: "NVIDIA CUDA (Windows, Linux)"})
codecMode.append({ name: "CUDA", hardware: true, zcopy: true, description: "NVIDIA CUDA (Windows, Linux).\nH264 10bit support."})
} else if (Qt.platform.os == "osx") {
codecMode.append({ name: "VDA", hardware: true, zcopy: true, description: "VDA (OSX)" })
codecMode.append({ name: "VideoToolbox", hardware: true, zcopy: true, description: "VideoToolbox (OSX)" })
Expand Down
6 changes: 5 additions & 1 deletion examples/QMLPlayer/qml/QMLPlayer/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Rectangle {
msg.info("capture saved at: " + path)
}
}
onSourceChanged: {
msg.info("url: " + source)
}

onDurationChanged: control.duration = duration
onPlaying: {
Expand Down Expand Up @@ -233,6 +236,7 @@ Rectangle {
}
Text {
id: msg
objectName: "msg"
horizontalAlignment: Text.AlignHCenter
font.pixelSize: Utils.scaled(20)
style: Text.Outline
Expand Down Expand Up @@ -385,7 +389,7 @@ Rectangle {
anchors.right: configPanel.left
//anchors.bottom: control.top
y: Math.max(0, Math.min(configPanel.selectedY, root.height - pageLoader.height - control.height))
width: parent.width - 2*configPanel.width
width: parent.width < 4*configPanel.width ? parent.width - configPanel.width : parent.width/2 + configPanel.width
height: Utils.scaled(200)
Loader {
id: pageLoader
Expand Down

0 comments on commit 990968f

Please sign in to comment.