|
|
@ -22,10 +22,12 @@ import QtQuick.Controls 1.4
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
import QtQuick.Dialogs 1.2
|
|
|
|
import QtQuick.Dialogs 1.2
|
|
|
|
|
|
|
|
import QtQuick.Controls 2.12 as QtQuickControls212
|
|
|
|
|
|
|
|
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents3
|
|
|
|
import org.kde.plasma.components 3.0 as PlasmaComponents3
|
|
|
|
|
|
|
|
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
|
|
|
|
|
|
|
|
|
|
|
import org.kde.latte.core 0.2 as LatteCore
|
|
|
|
import org.kde.latte.core 0.2 as LatteCore
|
|
|
|
import org.kde.latte.components 1.0 as LatteComponents
|
|
|
|
import org.kde.latte.components 1.0 as LatteComponents
|
|
|
@ -35,16 +37,19 @@ import "../../controls" as LatteExtraControls
|
|
|
|
|
|
|
|
|
|
|
|
PlasmaComponents.Page {
|
|
|
|
PlasmaComponents.Page {
|
|
|
|
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
|
|
|
|
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
|
|
|
|
Layout.maximumHeight: content.height + units.smallSpacing * 2
|
|
|
|
Layout.maximumHeight: content.height + units.smallSpacing
|
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
ColumnLayout {
|
|
|
|
id: content
|
|
|
|
id: content
|
|
|
|
|
|
|
|
|
|
|
|
width: (dialog.appliedWidth - units.smallSpacing * 2) - Layout.leftMargin * 2
|
|
|
|
width: (dialog.appliedWidth - units.smallSpacing * 2) - Layout.leftMargin * 2
|
|
|
|
spacing: dialog.subGroupSpacing
|
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
Layout.leftMargin: units.smallSpacing * 2
|
|
|
|
Layout.leftMargin: units.smallSpacing * 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
id: contentStatic
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
spacing: dialog.subGroupSpacing
|
|
|
|
|
|
|
|
|
|
|
|
//! BEGIN: Shadows
|
|
|
|
//! BEGIN: Shadows
|
|
|
|
ColumnLayout {
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillWidth: true
|
|
|
@ -496,7 +501,7 @@ PlasmaComponents.Page {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! BEGIN: Indicator specific sub-options
|
|
|
|
//! BEGIN: Indicator specific sub-options
|
|
|
|
ColumnLayout {
|
|
|
|
/* ColumnLayout {
|
|
|
|
id: indicatorSpecificOptions
|
|
|
|
id: indicatorSpecificOptions
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: units.smallSpacing * 2
|
|
|
|
Layout.topMargin: units.smallSpacing * 2
|
|
|
@ -526,10 +531,185 @@ PlasmaComponents.Page {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
//! END: Indicator specific sub-options
|
|
|
|
//! END: Indicator specific sub-options
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//! END: Active Indicator General Settings
|
|
|
|
//! END: Active Indicator General Settings
|
|
|
|
|
|
|
|
} //Static properties column
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
id: contentDynamic
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
height: pagesBackground.height - contentStatic.height - 3*units.smallSpacing
|
|
|
|
|
|
|
|
spacing: dialog.subGroupSpacing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
|
|
|
id: indicatorsBackground
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Layout.minimumHeight: parent.height
|
|
|
|
|
|
|
|
Layout.leftMargin: units.smallSpacing * 2
|
|
|
|
|
|
|
|
Layout.rightMargin: units.smallSpacing * 2
|
|
|
|
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PlasmaExtras.ScrollArea {
|
|
|
|
|
|
|
|
id: scrollArea
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
verticalScrollBarPolicy: Qt.ScrollBarAsNeeded
|
|
|
|
|
|
|
|
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flickableItem.flickableDirection: Flickable.VerticalFlick
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QtQuickControls212.StackView {
|
|
|
|
|
|
|
|
id: indicatorsStackView
|
|
|
|
|
|
|
|
width: Math.max(currentItem.Layout.maximumWidth, currentItem.width)
|
|
|
|
|
|
|
|
height: Math.max(currentItem.Layout.maximumHeight, currentItem.height)
|
|
|
|
|
|
|
|
enabled: latteView.indicator.enabled
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property bool forwardSliding: true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readonly property int optionsWidth: dialog.optionsWidth
|
|
|
|
|
|
|
|
readonly property bool deprecatedOptionsAreHidden: true // @since 0.10.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
replaceEnter: Transition {
|
|
|
|
|
|
|
|
ParallelAnimation {
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
|
|
|
property: "x"
|
|
|
|
|
|
|
|
from: indicatorsStackView.forwardSliding ? -indicatorsBackground.width : indicatorsBackground.width
|
|
|
|
|
|
|
|
to: 0
|
|
|
|
|
|
|
|
duration: 350
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
|
|
|
property: "opacity"
|
|
|
|
|
|
|
|
from: 0
|
|
|
|
|
|
|
|
to: 1
|
|
|
|
|
|
|
|
duration: 350
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
replaceExit: Transition {
|
|
|
|
|
|
|
|
ParallelAnimation {
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
|
|
|
property: "x"
|
|
|
|
|
|
|
|
from: 0
|
|
|
|
|
|
|
|
to: indicatorsStackView.forwardSliding ? indicatorsBackground.width : -indicatorsBackground.width
|
|
|
|
|
|
|
|
duration: 350
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PropertyAnimation {
|
|
|
|
|
|
|
|
property: "opacity"
|
|
|
|
|
|
|
|
from: 1
|
|
|
|
|
|
|
|
to: 0
|
|
|
|
|
|
|
|
duration: 350
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
|
|
id: hiddenIndicatorPage
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readonly property int optionsWidth: dialog.optionsWidth
|
|
|
|
|
|
|
|
readonly property bool deprecatedOptionsAreHidden: true // @since 0.10.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readonly property Item nextPage: indicatorsStackView.currentItem === page1 ? page2 : page1
|
|
|
|
|
|
|
|
readonly property Item previousPage: nextPage === page1 ? page2 : page1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showNextIndicator() {
|
|
|
|
|
|
|
|
console.log("show next indicator in qml called, children:: " + children.length);
|
|
|
|
|
|
|
|
if (children.length===1) {
|
|
|
|
|
|
|
|
var nextIndicator = children[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (nextIndicator && (!indicatorsStackView.currentItem || !indicatorsStackView.currentItem.isCurrent)) {
|
|
|
|
|
|
|
|
//!empty nextPage by moving its pages into hiddenPages
|
|
|
|
|
|
|
|
var childrenCount = nextPage.children.length;
|
|
|
|
|
|
|
|
for (var i=0; i<childrenCount; ++i) {
|
|
|
|
|
|
|
|
var previousIndicator = nextPage.children[0];
|
|
|
|
|
|
|
|
previousIndicator.visible = false;
|
|
|
|
|
|
|
|
previousIndicator.parent = hiddenPages;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nextIndicator.parent = nextPage;
|
|
|
|
|
|
|
|
nextIndicator.visible = true;
|
|
|
|
|
|
|
|
nextPage.type = latteView.indicator.type;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var currentIndex = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (indicatorsStackView.currentItem) {
|
|
|
|
|
|
|
|
currentIndex = viewConfig.indicatorUiManager.index(indicatorsStackView.currentItem.type);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var nextIndex = viewConfig.indicatorUiManager.index(latteView.indicator.type);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
indicatorsStackView.forwardSliding = (nextIndex<currentIndex);
|
|
|
|
|
|
|
|
indicatorsStackView.replace(indicatorsStackView.currentItem, nextPage);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
|
|
|
|
viewConfig.indicatorUiManager.setParentItem(hiddenIndicatorPage);
|
|
|
|
|
|
|
|
viewConfig.indicatorUiManager.ui(latteView.indicator.type, latteView);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
|
|
|
target: latteView.indicator
|
|
|
|
|
|
|
|
onPluginChanged: viewConfig.indicatorUiManager.ui(latteView.indicator.type, latteView);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
|
|
|
target: viewConfig
|
|
|
|
|
|
|
|
onIsReadyChanged: {
|
|
|
|
|
|
|
|
if (viewConfig.isReady) {
|
|
|
|
|
|
|
|
viewConfig.indicatorUiManager.ui(latteView.indicator.type, latteView);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
|
|
id: hidden
|
|
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
id: page1
|
|
|
|
|
|
|
|
width: indicatorsBackground.width
|
|
|
|
|
|
|
|
height: childrenRect.height
|
|
|
|
|
|
|
|
readonly property bool isCurrent: latteView.indicator.type === type
|
|
|
|
|
|
|
|
readonly property bool deprecatedOptionsAreHidden: true // @since 0.10.0
|
|
|
|
|
|
|
|
readonly property int optionsWidth: dialog.optionsWidth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property string type: ""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
id: page2
|
|
|
|
|
|
|
|
width: indicatorsBackground.width
|
|
|
|
|
|
|
|
height: childrenRect.height
|
|
|
|
|
|
|
|
readonly property bool isCurrent: latteView.indicator.type === type
|
|
|
|
|
|
|
|
readonly property bool deprecatedOptionsAreHidden: true // @since 0.10.0
|
|
|
|
|
|
|
|
readonly property int optionsWidth: dialog.optionsWidth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property string type: ""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
id: hiddenPages
|
|
|
|
|
|
|
|
width: indicatorsBackground.width
|
|
|
|
|
|
|
|
height: childrenRect.height
|
|
|
|
|
|
|
|
readonly property bool isCurrent: latteView.indicator.type === type
|
|
|
|
|
|
|
|
readonly property bool deprecatedOptionsAreHidden: true // @since 0.10.0
|
|
|
|
|
|
|
|
readonly property int optionsWidth: dialog.optionsWidth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property string type: ""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}//! END of Dynamic content
|
|
|
|
|
|
|
|
} //! END of ALL content
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|