From 5fc2e909d0cd5e5478631b97bee54b53d3258db8 Mon Sep 17 00:00:00 2001 From: snoutie <71790678+SnoutBug@users.noreply.github.com> Date: Thu, 3 Mar 2022 18:32:19 +0100 Subject: [PATCH] Delete main.qml --- contents/ui/main.qml | 221 ------------------------------------------- 1 file changed, 221 deletions(-) delete mode 100644 contents/ui/main.qml diff --git a/contents/ui/main.qml b/contents/ui/main.qml deleted file mode 100644 index 3e4b6b2..0000000 --- a/contents/ui/main.qml +++ /dev/null @@ -1,221 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2014-2015 by Eike Hein * - * Copyright (C) 2021 by Prateek SU * - * * - * 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.12 -import QtQuick.Layouts 1.12 -import org.kde.plasma.plasmoid 2.0 - -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 3.0 as PlasmaComponents - -import org.kde.plasma.private.kicker 0.1 as Kicker - -Item { - id: kicker - - anchors.fill: parent - - signal reset - - property bool isDash: false - - Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation - - Plasmoid.compactRepresentation: null - Plasmoid.fullRepresentation: compactRepresentation - - property Item dragSource: null - - property QtObject globalFavorites: rootModel.favoritesModel - property QtObject systemFavorites: rootModel.systemFavoritesModel - - function action_menuedit() { - processRunner.runMenuEditor(); - } - - Component { - id: compactRepresentation - CompactRepresentation { } - } - - Component { - id: menuRepresentation - MenuRepresentation { } - } - - Kicker.RootModel { - id: rootModel - - autoPopulate: false - - appNameFormat: plasmoid.configuration.appNameFormat - flat: true - sorted: true - showSeparators: false - appletInterface: plasmoid - - showAllApps: true - showAllAppsCategorized: true - showTopLevelItems: !isDash - showRecentApps: plasmoid.configuration.showRecentApps - showRecentDocs: plasmoid.configuration.showRecentDocs - showRecentContacts: plasmoid.configuration.showRecentContacts - recentOrdering: plasmoid.configuration.recentOrdering - - onShowRecentAppsChanged: { - plasmoid.configuration.showRecentApps = showRecentApps; - } - - onShowRecentDocsChanged: { - plasmoid.configuration.showRecentDocs = showRecentDocs; - } - - onShowRecentContactsChanged: { - plasmoid.configuration.showRecentContacts = showRecentContacts; - } - - onRecentOrderingChanged: { - plasmoid.configuration.recentOrdering = recentOrdering; - } - - onFavoritesModelChanged: { - if ("initForClient" in favoritesModel) { - favoritesModel.initForClient("org.kde.plasma.kicker.favorites.instance-" + plasmoid.id) - - if (!plasmoid.configuration.favoritesPortedToKAstats) { - favoritesModel.portOldFavorites(plasmoid.configuration.favoriteApps); - plasmoid.configuration.favoritesPortedToKAstats = true; - } - } else { - favoritesModel.favorites = plasmoid.configuration.favoriteApps; - } - - favoritesModel.maxFavorites = pageSize; - } - - onSystemFavoritesModelChanged: { - systemFavoritesModel.enabled = false; - systemFavoritesModel.favorites = plasmoid.configuration.favoriteSystemActions; - systemFavoritesModel.maxFavorites = 6; - } - - Component.onCompleted: { - if ("initForClient" in favoritesModel) { - favoritesModel.initForClient("org.kde.plasma.kicker.favorites.instance-" + plasmoid.id) - - if (!plasmoid.configuration.favoritesPortedToKAstats) { - favoritesModel.portOldFavorites(plasmoid.configuration.favoriteApps); - plasmoid.configuration.favoritesPortedToKAstats = true; - } - } else { - favoritesModel.favorites = plasmoid.configuration.favoriteApps; - } - - favoritesModel.maxFavorites = pageSize; - rootModel.refresh(); - } - } - - Connections { - target: globalFavorites - - onFavoritesChanged: { - plasmoid.configuration.favoriteApps = target.favorites; - } - } - - Connections { - target: systemFavorites - - onFavoritesChanged: { - plasmoid.configuration.favoriteSystemActions = target.favorites; - } - } - - Connections { - target: plasmoid.configuration - - onFavoriteAppsChanged: { - globalFavorites.favorites = plasmoid.configuration.favoriteApps; - } - - onFavoriteSystemActionsChanged: { - systemFavorites.favorites = plasmoid.configuration.favoriteSystemActions; - } - } - - Kicker.RunnerModel { - id: runnerModel - - favoritesModel: globalFavorites - runners: plasmoid.configuration.useExtraRunners ? new Array("services").concat(plasmoid.configuration.extraRunners) : "services" - appletInterface: plasmoid - - deleteWhenEmpty: false - } - - Kicker.DragHelper { - id: dragHelper - } - - Kicker.ProcessRunner { - id: processRunner; - } - - PlasmaCore.FrameSvgItem { - id: highlightItemSvg - - visible: false - - imagePath: "widgets/viewitem" - prefix: "hover" - } - - PlasmaCore.FrameSvgItem { - id: panelSvg - - visible: false - - imagePath: "widgets/panel-background" - } - - PlasmaComponents.Label { - id: toolTipDelegate - - width: contentWidth - height: contentHeight - - property Item toolTip - - text: (toolTip != null) ? toolTip.text : "" - } - - function resetDragSource() { - dragSource = null; - } - - Component.onCompleted: { - plasmoid.setAction("menuedit", i18n("Edit Applications...")); - - rootModel.refreshed.connect(reset); - - dragHelper.dropped.connect(resetDragSource); - } -}