Warning, /plasma/latte-dock/declarativeimports/abilities/client/MyView.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.0
0007 
0008 import org.kde.plasma.plasmoid 2.0
0009 import org.kde.latte.abilities.definition 0.1 as AbilityDefinition
0010 
0011 AbilityDefinition.MyView {
0012     id: _myView
0013     property Item bridge: null
0014     readonly property bool isBridgeActive: bridge !== null
0015 
0016     isReady: ref.myView.isReady
0017     groupId: ref.myView.groupId
0018 
0019     inNormalState: ref.myView.inNormalState
0020 
0021     isHidden: ref.myView.isHidden
0022     isShownPartially: ref.myView.isShownPartially
0023     isShownFully: ref.myView.isShownFully
0024     isHidingBlocked: ref.myView.isHidingBlocked
0025 
0026     inEditMode: ref.myView.inEditMode
0027     inConfigureAppletsMode: ref.myView.inConfigureAppletsMode
0028 
0029     inSlidingIn: ref.myView.inSlidingIn
0030     inSlidingOut: ref.myView.inSlidingOut
0031     inRelocationAnimation: ref.myView.inRelocationAnimation
0032     inRelocationHiding: ref.myView.inRelocationHiding
0033 
0034     badgesIn3DStyle: ref.myView.badgesIn3DStyle
0035 
0036     alignment: ref.myView.alignment
0037     visibilityMode: ref.myView.visibilityMode
0038 
0039     backgroundOpacity: ref.myView.backgroundOpacity
0040 
0041     lastUsedActivity: ref.myView.lastUsedActivity
0042 
0043     screenGeometry: ref.myView.screenGeometry
0044 
0045     containmentActions: ref.myView.containmentActions
0046 
0047     itemShadow: ref.myView.itemShadow
0048 
0049     palette: bridge && bridge.applyPalette ? bridge.palette : theme
0050 
0051     readonly property AbilityDefinition.MyView local: AbilityDefinition.MyView {
0052         isShownFully: true
0053         inEditMode: plasmoid.userConfiguring
0054         inConfigureAppletsMode: plasmoid.userConfiguring
0055     }
0056 
0057     Item {
0058         id: ref
0059         readonly property Item myView: bridge && bridge.myView ? bridge.myView.host : local
0060     }
0061 
0062     //! Bridge - Client assignment
0063     onIsBridgeActiveChanged: {
0064         if (isBridgeActive) {
0065             bridge.myView.client = _myView;
0066         }
0067     }
0068 
0069     Component.onCompleted: {
0070         if (isBridgeActive) {
0071             bridge.myView.client = _myView;
0072         }
0073     }
0074 
0075     Component.onDestruction: {
0076         if (isBridgeActive) {
0077             bridge.myView.client = null;
0078         }
0079     }
0080 
0081     function inCurrentLayout() {
0082         return bridge && ref.myView.isReady ? ref.myView.inCurrentLayout() : true;
0083     }
0084 
0085     function action(name) {
0086         return bridge && ref.myView.isReady ? ref.myView.action(name) : null;
0087     }
0088 }