Warning, /plasma/discover/discover/qml/TopLevelPageData.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
0003  *
0004  *   SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import org.kde.kirigami as Kirigami
0008 
0009 Kirigami.Action {
0010     property string component
0011 
0012     checked: window.currentTopLevel === component
0013 
0014     onToggled: {
0015         // Since there is no achitecture in place to act as a controller for
0016         // any of this navigation, exclusive top-level actions have to ensure
0017         // they can not be unchecked by clicking a second time.
0018         if (!checked) {
0019             checked = Qt.binding(() => window.currentTopLevel === component)
0020         }
0021     }
0022 
0023     onTriggered: {
0024         if (window.currentTopLevel !== component) {
0025             window.currentTopLevel = component
0026         }
0027     }
0028 }