Changeset View
Changeset View
Standalone View
Standalone View
desktoppackage/contents/explorer/AppletAlternatives.qml
Show All 11 Lines | |||||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | import QtQuick 2.0 | 19 | import QtQuick 2.0 | ||
20 | import QtQuick.Controls 1.0 as QtControls | 20 | import QtQuick.Controls 2.5 as QQC2 | ||
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
22 | import QtQuick.Window 2.1 | 22 | import QtQuick.Window 2.1 | ||
23 | import org.kde.plasma.core 2.0 as PlasmaCore | 23 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
24 | import org.kde.plasma.components 2.0 as PlasmaComponents | 24 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
25 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 25 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
26 | 26 | | |||
27 | import org.kde.plasma.private.shell 2.0 | 27 | import org.kde.plasma.private.shell 2.0 | ||
28 | 28 | | |||
Show All 17 Lines | 39 | ColumnLayout { | |||
46 | 46 | | |||
47 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | 47 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | ||
48 | LayoutMirroring.childrenInherit: true | 48 | LayoutMirroring.childrenInherit: true | ||
49 | 49 | | |||
50 | property string currentPlugin | 50 | property string currentPlugin | ||
51 | // we don't want a binding here, just set it to the current plugin once | 51 | // we don't want a binding here, just set it to the current plugin once | ||
52 | Component.onCompleted: currentPlugin = alternativesHelper.currentPlugin | 52 | Component.onCompleted: currentPlugin = alternativesHelper.currentPlugin | ||
53 | 53 | | |||
54 | QtControls.Action { | 54 | QQC2.Action { | ||
55 | shortcut: "Escape" | 55 | shortcut: "Escape" | ||
56 | onTriggered: dialog.close() | 56 | onTriggered: dialog.close() | ||
57 | } | 57 | } | ||
58 | QtControls.Action { | 58 | QQC2.Action { | ||
59 | shortcut: "Return" | 59 | shortcut: "Return" | ||
60 | onTriggered: switchButton.clicked(null) | 60 | onTriggered: switchButton.clicked(null) | ||
61 | } | 61 | } | ||
62 | QtControls.Action { | 62 | QQC2.Action { | ||
63 | shortcut: "Enter" | 63 | shortcut: "Enter" | ||
64 | onTriggered: switchButton.clicked(null) | 64 | onTriggered: switchButton.clicked(null) | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | QtControls.Action { | 67 | QQC2.Action { | ||
68 | shortcut: "Up" | 68 | shortcut: "Up" | ||
69 | onTriggered: mainList.decrementCurrentIndex() | 69 | onTriggered: mainList.decrementCurrentIndex() | ||
70 | } | 70 | } | ||
71 | QtControls.Action { | 71 | QQC2.Action { | ||
72 | shortcut: "Down" | 72 | shortcut: "Down" | ||
73 | onTriggered: mainList.incrementCurrentIndex() | 73 | onTriggered: mainList.incrementCurrentIndex() | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | WidgetExplorer { | 76 | WidgetExplorer { | ||
77 | id: widgetExplorer | 77 | id: widgetExplorer | ||
78 | provides: alternativesHelper.appletProvides | 78 | provides: alternativesHelper.appletProvides | ||
79 | } | 79 | } | ||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |