2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
2023-01-04 08:52:22 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2020-04-24 13:22:55 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
2020-04-24 13:22:55 +02:00
|
|
|
import HelperWidgets 2.0
|
2021-06-21 16:48:19 +02:00
|
|
|
import StudioControls 1.0 as StudioControls
|
|
|
|
|
import StudioTheme 1.0 as StudioTheme
|
2020-04-24 13:22:55 +02:00
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ImageSection {
|
2021-06-28 15:12:42 +02:00
|
|
|
caption: qsTr("Image")
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Section {
|
2021-06-28 15:12:42 +02:00
|
|
|
caption: qsTr("Animated image")
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
SectionLayout {
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2020-04-24 13:22:55 +02:00
|
|
|
text: qsTr("Speed")
|
2023-01-31 17:21:27 +01:00
|
|
|
tooltip: qsTr("Sets the speed of the animation.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.speed.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
2020-04-24 13:22:55 +02:00
|
|
|
sliderIndicatorVisible: true
|
|
|
|
|
backendValue: backendValues.speed
|
|
|
|
|
hasSlider: true
|
|
|
|
|
decimals: 2
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 100
|
|
|
|
|
enabled: backendValues.speed.isAvailable
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2021-06-28 15:12:42 +02:00
|
|
|
// TODO convert to % and add % label after the spin box
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2021-06-28 15:12:42 +02:00
|
|
|
text: qsTr("Playing")
|
2023-01-31 17:21:27 +01:00
|
|
|
tooltip: qsTr("Toggles if the animation is playing.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.playing.isAvailable && !backendValues.paused.isAvailable
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
CheckBox {
|
2021-06-28 15:12:42 +02:00
|
|
|
text: StudioTheme.Constants.play
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
2021-06-28 15:12:42 +02:00
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.playing
|
|
|
|
|
enabled: backendValue.isAvailable
|
|
|
|
|
fontFamily: StudioTheme.Constants.iconFont.family
|
|
|
|
|
fontPixelSize: StudioTheme.Values.myIconFontSize
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2021-06-28 15:12:42 +02:00
|
|
|
Spacer { implicitWidth: StudioTheme.Values.twoControlColumnGap }
|
2020-04-24 13:22:55 +02:00
|
|
|
|
|
|
|
|
CheckBox {
|
2021-06-28 15:12:42 +02:00
|
|
|
text: StudioTheme.Constants.pause
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
2021-06-28 15:12:42 +02:00
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
backendValue: backendValues.paused
|
|
|
|
|
enabled: backendValue.isAvailable
|
|
|
|
|
fontFamily: StudioTheme.Constants.iconFont.family
|
|
|
|
|
fontPixelSize: StudioTheme.Values.myIconFontSize
|
2020-04-24 13:22:55 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2020-04-24 13:22:55 +02:00
|
|
|
ExpandingSpacer {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|