Warning, /plasma-bigscreen/mycroft-skill-installer/app/qml/FooterArea.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2020 Aditya Mehra <aix.m@outlook.org> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 import QtQuick 2.9 0008 import QtQuick.Controls 2.3 0009 import QtQuick.Window 2.10 0010 import QtQuick.Layouts 1.3 0011 import QtGraphicalEffects 1.0 0012 import org.kde.kirigami 2.12 as Kirigami 0013 import org.kde.plasma.components 3.0 as PlasmaComponents3 0014 0015 import "code/SkillUtils.js" as SkillUtils 0016 0017 Rectangle { 0018 anchors.left: parent.left 0019 anchors.right: parent.right 0020 height: Kirigami.Units.gridUnit * 2.6 0021 color: Qt.rgba(0, 0, 0, 1) 0022 0023 Kirigami.Separator { 0024 id: footerSeparator 0025 anchors.left: parent.left 0026 anchors.right: parent.right 0027 anchors.top: parent.top 0028 } 0029 0030 onFocusChanged: { 0031 if(focus){ 0032 reloadButton.forceActiveFocus() 0033 } 0034 } 0035 0036 RowLayout { 0037 id: footerArea 0038 width: parent.width 0039 height: Kirigami.Units.gridUnit * 2.4 0040 anchors.bottom: parent.bottom 0041 0042 Button { 0043 id: reloadButton 0044 Layout.fillWidth: true 0045 Layout.fillHeight: true 0046 KeyNavigation.right: fetchButton 0047 0048 background: Rectangle { 0049 color: reloadButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor 0050 } 0051 0052 contentItem: Item { 0053 RowLayout { 0054 anchors.centerIn: parent 0055 Kirigami.Icon { 0056 Layout.preferredWidth: Kirigami.Units.iconSizes.small 0057 Layout.preferredHeight: Kirigami.Units.iconSizes.small 0058 source: "view-refresh" 0059 } 0060 Label { 0061 text: i18n("Refresh") 0062 } 0063 } 0064 } 0065 0066 onClicked: { 0067 installerView.updateInstallerModel() 0068 } 0069 0070 KeyNavigation.up: installerView 0071 Keys.onReturnPressed: { 0072 clicked() 0073 } 0074 } 0075 0076 Button { 0077 id: fetchButton 0078 Layout.fillWidth: true 0079 Layout.fillHeight: true 0080 KeyNavigation.left: reloadButton 0081 KeyNavigation.right: kcmcloseButton 0082 0083 background: Rectangle { 0084 color: fetchButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor 0085 } 0086 0087 contentItem: Item { 0088 RowLayout { 0089 anchors.centerIn: parent 0090 Kirigami.Icon { 0091 Layout.preferredWidth: Kirigami.Units.iconSizes.small 0092 Layout.preferredHeight: Kirigami.Units.iconSizes.small 0093 source: "download" 0094 } 0095 Label { 0096 text: i18n("Fetch Latest") 0097 } 0098 } 0099 } 0100 0101 onClicked: { 0102 installerView.fetchLatestInstallerModel() 0103 } 0104 0105 KeyNavigation.up: installerView 0106 Keys.onReturnPressed: { 0107 clicked() 0108 } 0109 } 0110 0111 Button { 0112 id: kcmcloseButton 0113 KeyNavigation.up: installerView 0114 KeyNavigation.left: fetchButton 0115 Layout.fillWidth: true 0116 Layout.fillHeight: true 0117 0118 background: Rectangle { 0119 color: kcmcloseButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor 0120 } 0121 0122 contentItem: Item { 0123 RowLayout { 0124 anchors.centerIn: parent 0125 Kirigami.Icon { 0126 Layout.preferredWidth: Kirigami.Units.iconSizes.small 0127 Layout.preferredHeight: Kirigami.Units.iconSizes.small 0128 source: "window-close" 0129 } 0130 Label { 0131 text: i18n("Exit") 0132 } 0133 } 0134 } 0135 0136 onClicked: { 0137 Window.window.close() 0138 } 0139 Keys.onReturnPressed: { 0140 Window.window.close() 0141 } 0142 } 0143 } 0144 }