Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
154 changes: 77 additions & 77 deletions qml/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,96 +21,96 @@

import QtQuick 2.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
import QtQuick.Window 2.1

import org.kde.kirigami 1.0 as Kirigami
import QtQuick.Controls 2.0 as Controls
import org.kde.kirigami 2.0 as Kirigami

Kirigami.ScrollablePage {
id: aboutPage
title: qsTr("About")

Flickable {
id: flick
width:parent.width
height: parent.height
anchors.top: parent.top
contentHeight: column1.height

Column{
id: column1
width: parent.width
spacing: 15

Image{
source: mainWindow.appIcon
height: 128
width: 128
fillMode: Image.PreserveAspectFit
anchors {
horizontalCenter: parent.horizontalCenter
}

Column {
width: parent.width
spacing: 15

Image {
source: mainWindow.appIcon
height: 128
width: 128
fillMode: Image.PreserveAspectFit

anchors {
horizontalCenter: parent.horizontalCenter
}
Kirigami.Label {
font.bold: true
text: mainWindow.appName+" v"+mainWindow.version
anchors.horizontalCenter: parent.horizontalCenter
}

Kirigami.Heading {
text: mainWindow.appName+" v" + mainWindow.version
anchors.horizontalCenter: parent.horizontalCenter
}

Kirigami.Label {
text: qsTr("License: ") + "LGPLv2"
anchors.horizontalCenter: parent.horizontalCenter
}

Rectangle {
height: 3
width: parent.width-64

}
Kirigami.Label {
text: qsTr("License: LGPLv2")
anchors.horizontalCenter: parent.horizontalCenter
}
Rectangle{
gradient: Gradient {
GradientStop { position: 0.0; color: "#333333" }
GradientStop { position: 1.0; color: "#777777" }
}
anchors {
horizontalCenter: parent.horizontalCenter
}
height: 3
width: parent.width-64
gradient: Gradient {
GradientStop { position: 0.0; color: "#333333" }
GradientStop { position: 1.0; color: "#777777" }
}

Kirigami.Label {
width: aboutPage.width
font.bold: true
text: qsTr("Copyright (c) 2014-2015 Leszek Lesner &lt;leszek@zevenos.com&gt;<br>Copyright (c) 2016 JBBGameich &lt;jbb.mail@gmx.de&gt;") // JBBgameich: I'm still not sure how I should write this text, maybe just "developed by Leszek Lesner, contributors: JBBgameich..."
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignHCenter
anchors {
horizontalCenter: parent.horizontalCenter
}
Rectangle{
gradient: Gradient {
GradientStop { position: 0.0; color: "#333333" }
GradientStop { position: 1.0; color: "#777777" }
}
anchors {
horizontalCenter: parent.horizontalCenter
}
height: 3
width: parent.width-64
}

Kirigami.Label {
width: aboutPage.width
font.bold: true
text: qsTr("Copyright (c) 2014-2015 Leszek Lesner &lt;leszek@zevenos.com&gt;<br>Copyright (c) 2016 JBBGameich &lt;jbb.mail@gmx.de&gt;")
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignHCenter
}

Rectangle {
height: 3
width: parent.width-64

gradient: Gradient {
GradientStop { position: 0.0; color: "#333333" }
GradientStop { position: 1.0; color: "#777777" }
}

Button {
id: homepage
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Sourcecode on Github")
onClicked: {
Qt.openUrlExternally("https://github.com/llelectronics/videoPlayer/tree/plasma");
}
anchors {
horizontalCenter: parent.horizontalCenter
}

Kirigami.Label {
width: parent.width-70
text: qsTr("A simple videoplayer based on gstreamer.")
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignHCenter
height: 200
wrapMode: Text.WordWrap
}

Controls.ToolButton {
id: homepage
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Sourcecode on Github")
onClicked: {
Qt.openUrlExternally("https://github.com/llelectronics/videoPlayer/tree/plasma");
}
}

Kirigami.Label {
width: parent.width-70
text: qsTr("A simple videoplayer based on gstreamer.")
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignHCenter
}

Controls.Button {
text: qsTr("Close")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: pageStack.replace(openDialogComponent)
}
}
}
61 changes: 61 additions & 0 deletions qml/GlobalDrawer.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Copyright (C) 2017 JBBgameich <jbb.mail@gmx.de>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) version 3, or any
* later version accepted by the membership of KDE e.V. (or its
* successor approved by the membership of KDE e.V.), which shall
* act as a proxy defined in Section 6 of version 3 of the license.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/

import org.kde.kirigami 2.0 as Kirigami

Kirigami.GlobalDrawer {
title: "Video Player"
titleIcon: "vplayer"

drawerOpen: false
// show open button on the left side
handleVisible: true
modal: true

actions: [
Kirigami.Action {
text: qsTr("History")
iconName: "view-list-icons"
onTriggered: pageStack.replace(historyPageComponent)
},
Kirigami.Action {
text: qsTr("Youtube Search")
iconName: "smtube"
onTriggered: pageStack.replace(youtubeSearchComponent)
},
Kirigami.Action {
text: qsTr("Open File")
iconName: "document-open"
onTriggered: pageStack.replace(openDialogComponent)
},
Kirigami.Action {
text: qsTr("Open Url")
iconName: "applications-internet"
onTriggered: pageStack.replace(openUrlComponent)
},
Kirigami.Action {
text: qsTr("About Video Player")
iconName: "help-about"
onTriggered: pageStack.replace(aboutPageComponent)
}
]
}

30 changes: 13 additions & 17 deletions qml/HistoryPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,29 @@

import QtQuick 2.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.0
import QtQuick.Controls 2.0
import QtQuick.Window 2.1

import org.kde.kirigami 1.0 as Kirigami
import org.kde.kirigami 2.0 as Kirigami

Kirigami.ScrollablePage {
id: historyPage
title: qsTr("History")

ListView {
anchors.fill: historyPage
anchors.fill: parent
model: mainWindow.historyModel

delegate: Kirigami.BasicListItem {
width: parent.width - (parent.width / 32)
height: implicitHeight
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
console.debug("Clicked " + htitle + " with url: " + hurl)
mainWindow.loadPlayer(htitle,hurl)
}
Kirigami.Label {
anchors.left: parent.left
anchors.right: parent.right
height: implicitHeight
width: parent.width
reserveSpaceForIcon: true

icon: "video-mp4"
label: htitle

elide: Text.ElideRight
text: htitle
onClicked: {
console.debug("Clicked " + htitle + " with url: " + hurl);
mainWindow.loadPlayer(htitle,hurl);
pageStack.pop(historyPage);
}
}
}
Expand Down
39 changes: 6 additions & 33 deletions qml/OpenDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@

import QtQuick 2.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.2
import QtQuick.Window 2.1
import org.kde.kirigami 2.0 as Kirigami
import Qt.labs.folderlistmodel 2.2

import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kirigami 1.0 as Kirigami
import Qt.labs.folderlistmodel 2.1

Kirigami.Page {
Kirigami.ScrollablePage {
id: page
title: qsTr("Open File")

Expand Down Expand Up @@ -88,26 +84,11 @@ Kirigami.Page {
anchors.fill: parent

delegate: Kirigami.BasicListItem {
id: delegate
width: parent.width
enabled: true

Column {
width: parent.width

Kirigami.Label {
anchors.left: parent.left
anchors.leftMargin: units.largeSpacing
text: fileName + (fileIsDir ? "/" : "")
}
reserveSpaceForIcon: true

Kirigami.Label {
visible: !fileIsDir
anchors.left: parent.left
text: fileSize + ", " + fileModified
color: theme.linkColor
}
}
icon: (fileIsDir ? "folder" : "text-x-plain")
label: fileName + (fileIsDir ? "/" : "")

onClicked: {
if (fileIsDir) {
Expand All @@ -119,13 +100,5 @@ Kirigami.Page {
}
}
}

PlasmaComponents.ScrollBar {
id: scrollBar
flickableItem: view
anchors.right: parent.right
width: parent.width / 64
interactive: true
}
}
}
Loading