Warning, /plasma/plasma-bigscreen/kcms/plasma-settings-shell/+mediacenter/KCMContainer.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2019-2020 Marco Martin <mart@kde.org>
0003
0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006
0007 import QtQuick 2.14
0008 import QtQuick.Controls 2.14 as Controls
0009 import org.kde.kirigami 2.12 as Kirigami
0010
0011 import org.kde.plasma.settings 0.1
0012
0013 Kirigami.Page {
0014 id: container
0015 title: internalPage.title
0016 property QtObject kcm
0017 property Item internalPage
0018 topPadding: 0
0019 leftPadding: 0
0020 rightPadding: 0
0021 bottomPadding: 0
0022 flickable: internalPage.flickable
0023 actions.main: internalPage.actions.main
0024 actions.contextualActions: internalPage.contextualActions
0025
0026 background: null
0027
0028 onInternalPageChanged: {
0029 internalPage.parent = contentItem;
0030 internalPage.anchors.fill = contentItem;
0031 }
0032 onActiveFocusChanged: {
0033 if (activeFocus) {
0034 internalPage.forceActiveFocus();
0035 }
0036 }
0037
0038 Component.onCompleted: {
0039 kcm.load()
0040 }
0041
0042 data: [
0043 Connections {
0044 target: kcm
0045 onPagePushed: {
0046 pageStack.push(kcmContainer.createObject(pageStack, {"internalPage": page}));
0047 }
0048 onPageRemoved: pageStack.pop();
0049 },
0050 Connections {
0051 target: pageStack
0052 onPageRemoved: {
0053 if (kcm.needsSave) {
0054 kcm.save()
0055 }
0056 if (page == container) {
0057 page.destroy();
0058 }
0059 }
0060 }
0061 ]
0062 }