Warning, /plasma/latte-dock/containment/package/contents/ui/abilities/Launchers.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.7 0007 import org.kde.plasma.plasmoid 2.0 0008 0009 import "./privates" as Ability 0010 0011 Ability.LaunchersPrivate { 0012 //! do not update during dragging/moving applets inConfigureAppletsMode 0013 updateIsBlocked: (root.dragOverlay && root.dragOverlay.pressed) 0014 || layouter.appletsInParentChange 0015 0016 readonly property bool isReady: latteView && latteView.layout && universalSettings && root.layoutsManager !== null 0017 readonly property bool isCapableOfLayoutLaunchers: latteView && latteView.layout 0018 readonly property bool isCapableOfUniversalLaunchers: latteView && universalSettings 0019 0020 property string layoutName: "" 0021 0022 readonly property var layoutLaunchers: latteView && latteView.layout ? latteView.layout.launchers : [] 0023 readonly property var universalLaunchers: latteView && universalSettings ? universalSettings.launchers : [] 0024 0025 function addAbilityClient(client) { 0026 layoutsManager.syncedLaunchers.addAbilityClient(client); 0027 } 0028 0029 function removeAbilityClient(client) { 0030 layoutsManager.syncedLaunchers.removeAbilityClient(client); 0031 } 0032 0033 function addSyncedLauncher(senderId, group, groupId, launcherUrl) { 0034 layoutsManager.syncedLaunchers.addLauncher(layoutName, 0035 senderId, 0036 group, 0037 groupId, 0038 launcherUrl); 0039 } 0040 0041 function removeSyncedLauncher(senderId, group,groupId, launcherUrl) { 0042 layoutsManager.syncedLaunchers.removeLauncher(layoutName, 0043 senderId, 0044 group, 0045 groupId, 0046 launcherUrl); 0047 } 0048 0049 function addSyncedLauncherToActivity(senderId, group, groupId, launcherUrl, activityId) { 0050 layoutsManager.syncedLaunchers.addLauncherToActivity(layoutName, 0051 senderId, 0052 group, 0053 groupId, 0054 launcherUrl, 0055 activityId); 0056 } 0057 0058 function removeSyncedLauncherFromActivity(senderId, group, groupId, launcherUrl, activityId) { 0059 layoutsManager.syncedLaunchers.removeLauncherFromActivity(layoutName, 0060 senderId, 0061 group, 0062 groupId, 0063 launcherUrl, 0064 activityId); 0065 } 0066 0067 function addDroppedLaunchers(senderId, group, groupId, urls) { 0068 layoutsManager.syncedLaunchers.urlsDropped(layoutName, 0069 senderId, 0070 group, 0071 groupId, 0072 urls); 0073 } 0074 0075 function validateSyncedLaunchersOrder(senderId, group, groupId, orderedlaunchers) { 0076 layoutsManager.syncedLaunchers.validateLaunchersOrder(layoutName, 0077 senderId, 0078 group, 0079 groupId, 0080 orderedlaunchers); 0081 } 0082 0083 function addDroppedLaunchersInStealingApplet(launchers) { 0084 if (hasStealingApplet) { 0085 appletStealingDroppedLaunchers.addDroppedLaunchers(launchers); 0086 } 0087 } 0088 0089 function showAddLaunchersMessageInStealingApplet() { 0090 if (hasStealingApplet) { 0091 appletStealingDroppedLaunchers.isShowingAddLaunchersMessage = true; 0092 } 0093 } 0094 0095 function hideAddLaunchersMessageInStealingApplet() { 0096 if (hasStealingApplet) { 0097 appletStealingDroppedLaunchers.isShowingAddLaunchersMessage = false; 0098 } 0099 } 0100 0101 function setLayoutLaunchers(launchers) { 0102 if (isCapableOfLayoutLaunchers) { 0103 latteView.layout.launchers = launchers; 0104 } 0105 } 0106 0107 function setUniversalLaunchers(launchers) { 0108 if (isCapableOfUniversalLaunchers) { 0109 universalSettings.launchers = launchers; 0110 } 0111 } 0112 }