mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
qml: export player toolbar controls
This commit is contained in:
parent
79dd1d5258
commit
65fa26528d
@ -755,6 +755,37 @@ libqt_plugin_la_QML = \
|
||||
gui/qt/player/qml/TrackInfo.qml \
|
||||
gui/qt/player/qml/VolumeWidget.qml \
|
||||
gui/qt/player/qml/ButtonsLayout.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/AspectRatioWidget.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/AtoBButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/BackButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/ChapterNextButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/ChapterPreviousButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/ExpandingSpacerWidget.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/ExtendedSettingsButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/FasterButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/FrameButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/FullscreenButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/InfoButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/LangButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/LoopButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/MenuButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/NextButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/OpenButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/PlaybackSpeedButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/PlayButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/PlayerSwitchButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/PlaylistButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/PreviousButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/QuitButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/RandomButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/RecordButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/SkipBackButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/SkipForwardButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/SlowerButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/SnapshotButton.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/SpacerWidget.qml \
|
||||
gui/qt/player/qml/controlbarcontrols/StopButton.qml \
|
||||
gui/qt/playlist/qml/PlaylistDelegate.qml \
|
||||
gui/qt/playlist/qml/PlaylistListView.qml \
|
||||
gui/qt/playlist/qml/PlaylistOverlayMenu.qml \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*****************************************************************************
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2019 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -16,16 +16,13 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Layouts 1.11
|
||||
import QtQuick.Controls 2.4
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQml 2.11
|
||||
|
||||
import org.videolan.vlc 0.1
|
||||
|
||||
import "qrc:///player/controlbarcontrols/" as Controls
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
import "qrc:///util/Helpers.js" as Helpers
|
||||
|
||||
QtObject {
|
||||
id: controlButtons
|
||||
@ -102,771 +99,69 @@ QtObject {
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component backBtnDelegate : Widgets.IconControlButton {
|
||||
id: backBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.exit
|
||||
text: i18n.qtr("Back")
|
||||
onClicked: history.previous()
|
||||
}
|
||||
readonly property Component backBtnDelegate : Controls.BackButton { }
|
||||
|
||||
readonly property Component randomBtnDelegate : Widgets.IconControlButton {
|
||||
id: randomBtn
|
||||
size: VLCStyle.icon_medium
|
||||
checked: mainPlaylistController.random
|
||||
iconText: VLCIcons.shuffle_on
|
||||
onClicked: mainPlaylistController.toggleRandom()
|
||||
text: i18n.qtr("Random")
|
||||
}
|
||||
readonly property Component randomBtnDelegate : Controls.RandomButton { }
|
||||
|
||||
readonly property Component prevBtnDelegate : Widgets.IconControlButton {
|
||||
id: prevBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.previous
|
||||
enabled: mainPlaylistController.hasPrev
|
||||
onClicked: mainPlaylistController.prev()
|
||||
text: i18n.qtr("Previous")
|
||||
}
|
||||
readonly property Component prevBtnDelegate : Controls.PreviousButton { }
|
||||
|
||||
readonly property Component playBtnDelegate : ToolButton {
|
||||
id: playBtn
|
||||
readonly property Component playBtnDelegate : Controls.PlayButton { }
|
||||
|
||||
width: VLCStyle.icon_medium
|
||||
height: width
|
||||
readonly property Component nextBtnDelegate : Controls.NextButton { }
|
||||
|
||||
scale: (playBtnMouseArea.pressed) ? 0.95 : 1.0
|
||||
readonly property Component chapterPreviousBtnDelegate : Controls.ChapterPreviousButton { }
|
||||
|
||||
property VLCColors colors: VLCStyle.colors
|
||||
readonly property Component chapterNextBtnDelegate : Controls.ChapterNextButton { }
|
||||
|
||||
property color color: colors.buttonPlayIcon
|
||||
readonly property Component repeatBtnDelegate : Controls.LoopButton { }
|
||||
|
||||
property color colorDisabled: colors.textInactive
|
||||
readonly property Component langBtnDelegate : Controls.LangButton { }
|
||||
|
||||
property bool paintOnly: false
|
||||
readonly property Component playlistBtnDelegate : Controls.PlaylistButton { }
|
||||
|
||||
property bool isCursorInside: false
|
||||
readonly property Component menuBtnDelegate : Controls.MenuButton { }
|
||||
|
||||
Keys.onPressed: {
|
||||
if (KeyHelper.matchOk(event) ) {
|
||||
event.accepted = true
|
||||
}
|
||||
Navigation.defaultKeyAction(event)
|
||||
}
|
||||
Keys.onReleased: {
|
||||
if (!event.accepted && KeyHelper.matchOk(event))
|
||||
mainPlaylistController.togglePlayPause()
|
||||
}
|
||||
readonly property Component spacerDelegate : Controls.SpacerWidget { }
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hovered"
|
||||
when: interactionIndicator
|
||||
readonly property Component extendiblespacerDelegate : Controls.ExpandingSpacerWidget { }
|
||||
|
||||
PropertyChanges {
|
||||
target: hoverShadow
|
||||
radius: VLCStyle.dp(24, VLCStyle.scale)
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "default"
|
||||
when: !interactionIndicator
|
||||
readonly property Component fullScreenBtnDelegate : Controls.FullscreenButton { }
|
||||
|
||||
PropertyChanges {
|
||||
target: contentLabel
|
||||
color: enabled ? playBtn.color : playBtn.colorDisabled
|
||||
}
|
||||
readonly property Component recordBtnDelegate : Controls.RecordButton { }
|
||||
|
||||
PropertyChanges {
|
||||
target: hoverShadow
|
||||
radius: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
readonly property bool interactionIndicator: (playBtn.activeFocus || playBtn.isCursorInside || playBtn.highlighted)
|
||||
readonly property Component toggleABloopstateDelegate : Controls.AtoBButton { }
|
||||
|
||||
contentItem: Label {
|
||||
id: contentLabel
|
||||
readonly property Component snapshotBtnDelegate : Controls.SnapshotButton { }
|
||||
|
||||
text: (player.playingState !== PlayerController.PLAYING_STATE_PAUSED
|
||||
&& player.playingState !== PlayerController.PLAYING_STATE_STOPPED)
|
||||
? VLCIcons.pause
|
||||
: VLCIcons.play
|
||||
readonly property Component stopBtnDelegate : Controls.StopButton { }
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: VLCStyle.ms75
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
readonly property Component mediainfoBtnDelegate : Controls.InfoButton { }
|
||||
|
||||
font.pixelSize: VLCIcons.pixelSize(VLCStyle.icon_normal)
|
||||
font.family: VLCIcons.fontFamily
|
||||
readonly property Component framebyframeDelegate : Controls.FrameButton { }
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
readonly property Component fasterBtnDelegate : Controls.FasterButton { }
|
||||
|
||||
background: Item {
|
||||
Gradient {
|
||||
id: playBtnGradient
|
||||
GradientStop { position: 0.0; color: VLCStyle.colors.buttonPlayA }
|
||||
GradientStop { position: 1.0; color: VLCStyle.colors.buttonPlayB }
|
||||
}
|
||||
readonly property Component slowerBtnDelegate : Controls.SlowerButton { }
|
||||
|
||||
MouseArea {
|
||||
id: playBtnMouseArea
|
||||
readonly property Component openmediaBtnDelegate : Controls.OpenButton { }
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: VLCStyle.dp(1, VLCStyle.scale)
|
||||
readonly property Component extdSettingsBtnDelegate : Controls.ExtendedSettingsButton { }
|
||||
|
||||
hoverEnabled: true
|
||||
readonly property Component stepFwdBtnDelegate : Controls.SkipForwardButton { }
|
||||
|
||||
readonly property int radius: playBtnMouseArea.width / 2
|
||||
readonly property Component stepBackBtnDelegate : Controls.SkipBackButton { }
|
||||
|
||||
onPositionChanged: {
|
||||
if (Helpers.pointInRadius(
|
||||
(playBtnMouseArea.width / 2) - playBtnMouseArea.mouseX,
|
||||
(playBtnMouseArea.height / 2) - playBtnMouseArea.mouseY,
|
||||
radius)) {
|
||||
// cursor is inside of the round button
|
||||
playBtn.isCursorInside = true
|
||||
}
|
||||
else {
|
||||
// cursor is outside
|
||||
playBtn.isCursorInside = false
|
||||
}
|
||||
}
|
||||
readonly property Component quitBtnDelegate : Controls.QuitButton { }
|
||||
|
||||
onHoveredChanged: {
|
||||
if (!playBtnMouseArea.containsMouse)
|
||||
playBtn.isCursorInside = false
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (!playBtn.isCursorInside)
|
||||
return
|
||||
|
||||
mainPlaylistController.togglePlayPause()
|
||||
}
|
||||
|
||||
onPressAndHold: {
|
||||
if (!playBtn.isCursorInside)
|
||||
return
|
||||
|
||||
mainPlaylistController.stop()
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
id: hoverShadow
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
visible: radius > 0
|
||||
samples: (radius * 2) + 1
|
||||
// opacity: 0.29 // it looks better without this
|
||||
color: "#FF610A"
|
||||
source: opacityMask
|
||||
antialiasing: true
|
||||
|
||||
Behavior on radius {
|
||||
NumberAnimation {
|
||||
duration: VLCStyle.ms75
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
radius: (width * 0.5)
|
||||
anchors.fill: parent
|
||||
anchors.margins: VLCStyle.dp(1, VLCStyle.scale)
|
||||
|
||||
color: VLCStyle.colors.white
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: outerRect
|
||||
anchors.fill: parent
|
||||
|
||||
radius: (width * 0.5)
|
||||
gradient: playBtnGradient
|
||||
|
||||
visible: false
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: innerRect
|
||||
anchors.fill: parent
|
||||
|
||||
radius: (width * 0.5)
|
||||
border.width: VLCStyle.dp(2, VLCStyle.scale)
|
||||
|
||||
color: "transparent"
|
||||
visible: false
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
id: opacityMask
|
||||
anchors.fill: parent
|
||||
|
||||
source: outerRect
|
||||
maskSource: innerRect
|
||||
|
||||
antialiasing: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component nextBtnDelegate : Widgets.IconControlButton {
|
||||
id: nextBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.next
|
||||
enabled: mainPlaylistController.hasNext
|
||||
onClicked: mainPlaylistController.next()
|
||||
text: i18n.qtr("Next")
|
||||
}
|
||||
|
||||
readonly property Component chapterPreviousBtnDelegate : Widgets.IconControlButton {
|
||||
id: chapterPreviousBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.dvd_prev
|
||||
onClicked: player.chapterPrev()
|
||||
enabled: player.hasChapters
|
||||
text: i18n.qtr("Previous chapter")
|
||||
}
|
||||
|
||||
readonly property Component chapterNextBtnDelegate : Widgets.IconControlButton {
|
||||
id: chapterNextBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.dvd_next
|
||||
onClicked: player.chapterNext()
|
||||
enabled: player.hasChapters
|
||||
text: i18n.qtr("Next chapter")
|
||||
}
|
||||
|
||||
readonly property Component repeatBtnDelegate : Widgets.IconControlButton {
|
||||
id: repeatBtn
|
||||
size: VLCStyle.icon_medium
|
||||
checked: mainPlaylistController.repeatMode !== PlaylistControllerModel.PLAYBACK_REPEAT_NONE
|
||||
iconText: (mainPlaylistController.repeatMode === PlaylistControllerModel.PLAYBACK_REPEAT_CURRENT)
|
||||
? VLCIcons.repeat_one
|
||||
: VLCIcons.repeat_all
|
||||
onClicked: mainPlaylistController.toggleRepeatMode()
|
||||
text: i18n.qtr("Repeat")
|
||||
}
|
||||
|
||||
readonly property Component langBtnDelegate : Widgets.IconControlButton {
|
||||
id: langBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.audiosub
|
||||
|
||||
enabled: langMenuLoader.status === Loader.Ready
|
||||
onClicked: langMenuLoader.item.open()
|
||||
|
||||
text: i18n.qtr("Languages and tracks")
|
||||
|
||||
Loader {
|
||||
id: langMenuLoader
|
||||
|
||||
active: (typeof rootPlayer !== 'undefined') && (rootPlayer !== null)
|
||||
|
||||
sourceComponent: LanguageMenu {
|
||||
id: langMenu
|
||||
|
||||
parent: rootPlayer
|
||||
focus: true
|
||||
x: 0
|
||||
y: (rootPlayer.positionSliderY - height)
|
||||
z: 1
|
||||
|
||||
onOpened: {
|
||||
controlButtons.requestLockUnlockAutoHide(true, controlButtons)
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = langMenu
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
controlButtons.requestLockUnlockAutoHide(false, controlButtons)
|
||||
langBtn.forceActiveFocus()
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component playlistBtnDelegate : Widgets.IconControlButton {
|
||||
id: playlistBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.playlist
|
||||
onClicked: {
|
||||
mainInterface.playlistVisible = !mainInterface.playlistVisible
|
||||
if (mainInterface.playlistVisible && mainInterface.playlistDocked) {
|
||||
playlistWidget.gainFocus(playlistBtn)
|
||||
}
|
||||
}
|
||||
|
||||
text: i18n.qtr("Playlist")
|
||||
}
|
||||
|
||||
readonly property Component menuBtnDelegate : Widgets.IconControlButton {
|
||||
id: menuBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.ellipsis
|
||||
text: i18n.qtr("Menu")
|
||||
|
||||
onClicked: contextMenu.popup(this.mapToGlobal(0, 0))
|
||||
|
||||
QmlGlobalMenu {
|
||||
id: contextMenu
|
||||
|
||||
ctx: mainctx
|
||||
|
||||
onAboutToShow: controlButtons.requestLockUnlockAutoHide(true, contextMenu)
|
||||
onAboutToHide: controlButtons.requestLockUnlockAutoHide(false, contextMenu)
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component spacerDelegate : Item {
|
||||
id: spacer
|
||||
enabled: false
|
||||
implicitWidth: VLCStyle.icon_normal
|
||||
implicitHeight: VLCStyle.icon_normal
|
||||
property alias spacetextExt: spacetext
|
||||
property bool paintOnly: false
|
||||
Label {
|
||||
id: spacetext
|
||||
text: VLCIcons.space
|
||||
color: VLCStyle.colors.buttonText
|
||||
visible: parent.paintOnly
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
font.pixelSize: VLCIcons.pixelSize(VLCStyle.icon_medium)
|
||||
font.family: VLCIcons.fontFamily
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component extendiblespacerDelegate : Item {
|
||||
id: extendedspacer
|
||||
|
||||
enabled: false
|
||||
|
||||
implicitWidth: paintOnly ? VLCStyle.widthExtendedSpacer : extraWidth
|
||||
implicitHeight: VLCStyle.icon_normal
|
||||
|
||||
property bool paintOnly: false
|
||||
property alias spacetextExt: spacetext
|
||||
|
||||
readonly property real minimumWidth: 0
|
||||
property real extraWidth: 0
|
||||
|
||||
Label {
|
||||
id: spacetext
|
||||
anchors.centerIn: parent
|
||||
|
||||
text: VLCIcons.space
|
||||
color: VLCStyle.colors.buttonText
|
||||
visible: paintOnly
|
||||
|
||||
font.pixelSize: VLCIcons.pixelSize(VLCStyle.icon_medium)
|
||||
font.family: VLCIcons.fontFamily
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component fullScreenBtnDelegate : Widgets.IconControlButton {
|
||||
id: fullScreenBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.hasVideoOutput
|
||||
iconText: player.fullscreen ? VLCIcons.defullscreen :VLCIcons.fullscreen
|
||||
onClicked: player.fullscreen = !player.fullscreen
|
||||
text: i18n.qtr("fullscreen")
|
||||
}
|
||||
|
||||
readonly property Component recordBtnDelegate : Widgets.IconControlButton {
|
||||
id: recordBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.record
|
||||
enabled: player.isPlaying
|
||||
checked: player.isRecording
|
||||
onClicked: player.toggleRecord()
|
||||
text: i18n.qtr("record")
|
||||
}
|
||||
|
||||
readonly property Component toggleABloopstateDelegate : Widgets.IconControlButton {
|
||||
id: abBtn
|
||||
|
||||
size: VLCStyle.icon_medium
|
||||
checked: player.ABloopState !== PlayerController.ABLOOP_STATE_NONE
|
||||
onClicked: player.toggleABloopState()
|
||||
text: i18n.qtr("A to B")
|
||||
|
||||
iconText: {
|
||||
switch(player.ABloopState) {
|
||||
case PlayerController.ABLOOP_STATE_A: return VLCIcons.atob_bg_b
|
||||
case PlayerController.ABLOOP_STATE_B: return VLCIcons.atob_bg_none
|
||||
case PlayerController.ABLOOP_STATE_NONE: return VLCIcons.atob_bg_ab
|
||||
}
|
||||
}
|
||||
|
||||
Widgets.IconLabel {
|
||||
anchors.centerIn: abBtn.contentItem
|
||||
|
||||
color: abBtn.colors.accent
|
||||
|
||||
text: {
|
||||
switch(player.ABloopState) {
|
||||
case PlayerController.ABLOOP_STATE_A: return VLCIcons.atob_fg_a
|
||||
case PlayerController.ABLOOP_STATE_B: return VLCIcons.atob_fg_ab
|
||||
case PlayerController.ABLOOP_STATE_NONE: return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component snapshotBtnDelegate : Widgets.IconControlButton {
|
||||
id: snapshotBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.snapshot
|
||||
onClicked: player.snapshot()
|
||||
text: i18n.qtr("Snapshot")
|
||||
}
|
||||
|
||||
readonly property Component stopBtnDelegate : Widgets.IconControlButton {
|
||||
id: stopBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.stop
|
||||
onClicked: mainPlaylistController.stop()
|
||||
text: i18n.qtr("Stop")
|
||||
}
|
||||
|
||||
readonly property Component mediainfoBtnDelegate : Widgets.IconControlButton {
|
||||
id: infoBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.info
|
||||
onClicked: dialogProvider.mediaInfoDialog()
|
||||
text: i18n.qtr("Informations")
|
||||
}
|
||||
|
||||
readonly property Component framebyframeDelegate : Widgets.IconControlButton {
|
||||
id: frameBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.frame_by_frame
|
||||
onClicked: player.frameNext()
|
||||
text: i18n.qtr("Next frame")
|
||||
}
|
||||
|
||||
readonly property Component fasterBtnDelegate : Widgets.IconControlButton {
|
||||
id: fasterBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.faster
|
||||
onClicked: player.faster()
|
||||
text: i18n.qtr("Faster")
|
||||
}
|
||||
|
||||
readonly property Component slowerBtnDelegate : Widgets.IconControlButton {
|
||||
id: slowerBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.slower
|
||||
onClicked: player.slower()
|
||||
text: i18n.qtr("Slower")
|
||||
}
|
||||
|
||||
readonly property Component openmediaBtnDelegate : Widgets.IconControlButton {
|
||||
id: openMediaBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.eject
|
||||
onClicked: dialogProvider.openDialog()
|
||||
text: i18n.qtr("Open media")
|
||||
}
|
||||
|
||||
readonly property Component extdSettingsBtnDelegate : Widgets.IconControlButton {
|
||||
id: extdSettingsBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.extended
|
||||
onClicked: dialogProvider.extendedDialog()
|
||||
Accessible.name: i18n.qtr("Extended settings")
|
||||
}
|
||||
|
||||
readonly property Component stepFwdBtnDelegate : Widgets.IconControlButton {
|
||||
id: stepfwdBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.skip_for
|
||||
onClicked: player.jumpFwd()
|
||||
text: i18n.qtr("Step forward")
|
||||
}
|
||||
|
||||
|
||||
readonly property Component stepBackBtnDelegate : Widgets.IconControlButton {
|
||||
id: stepBackBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.skip_back
|
||||
onClicked: player.jumpBwd()
|
||||
text: i18n.qtr("Step back")
|
||||
}
|
||||
|
||||
readonly property Component quitBtnDelegate : Widgets.IconControlButton {
|
||||
id: quitBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.clear
|
||||
onClicked: mainInterface.close()
|
||||
text: i18n.qtr("Quit")
|
||||
}
|
||||
|
||||
readonly property Component aspectRatioDelegate : Widgets.ComboBoxExt {
|
||||
property bool paintOnly: false
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
width: VLCStyle.combobox_width_normal
|
||||
height: VLCStyle.combobox_height_normal
|
||||
textRole: "display"
|
||||
model: player.aspectRatio
|
||||
currentIndex: -1
|
||||
onCurrentIndexChanged: model.toggleIndex(currentIndex)
|
||||
Accessible.name: i18n.qtr("Aspect ratio")
|
||||
}
|
||||
readonly property Component aspectRatioDelegate : Controls.AspectRatioWidget { }
|
||||
|
||||
readonly property Component teletextdelegate : TeletextWidget { }
|
||||
|
||||
readonly property Component volumeBtnDelegate : VolumeWidget { parentWindow: controlButtons.parentWindow }
|
||||
|
||||
readonly property Component playerSwitchBtnDelegate : Widgets.IconControlButton {
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.fullscreen
|
||||
readonly property Component playerSwitchBtnDelegate : Controls.PlayerSwitchButton { }
|
||||
|
||||
onClicked: {
|
||||
if (history.current.view === "player")
|
||||
history.previous()
|
||||
else
|
||||
g_mainDisplay.showPlayer()
|
||||
}
|
||||
readonly property Component artworkInfoDelegate : Controls.ArtworkInfoWidget { }
|
||||
|
||||
text: i18n.qtr("Switch Player")
|
||||
}
|
||||
|
||||
readonly property Component artworkInfoDelegate : Widgets.AnimatedBackground {
|
||||
id: artworkInfoItem
|
||||
|
||||
property bool paintOnly: false
|
||||
|
||||
property VLCColors colors: VLCStyle.colors
|
||||
|
||||
readonly property real minimumWidth: cover.width + VLCStyle.focus_border * 2
|
||||
property real extraWidth: 0
|
||||
|
||||
implicitWidth: playingItemInfoRow.width + VLCStyle.focus_border * 2
|
||||
implicitHeight: playingItemInfoRow.height + VLCStyle.focus_border * 2
|
||||
|
||||
activeBorderColor: colors.bgFocus
|
||||
|
||||
Keys.onPressed: {
|
||||
if (KeyHelper.matchOk(event) ) {
|
||||
event.accepted = true
|
||||
}
|
||||
Navigation.defaultKeyAction(event)
|
||||
}
|
||||
Keys.onReleased: {
|
||||
if (!event.accepted && KeyHelper.matchOk(event))
|
||||
g_mainDisplay.showPlayer()
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: artworkInfoMouseArea
|
||||
anchors.fill: parent
|
||||
visible: !paintOnly
|
||||
onClicked: g_mainDisplay.showPlayer()
|
||||
hoverEnabled: true
|
||||
}
|
||||
|
||||
Row {
|
||||
id: playingItemInfoRow
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
width: (coverItem.width + infoColumn.width + spacing)
|
||||
|
||||
spacing: infoColumn.visible ? VLCStyle.margin_xsmall : 0
|
||||
|
||||
Item {
|
||||
id: coverItem
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
implicitHeight: childrenRect.height
|
||||
implicitWidth: childrenRect.width
|
||||
|
||||
Rectangle {
|
||||
id: coverRect
|
||||
anchors.fill: cover
|
||||
color: colors.bg
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
anchors.fill: coverRect
|
||||
source: coverRect
|
||||
radius: 8
|
||||
samples: 17
|
||||
color: VLCStyle.colors.glowColorBanner
|
||||
spread: 0.2
|
||||
}
|
||||
|
||||
Image {
|
||||
id: cover
|
||||
|
||||
source: {
|
||||
if (paintOnly)
|
||||
VLCStyle.noArtAlbum
|
||||
else
|
||||
(mainPlaylistController.currentItem.artwork && mainPlaylistController.currentItem.artwork.toString())
|
||||
? mainPlaylistController.currentItem.artwork
|
||||
: VLCStyle.noArtAlbum
|
||||
}
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
width: VLCStyle.dp(60)
|
||||
height: VLCStyle.dp(60)
|
||||
|
||||
ToolTip {
|
||||
x: parent.x
|
||||
|
||||
visible: artworkInfoItem.visible
|
||||
&& (titleLabel.implicitWidth > titleLabel.width || artistLabel.implicitWidth > titleLabel.width)
|
||||
&& (artworkInfoMouseArea.containsMouse || artworkInfoItem.active)
|
||||
delay: 500
|
||||
|
||||
contentItem: Text {
|
||||
text: i18n.qtr("%1\n%2\n%3").arg(titleLabel.text).arg(artistLabel.text).arg(progressIndicator.text)
|
||||
color: colors.tooltipTextColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: colors.tooltipColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: infoColumn
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
readonly property real preferredWidth: Math.max(titleLabel.implicitWidth, artistLabel.implicitWidth, progressIndicator.implicitWidth)
|
||||
width: ((artworkInfoItem.extraWidth > preferredWidth) || (paintOnly)) ? preferredWidth
|
||||
: artworkInfoItem.extraWidth
|
||||
|
||||
visible: width > 0
|
||||
|
||||
Widgets.MenuLabel {
|
||||
id: titleLabel
|
||||
|
||||
width: parent.width
|
||||
|
||||
text: {
|
||||
if (paintOnly)
|
||||
i18n.qtr("Title")
|
||||
else
|
||||
mainPlaylistController.currentItem.title
|
||||
}
|
||||
color: colors.text
|
||||
}
|
||||
|
||||
Widgets.MenuCaption {
|
||||
id: artistLabel
|
||||
|
||||
width: parent.width
|
||||
|
||||
text: {
|
||||
if (paintOnly)
|
||||
i18n.qtr("Artist")
|
||||
else
|
||||
mainPlaylistController.currentItem.artist
|
||||
}
|
||||
color: colors.menuCaption
|
||||
}
|
||||
|
||||
Widgets.MenuCaption {
|
||||
id: progressIndicator
|
||||
|
||||
width: parent.width
|
||||
|
||||
text: {
|
||||
if (paintOnly)
|
||||
" -- / -- "
|
||||
else
|
||||
player.time.toString() + " / " + player.length.toString()
|
||||
}
|
||||
color: colors.menuCaption
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Component playbackSpeedButtonDelegate : Widgets.IconControlButton {
|
||||
id: playbackSpeedButton
|
||||
|
||||
size: VLCStyle.icon_medium
|
||||
text: i18n.qtr("Playback Speed")
|
||||
color: playbackSpeedPopup.visible ? colors.accent : colors.playerControlBarFg
|
||||
|
||||
onClicked: playbackSpeedPopup.open()
|
||||
|
||||
PlaybackSpeed {
|
||||
id: playbackSpeedPopup
|
||||
|
||||
z: 1
|
||||
colors: playbackSpeedButton.colors
|
||||
focus: true
|
||||
parent: playbackSpeedButton.paintOnly
|
||||
? playbackSpeedButton // button is not part of main display (ToolbarEditorDialog)
|
||||
: (history.current.view === "player") ? rootPlayer : g_mainDisplay
|
||||
|
||||
onOpened: {
|
||||
// update popup coordinates
|
||||
//
|
||||
// mapFromItem is affected by various properties of source and target objects
|
||||
// which can't be represented in a binding expression so a initial setting in
|
||||
// object defination (x: clamp(...)) doesn't work, so we set x and y on initial open
|
||||
x = Qt.binding(function () {
|
||||
// coords are mapped through playbackSpeedButton.parent so that binding is generated based on playbackSpeedButton.x
|
||||
var mappedParentCoordinates = parent.mapFromItem(playbackSpeedButton.parent, playbackSpeedButton.x, 0)
|
||||
return Helpers.clamp(mappedParentCoordinates.x - ((width - playbackSpeedButton.width) / 2),
|
||||
VLCStyle.margin_xxsmall + VLCStyle.applicationHorizontalMargin,
|
||||
parent.width - VLCStyle.applicationHorizontalMargin - VLCStyle.margin_xxsmall - width)
|
||||
})
|
||||
|
||||
y = Qt.binding(function () {
|
||||
// coords are mapped through playbackSpeedButton.parent so that binding is generated based on playbackSpeedButton.y
|
||||
var mappedParentCoordinates = parent.mapFromItem(playbackSpeedButton.parent, 0, playbackSpeedButton.y)
|
||||
return mappedParentCoordinates.y - playbackSpeedPopup.height - VLCStyle.margin_xxsmall
|
||||
})
|
||||
|
||||
// player related --
|
||||
controlButtons.requestLockUnlockAutoHide(true, controlButtons)
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = playbackSpeedPopup
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
controlButtons.requestLockUnlockAutoHide(false, controlButtons)
|
||||
playbackSpeedButton.forceActiveFocus()
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = undefined
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: VLCStyle.fontSize_normal
|
||||
text: !playbackSpeedButton.paintOnly ? i18n.qtr("%1x").arg(+player.rate.toFixed(2)) : i18n.qtr("1x")
|
||||
color: playbackSpeedButton.background.foregroundColor // IconToolButton.background is a AnimatedBackground
|
||||
}
|
||||
}
|
||||
readonly property Component playbackSpeedButtonDelegate : Controls.PlaybackSpeedButton { }
|
||||
}
|
||||
|
@ -0,0 +1,184 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import org.videolan.vlc 0.1
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.AnimatedBackground {
|
||||
id: artworkInfoItem
|
||||
|
||||
property bool paintOnly: false
|
||||
|
||||
property VLCColors colors: VLCStyle.colors
|
||||
|
||||
readonly property real minimumWidth: cover.width + VLCStyle.focus_border * 2
|
||||
property real extraWidth: 0
|
||||
|
||||
implicitWidth: playingItemInfoRow.width + VLCStyle.focus_border * 2
|
||||
implicitHeight: playingItemInfoRow.height + VLCStyle.focus_border * 2
|
||||
|
||||
activeBorderColor: colors.bgFocus
|
||||
|
||||
Keys.onPressed: {
|
||||
if (KeyHelper.matchOk(event))
|
||||
event.accepted = true
|
||||
|
||||
Navigation.defaultKeyAction(event)
|
||||
}
|
||||
|
||||
Keys.onReleased: {
|
||||
if (KeyHelper.matchOk(event)) {
|
||||
g_mainDisplay.showPlayer()
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: artworkInfoMouseArea
|
||||
anchors.fill: parent
|
||||
visible: !paintOnly
|
||||
onClicked: g_mainDisplay.showPlayer()
|
||||
hoverEnabled: true
|
||||
}
|
||||
|
||||
Row {
|
||||
id: playingItemInfoRow
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
width: (coverItem.width + infoColumn.width + spacing)
|
||||
|
||||
spacing: infoColumn.visible ? VLCStyle.margin_xsmall : 0
|
||||
|
||||
Item {
|
||||
id: coverItem
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
implicitHeight: childrenRect.height
|
||||
implicitWidth: childrenRect.width
|
||||
|
||||
Rectangle {
|
||||
id: coverRect
|
||||
anchors.fill: cover
|
||||
color: colors.bg
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
anchors.fill: coverRect
|
||||
source: coverRect
|
||||
radius: 8
|
||||
samples: 17
|
||||
color: VLCStyle.colors.glowColorBanner
|
||||
spread: 0.2
|
||||
}
|
||||
|
||||
Image {
|
||||
id: cover
|
||||
|
||||
source: {
|
||||
if (paintOnly)
|
||||
VLCStyle.noArtAlbum
|
||||
else
|
||||
(mainPlaylistController.currentItem.artwork && mainPlaylistController.currentItem.artwork.toString())
|
||||
? mainPlaylistController.currentItem.artwork
|
||||
: VLCStyle.noArtAlbum
|
||||
}
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
width: VLCStyle.dp(60)
|
||||
height: VLCStyle.dp(60)
|
||||
|
||||
ToolTip {
|
||||
x: parent.x
|
||||
|
||||
visible: artworkInfoItem.visible
|
||||
&& (titleLabel.implicitWidth > titleLabel.width || artistLabel.implicitWidth > titleLabel.width)
|
||||
&& (artworkInfoMouseArea.containsMouse || artworkInfoItem.active)
|
||||
delay: 500
|
||||
|
||||
contentItem: Text {
|
||||
text: i18n.qtr("%1\n%2\n%3").arg(titleLabel.text).arg(artistLabel.text).arg(progressIndicator.text)
|
||||
color: colors.tooltipTextColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: colors.tooltipColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: infoColumn
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
readonly property real preferredWidth: Math.max(titleLabel.implicitWidth, artistLabel.implicitWidth, progressIndicator.implicitWidth)
|
||||
width: ((artworkInfoItem.extraWidth > preferredWidth) || (paintOnly)) ? preferredWidth
|
||||
: artworkInfoItem.extraWidth
|
||||
|
||||
visible: width > 0
|
||||
|
||||
Widgets.MenuLabel {
|
||||
id: titleLabel
|
||||
|
||||
width: parent.width
|
||||
|
||||
text: {
|
||||
if (paintOnly)
|
||||
i18n.qtr("Title")
|
||||
else
|
||||
mainPlaylistController.currentItem.title
|
||||
}
|
||||
color: colors.text
|
||||
}
|
||||
|
||||
Widgets.MenuCaption {
|
||||
id: artistLabel
|
||||
|
||||
width: parent.width
|
||||
|
||||
text: {
|
||||
if (paintOnly)
|
||||
i18n.qtr("Artist")
|
||||
else
|
||||
mainPlaylistController.currentItem.artist
|
||||
}
|
||||
color: colors.menuCaption
|
||||
}
|
||||
|
||||
Widgets.MenuCaption {
|
||||
id: progressIndicator
|
||||
|
||||
width: parent.width
|
||||
|
||||
text: {
|
||||
if (paintOnly)
|
||||
" -- / -- "
|
||||
else
|
||||
player.time.toString() + " / " + player.length.toString()
|
||||
}
|
||||
color: colors.menuCaption
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Layouts 1.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.ComboBoxExt {
|
||||
property bool paintOnly: false
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
width: VLCStyle.combobox_width_normal
|
||||
height: VLCStyle.combobox_height_normal
|
||||
textRole: "display"
|
||||
model: player.aspectRatio
|
||||
currentIndex: -1
|
||||
onCurrentIndexChanged: model.toggleIndex(currentIndex)
|
||||
Accessible.name: i18n.qtr("Aspect ratio")
|
||||
}
|
53
modules/gui/qt/player/qml/controlbarcontrols/AtoBButton.qml
Normal file
53
modules/gui/qt/player/qml/controlbarcontrols/AtoBButton.qml
Normal file
@ -0,0 +1,53 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: abBtn
|
||||
|
||||
size: VLCStyle.icon_medium
|
||||
checked: player.ABloopState !== PlayerController.ABLOOP_STATE_NONE
|
||||
onClicked: player.toggleABloopState()
|
||||
text: i18n.qtr("A to B")
|
||||
|
||||
iconText: {
|
||||
switch(player.ABloopState) {
|
||||
case PlayerController.ABLOOP_STATE_A: return VLCIcons.atob_bg_b
|
||||
case PlayerController.ABLOOP_STATE_B: return VLCIcons.atob_bg_none
|
||||
case PlayerController.ABLOOP_STATE_NONE: return VLCIcons.atob_bg_ab
|
||||
}
|
||||
}
|
||||
|
||||
Widgets.IconLabel {
|
||||
anchors.centerIn: abBtn.contentItem
|
||||
|
||||
color: abBtn.colors.accent
|
||||
|
||||
text: {
|
||||
switch(player.ABloopState) {
|
||||
case PlayerController.ABLOOP_STATE_A: return VLCIcons.atob_fg_a
|
||||
case PlayerController.ABLOOP_STATE_B: return VLCIcons.atob_fg_ab
|
||||
case PlayerController.ABLOOP_STATE_NONE: return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
30
modules/gui/qt/player/qml/controlbarcontrols/BackButton.qml
Normal file
30
modules/gui/qt/player/qml/controlbarcontrols/BackButton.qml
Normal file
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: backBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.exit
|
||||
text: i18n.qtr("Back")
|
||||
onClicked: history.previous()
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: chapterNextBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.dvd_next
|
||||
onClicked: player.chapterNext()
|
||||
enabled: player.hasChapters
|
||||
text: i18n.qtr("Next chapter")
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: chapterPreviousBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.dvd_prev
|
||||
onClicked: player.chapterPrev()
|
||||
enabled: player.hasChapters
|
||||
text: i18n.qtr("Previous chapter")
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Item {
|
||||
enabled: false
|
||||
|
||||
implicitWidth: paintOnly ? VLCStyle.widthExtendedSpacer : extraWidth
|
||||
implicitHeight: VLCStyle.icon_normal
|
||||
|
||||
property bool paintOnly: false
|
||||
property alias spacetextExt: spacetext
|
||||
|
||||
readonly property real minimumWidth: 0
|
||||
property real extraWidth: 0
|
||||
|
||||
Label {
|
||||
id: spacetext
|
||||
anchors.centerIn: parent
|
||||
|
||||
text: VLCIcons.space
|
||||
color: VLCStyle.colors.buttonText
|
||||
visible: paintOnly
|
||||
|
||||
font.pixelSize: VLCIcons.pixelSize(VLCStyle.icon_medium)
|
||||
font.family: VLCIcons.fontFamily
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: extdSettingsBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.extended
|
||||
onClicked: dialogProvider.extendedDialog()
|
||||
Accessible.name: i18n.qtr("Extended settings")
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: fasterBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.faster
|
||||
onClicked: player.faster()
|
||||
text: i18n.qtr("Faster")
|
||||
}
|
31
modules/gui/qt/player/qml/controlbarcontrols/FrameButton.qml
Normal file
31
modules/gui/qt/player/qml/controlbarcontrols/FrameButton.qml
Normal file
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: frameBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.frame_by_frame
|
||||
onClicked: player.frameNext()
|
||||
text: i18n.qtr("Next frame")
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: fullScreenBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.hasVideoOutput
|
||||
iconText: player.fullscreen ? VLCIcons.defullscreen :VLCIcons.fullscreen
|
||||
onClicked: player.fullscreen = !player.fullscreen
|
||||
text: i18n.qtr("fullscreen")
|
||||
}
|
31
modules/gui/qt/player/qml/controlbarcontrols/InfoButton.qml
Normal file
31
modules/gui/qt/player/qml/controlbarcontrols/InfoButton.qml
Normal file
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: infoBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.info
|
||||
onClicked: dialogProvider.mediaInfoDialog()
|
||||
text: i18n.qtr("Informations")
|
||||
}
|
63
modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml
Normal file
63
modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml
Normal file
@ -0,0 +1,63 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
import "qrc:///player/" as Player
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: langBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.audiosub
|
||||
|
||||
enabled: langMenuLoader.status === Loader.Ready
|
||||
onClicked: langMenuLoader.item.open()
|
||||
|
||||
text: i18n.qtr("Languages and tracks")
|
||||
|
||||
Loader {
|
||||
id: langMenuLoader
|
||||
|
||||
active: (typeof rootPlayer !== 'undefined') && (rootPlayer !== null)
|
||||
|
||||
sourceComponent: Player.LanguageMenu {
|
||||
id: langMenu
|
||||
|
||||
parent: rootPlayer
|
||||
focus: true
|
||||
x: 0
|
||||
y: (rootPlayer.positionSliderY - height)
|
||||
z: 1
|
||||
|
||||
onOpened: {
|
||||
controlButtons.requestLockUnlockAutoHide(true, controlButtons)
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = langMenu
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
controlButtons.requestLockUnlockAutoHide(false, controlButtons)
|
||||
langBtn.forceActiveFocus()
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
35
modules/gui/qt/player/qml/controlbarcontrols/LoopButton.qml
Normal file
35
modules/gui/qt/player/qml/controlbarcontrols/LoopButton.qml
Normal file
@ -0,0 +1,35 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import org.videolan.vlc 0.1
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: repeatBtn
|
||||
size: VLCStyle.icon_medium
|
||||
checked: mainPlaylistController.repeatMode !== PlaylistControllerModel.PLAYBACK_REPEAT_NONE
|
||||
iconText: (mainPlaylistController.repeatMode === PlaylistControllerModel.PLAYBACK_REPEAT_CURRENT)
|
||||
? VLCIcons.repeat_one
|
||||
: VLCIcons.repeat_all
|
||||
onClicked: mainPlaylistController.toggleRepeatMode()
|
||||
text: i18n.qtr("Repeat")
|
||||
}
|
42
modules/gui/qt/player/qml/controlbarcontrols/MenuButton.qml
Normal file
42
modules/gui/qt/player/qml/controlbarcontrols/MenuButton.qml
Normal file
@ -0,0 +1,42 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import org.videolan.vlc 0.1
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: menuBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.ellipsis
|
||||
text: i18n.qtr("Menu")
|
||||
|
||||
onClicked: contextMenu.popup(this.mapToGlobal(0, 0))
|
||||
|
||||
QmlGlobalMenu {
|
||||
id: contextMenu
|
||||
|
||||
ctx: mainctx
|
||||
|
||||
onAboutToShow: controlButtons.requestLockUnlockAutoHide(true, contextMenu)
|
||||
onAboutToHide: controlButtons.requestLockUnlockAutoHide(false, contextMenu)
|
||||
}
|
||||
}
|
31
modules/gui/qt/player/qml/controlbarcontrols/NextButton.qml
Normal file
31
modules/gui/qt/player/qml/controlbarcontrols/NextButton.qml
Normal file
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: nextBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.next
|
||||
enabled: mainPlaylistController.hasNext
|
||||
onClicked: mainPlaylistController.next()
|
||||
text: i18n.qtr("Next")
|
||||
}
|
30
modules/gui/qt/player/qml/controlbarcontrols/OpenButton.qml
Normal file
30
modules/gui/qt/player/qml/controlbarcontrols/OpenButton.qml
Normal file
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: openMediaBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.eject
|
||||
onClicked: dialogProvider.openDialog()
|
||||
text: i18n.qtr("Open media")
|
||||
}
|
217
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
Normal file
217
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
Normal file
@ -0,0 +1,217 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import org.videolan.vlc 0.1
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
import "qrc:///util/Helpers.js" as Helpers
|
||||
|
||||
|
||||
ToolButton {
|
||||
id: playBtn
|
||||
|
||||
width: VLCStyle.icon_medium
|
||||
height: width
|
||||
|
||||
scale: (playBtnMouseArea.pressed) ? 0.95 : 1.0
|
||||
|
||||
property VLCColors colors: VLCStyle.colors
|
||||
|
||||
property color color: colors.buttonPlayIcon
|
||||
|
||||
property color colorDisabled: colors.textInactive
|
||||
|
||||
property bool paintOnly: false
|
||||
|
||||
property bool isCursorInside: false
|
||||
|
||||
Keys.onPressed: {
|
||||
if (KeyHelper.matchOk(event) ) {
|
||||
event.accepted = true
|
||||
}
|
||||
Navigation.defaultKeyAction(event)
|
||||
}
|
||||
Keys.onReleased: {
|
||||
if (!event.accepted && KeyHelper.matchOk(event))
|
||||
mainPlaylistController.togglePlayPause()
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hovered"
|
||||
when: interactionIndicator
|
||||
|
||||
PropertyChanges {
|
||||
target: hoverShadow
|
||||
radius: VLCStyle.dp(24, VLCStyle.scale)
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "default"
|
||||
when: !interactionIndicator
|
||||
|
||||
PropertyChanges {
|
||||
target: contentLabel
|
||||
color: enabled ? playBtn.color : playBtn.colorDisabled
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: hoverShadow
|
||||
radius: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
readonly property bool interactionIndicator: (playBtn.activeFocus || playBtn.isCursorInside || playBtn.highlighted)
|
||||
|
||||
contentItem: Label {
|
||||
id: contentLabel
|
||||
|
||||
text: (player.playingState !== PlayerController.PLAYING_STATE_PAUSED
|
||||
&& player.playingState !== PlayerController.PLAYING_STATE_STOPPED)
|
||||
? VLCIcons.pause
|
||||
: VLCIcons.play
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: VLCStyle.ms75
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
|
||||
font.pixelSize: VLCIcons.pixelSize(VLCStyle.icon_normal)
|
||||
font.family: VLCIcons.fontFamily
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
background: Item {
|
||||
Gradient {
|
||||
id: playBtnGradient
|
||||
GradientStop { position: 0.0; color: VLCStyle.colors.buttonPlayA }
|
||||
GradientStop { position: 1.0; color: VLCStyle.colors.buttonPlayB }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: playBtnMouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: VLCStyle.dp(1, VLCStyle.scale)
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
readonly property int radius: playBtnMouseArea.width / 2
|
||||
|
||||
onPositionChanged: {
|
||||
if (Helpers.pointInRadius(
|
||||
(playBtnMouseArea.width / 2) - playBtnMouseArea.mouseX,
|
||||
(playBtnMouseArea.height / 2) - playBtnMouseArea.mouseY,
|
||||
radius)) {
|
||||
// cursor is inside of the round button
|
||||
playBtn.isCursorInside = true
|
||||
}
|
||||
else {
|
||||
// cursor is outside
|
||||
playBtn.isCursorInside = false
|
||||
}
|
||||
}
|
||||
|
||||
onHoveredChanged: {
|
||||
if (!playBtnMouseArea.containsMouse)
|
||||
playBtn.isCursorInside = false
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (!playBtn.isCursorInside)
|
||||
return
|
||||
|
||||
mainPlaylistController.togglePlayPause()
|
||||
}
|
||||
|
||||
onPressAndHold: {
|
||||
if (!playBtn.isCursorInside)
|
||||
return
|
||||
|
||||
mainPlaylistController.stop()
|
||||
}
|
||||
}
|
||||
|
||||
DropShadow {
|
||||
id: hoverShadow
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
visible: radius > 0
|
||||
samples: (radius * 2) + 1
|
||||
// opacity: 0.29 // it looks better without this
|
||||
color: "#FF610A"
|
||||
source: opacityMask
|
||||
antialiasing: true
|
||||
|
||||
Behavior on radius {
|
||||
NumberAnimation {
|
||||
duration: VLCStyle.ms75
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
radius: (width * 0.5)
|
||||
anchors.fill: parent
|
||||
anchors.margins: VLCStyle.dp(1, VLCStyle.scale)
|
||||
|
||||
color: VLCStyle.colors.white
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: outerRect
|
||||
anchors.fill: parent
|
||||
|
||||
radius: (width * 0.5)
|
||||
gradient: playBtnGradient
|
||||
|
||||
visible: false
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: innerRect
|
||||
anchors.fill: parent
|
||||
|
||||
radius: (width * 0.5)
|
||||
border.width: VLCStyle.dp(2, VLCStyle.scale)
|
||||
|
||||
color: "transparent"
|
||||
visible: false
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
id: opacityMask
|
||||
anchors.fill: parent
|
||||
|
||||
source: outerRect
|
||||
maskSource: innerRect
|
||||
|
||||
antialiasing: true
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
import "qrc:///player/" as Player
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: playbackSpeedButton
|
||||
|
||||
size: VLCStyle.icon_medium
|
||||
text: i18n.qtr("Playback Speed")
|
||||
color: playbackSpeedPopup.visible ? colors.accent : colors.playerControlBarFg
|
||||
|
||||
onClicked: playbackSpeedPopup.open()
|
||||
|
||||
Player.PlaybackSpeed {
|
||||
id: playbackSpeedPopup
|
||||
|
||||
z: 1
|
||||
colors: playbackSpeedButton.colors
|
||||
focus: true
|
||||
parent: playbackSpeedButton.paintOnly
|
||||
? playbackSpeedButton // button is not part of main display (ToolbarEditorDialog)
|
||||
: (history.current.view === "player") ? rootPlayer : g_mainDisplay
|
||||
|
||||
onOpened: {
|
||||
// update popup coordinates
|
||||
//
|
||||
// mapFromItem is affected by various properties of source and target objects
|
||||
// which can't be represented in a binding expression so a initial setting in
|
||||
// object defination (x: clamp(...)) doesn't work, so we set x and y on initial open
|
||||
x = Qt.binding(function () {
|
||||
// coords are mapped through playbackSpeedButton.parent so that binding is generated based on playbackSpeedButton.x
|
||||
var mappedParentCoordinates = parent.mapFromItem(playbackSpeedButton.parent, playbackSpeedButton.x, 0)
|
||||
return Helpers.clamp(mappedParentCoordinates.x - ((width - playbackSpeedButton.width) / 2),
|
||||
VLCStyle.margin_xxsmall + VLCStyle.applicationHorizontalMargin,
|
||||
parent.width - VLCStyle.applicationHorizontalMargin - VLCStyle.margin_xxsmall - width)
|
||||
})
|
||||
|
||||
y = Qt.binding(function () {
|
||||
// coords are mapped through playbackSpeedButton.parent so that binding is generated based on playbackSpeedButton.y
|
||||
var mappedParentCoordinates = parent.mapFromItem(playbackSpeedButton.parent, 0, playbackSpeedButton.y)
|
||||
return mappedParentCoordinates.y - playbackSpeedPopup.height - VLCStyle.margin_xxsmall
|
||||
})
|
||||
|
||||
// player related --
|
||||
controlButtons.requestLockUnlockAutoHide(true, controlButtons)
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = playbackSpeedPopup
|
||||
}
|
||||
|
||||
onClosed: {
|
||||
controlButtons.requestLockUnlockAutoHide(false, controlButtons)
|
||||
playbackSpeedButton.forceActiveFocus()
|
||||
if (!!rootPlayer)
|
||||
rootPlayer.menu = undefined
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: VLCStyle.fontSize_normal
|
||||
text: !playbackSpeedButton.paintOnly ? i18n.qtr("%1x").arg(+player.rate.toFixed(2)) : i18n.qtr("1x")
|
||||
color: playbackSpeedButton.background.foregroundColor // IconToolButton.background is a AnimatedBackground
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.fullscreen
|
||||
|
||||
onClicked: {
|
||||
if (history.current.view === "player")
|
||||
history.previous()
|
||||
else
|
||||
g_mainDisplay.showPlayer()
|
||||
}
|
||||
|
||||
text: i18n.qtr("Switch Player")
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: playlistBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.playlist
|
||||
onClicked: {
|
||||
mainInterface.playlistVisible = !mainInterface.playlistVisible
|
||||
if (mainInterface.playlistVisible && mainInterface.playlistDocked) {
|
||||
playlistWidget.gainFocus(playlistBtn)
|
||||
}
|
||||
}
|
||||
|
||||
text: i18n.qtr("Playlist")
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: prevBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.previous
|
||||
enabled: mainPlaylistController.hasPrev
|
||||
onClicked: mainPlaylistController.prev()
|
||||
text: i18n.qtr("Previous")
|
||||
}
|
30
modules/gui/qt/player/qml/controlbarcontrols/QuitButton.qml
Normal file
30
modules/gui/qt/player/qml/controlbarcontrols/QuitButton.qml
Normal file
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: quitBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.clear
|
||||
onClicked: mainInterface.close()
|
||||
text: i18n.qtr("Quit")
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: randomBtn
|
||||
size: VLCStyle.icon_medium
|
||||
checked: mainPlaylistController.random
|
||||
iconText: VLCIcons.shuffle_on
|
||||
onClicked: mainPlaylistController.toggleRandom()
|
||||
text: i18n.qtr("Random")
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: recordBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.record
|
||||
enabled: player.isPlaying
|
||||
checked: player.isRecording
|
||||
onClicked: player.toggleRecord()
|
||||
text: i18n.qtr("record")
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: stepBackBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.skip_back
|
||||
onClicked: player.jumpBwd()
|
||||
text: i18n.qtr("Step back")
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: stepfwdBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.skip_for
|
||||
onClicked: player.jumpFwd()
|
||||
text: i18n.qtr("Step forward")
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: slowerBtn
|
||||
size: VLCStyle.icon_medium
|
||||
iconText: VLCIcons.slower
|
||||
onClicked: player.slower()
|
||||
text: i18n.qtr("Slower")
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: snapshotBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.snapshot
|
||||
onClicked: player.snapshot()
|
||||
text: i18n.qtr("Snapshot")
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Item {
|
||||
id: spacer
|
||||
enabled: false
|
||||
implicitWidth: VLCStyle.icon_normal
|
||||
implicitHeight: VLCStyle.icon_normal
|
||||
property alias spacetextExt: spacetext
|
||||
property bool paintOnly: false
|
||||
Label {
|
||||
id: spacetext
|
||||
text: VLCIcons.space
|
||||
color: VLCStyle.colors.buttonText
|
||||
visible: parent.paintOnly
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
font.pixelSize: VLCIcons.pixelSize(VLCStyle.icon_medium)
|
||||
font.family: VLCIcons.fontFamily
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
31
modules/gui/qt/player/qml/controlbarcontrols/StopButton.qml
Normal file
31
modules/gui/qt/player/qml/controlbarcontrols/StopButton.qml
Normal file
@ -0,0 +1,31 @@
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2021 VLC authors and VideoLAN
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* ( at your option ) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
import QtQuick 2.11
|
||||
|
||||
import "qrc:///widgets/" as Widgets
|
||||
import "qrc:///style/"
|
||||
|
||||
|
||||
Widgets.IconControlButton {
|
||||
id: stopBtn
|
||||
size: VLCStyle.icon_medium
|
||||
enabled: player.isPlaying
|
||||
iconText: VLCIcons.stop
|
||||
onClicked: mainPlaylistController.stop()
|
||||
text: i18n.qtr("Stop")
|
||||
}
|
@ -346,6 +346,39 @@
|
||||
<file alias="ButtonsLayout.qml">player/qml/ButtonsLayout.qml</file>
|
||||
<file alias="PlaybackSpeed.qml">player/qml/PlaybackSpeed.qml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/player/controlbarcontrols">
|
||||
<file alias="ArtworkInfoWidget.qml">player/qml/controlbarcontrols/ArtworkInfoWidget.qml</file>
|
||||
<file alias="AspectRatioWidget.qml">player/qml/controlbarcontrols/AspectRatioWidget.qml</file>
|
||||
<file alias="AtoBButton.qml">player/qml/controlbarcontrols/AtoBButton.qml</file>
|
||||
<file alias="BackButton.qml">player/qml/controlbarcontrols/BackButton.qml</file>
|
||||
<file alias="ChapterNextButton.qml">player/qml/controlbarcontrols/ChapterNextButton.qml</file>
|
||||
<file alias="ChapterPreviousButton.qml">player/qml/controlbarcontrols/ChapterPreviousButton.qml</file>
|
||||
<file alias="ExpandingSpacerWidget.qml">player/qml/controlbarcontrols/ExpandingSpacerWidget.qml</file>
|
||||
<file alias="ExtendedSettingsButton.qml">player/qml/controlbarcontrols/ExtendedSettingsButton.qml</file>
|
||||
<file alias="FasterButton.qml">player/qml/controlbarcontrols/FasterButton.qml</file>
|
||||
<file alias="FrameButton.qml">player/qml/controlbarcontrols/FrameButton.qml</file>
|
||||
<file alias="FullscreenButton.qml">player/qml/controlbarcontrols/FullscreenButton.qml</file>
|
||||
<file alias="InfoButton.qml">player/qml/controlbarcontrols/InfoButton.qml</file>
|
||||
<file alias="LangButton.qml">player/qml/controlbarcontrols/LangButton.qml</file>
|
||||
<file alias="LoopButton.qml">player/qml/controlbarcontrols/LoopButton.qml</file>
|
||||
<file alias="MenuButton.qml">player/qml/controlbarcontrols/MenuButton.qml</file>
|
||||
<file alias="NextButton.qml">player/qml/controlbarcontrols/NextButton.qml</file>
|
||||
<file alias="OpenButton.qml">player/qml/controlbarcontrols/OpenButton.qml</file>
|
||||
<file alias="PlaybackSpeedButton.qml">player/qml/controlbarcontrols/PlaybackSpeedButton.qml</file>
|
||||
<file alias="PlayButton.qml">player/qml/controlbarcontrols/PlayButton.qml</file>
|
||||
<file alias="PlayerSwitchButton.qml">player/qml/controlbarcontrols/PlayerSwitchButton.qml</file>
|
||||
<file alias="PlaylistButton.qml">player/qml/controlbarcontrols/PlaylistButton.qml</file>
|
||||
<file alias="PreviousButton.qml">player/qml/controlbarcontrols/PreviousButton.qml</file>
|
||||
<file alias="QuitButton.qml">player/qml/controlbarcontrols/QuitButton.qml</file>
|
||||
<file alias="RandomButton.qml">player/qml/controlbarcontrols/RandomButton.qml</file>
|
||||
<file alias="RecordButton.qml">player/qml/controlbarcontrols/RecordButton.qml</file>
|
||||
<file alias="SkipBackButton.qml">player/qml/controlbarcontrols/SkipBackButton.qml</file>
|
||||
<file alias="SkipForwardButton.qml">player/qml/controlbarcontrols/SkipForwardButton.qml</file>
|
||||
<file alias="SlowerButton.qml">player/qml/controlbarcontrols/SlowerButton.qml</file>
|
||||
<file alias="SnapshotButton.qml">player/qml/controlbarcontrols/SnapshotButton.qml</file>
|
||||
<file alias="SpacerWidget.qml">player/qml/controlbarcontrols/SpacerWidget.qml</file>
|
||||
<file alias="StopButton.qml">player/qml/controlbarcontrols/StopButton.qml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/about">
|
||||
<file alias="About.qml">dialogs/help/qml/About.qml</file>
|
||||
</qresource>
|
||||
|
@ -867,6 +867,37 @@ modules/gui/qt/player/qml/ResumeDialog.qml
|
||||
modules/gui/qt/player/qml/TeletextWidget.qml
|
||||
modules/gui/qt/player/qml/TopBar.qml
|
||||
modules/gui/qt/player/qml/VolumeWidget.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/AspectRatioWidget.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/AtoBButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/BackButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/ChapterNextButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/ChapterPreviousButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/ExpandingSpacerWidget.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/ExtendedSettingsButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/FasterButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/FrameButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/FullscreenButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/InfoButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/LoopButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/MenuButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/NextButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/OpenButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/PlaybackSpeedButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/PlayerSwitchButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/PlaylistButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/PreviousButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/QuitButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/RandomButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/RecordButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/SkipBackButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/SkipForwardButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/SlowerButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/SnapshotButton.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/SpacerWidget.qml
|
||||
modules/gui/qt/player/qml/controlbarcontrols/StopButton.qml
|
||||
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
|
||||
modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml
|
||||
modules/gui/qt/playlist/qml/PlaylistListView.qml
|
||||
|
Loading…
Reference in New Issue
Block a user