Warning, /plasma/plasma-welcome/src/qml/pages/PowerfulWhenNeeded.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Felipe Kinoshita <kinofhek@gmail.com> 0003 * SPDX-FileCopyrightText: 2022 Nate Graham <nate@kde.org> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 import QtQuick 0009 import QtQuick.Layouts 0010 import org.kde.kirigami as Kirigami 0011 import Qt5Compat.GraphicalEffects 0012 0013 import org.kde.kcmutils as KCMUtils 0014 0015 import org.kde.plasma.welcome 0016 0017 0018 GenericPage { 0019 heading: i18nc("@info:window", "Powerful When Needed") 0020 description: xi18nc("@info:usagetip", "Plasma is an extremely feature-rich environment, designed to super-charge your productivity! Here is just a smattering of the things it can do for you:") 0021 0022 ColumnLayout { 0023 id: layout 0024 0025 anchors { 0026 top: parent.top 0027 topMargin: grid.verticalLayout ? 0 : Kirigami.Units.largeSpacing 0028 left: parent.left 0029 right: parent.right 0030 } 0031 spacing: Kirigami.Units.largeSpacing * 4 0032 0033 GridLayout { 0034 id: grid 0035 0036 readonly property int columnsforHorizontalLayout: 3 0037 readonly property int columnsforVerticalLayout: 2 0038 readonly property int cellWidth: Math.round(layout.width / columns) 0039 readonly property int cellHeight: Math.max(vaults.implicitHeight, 0040 activities.implicitHeight, 0041 kdeconnect.implicitHeight, 0042 overview.implicitHeight, 0043 krunner.implicitHeight, 0044 gns.implicitHeight) 0045 readonly property int spaceForTitles: Math.round(layout.width / columnsforHorizontalLayout) - vaults.fixedSizeStuff - (columnSpacing * (columnsforHorizontalLayout - 1)) 0046 readonly property bool verticalLayout: (vaults.implicitTitleWidth > spaceForTitles) 0047 || (activities.implicitTitleWidth > spaceForTitles) 0048 || (kdeconnect.implicitTitleWidth > spaceForTitles) 0049 || (overview.implicitTitleWidth > spaceForTitles) 0050 || (krunner.implicitTitleWidth > spaceForTitles) 0051 || (gns.implicitTitleWidth > spaceForTitles) 0052 0053 rows: verticalLayout ? 6 : 2 0054 columns: verticalLayout ? columnsforVerticalLayout : columnsforHorizontalLayout 0055 rowSpacing: Kirigami.Units.smallSpacing 0056 columnSpacing: Kirigami.Units.smallSpacing 0057 0058 // First row 0059 PlasmaFeatureButton { 0060 id: vaults 0061 Layout.fillWidth: true 0062 Layout.maximumWidth: grid.cellWidth 0063 Layout.preferredHeight: grid.cellHeight 0064 title: i18nc("@title:row Short form of the 'Vaults' Plasma feature", "Vaults") 0065 subtitle: i18nc("@info Caption for Plasma Vaults button", "Store sensitive files securely") 0066 buttonIcon: "plasmavault" 0067 onClicked: pageStack.layers.push(vaultsView); 0068 } 0069 PlasmaFeatureButton { 0070 id: activities 0071 Layout.fillWidth: true 0072 Layout.maximumWidth: grid.cellWidth 0073 Layout.preferredHeight: grid.cellHeight 0074 title: i18nc("@title:row Name of the 'Activities' Plasma feature", "Activities") 0075 subtitle: i18nc("@info Caption for Activities button. Note that 'Separate' is being used as an imperative verb here, not a noun.", "Separate work, school, or home tasks") 0076 buttonIcon: "preferences-desktop-activities" 0077 onClicked: pageStack.layers.push(activitiesView); 0078 } 0079 PlasmaFeatureButton { 0080 id: kdeconnect 0081 Layout.fillWidth: true 0082 Layout.maximumWidth: grid.cellWidth 0083 Layout.preferredHeight: grid.cellHeight 0084 title: i18nc("@title:row Name of the 'KDE Connect' feature", "KDE Connect") 0085 subtitle: i18nc("@info Caption for KDE Connect button", "Connect your phone and your computer") 0086 buttonIcon: "kdeconnect" 0087 onClicked: pageStack.layers.push(kdeconnectView); 0088 } 0089 0090 // Second row 0091 PlasmaFeatureButton { 0092 id: krunner 0093 Layout.fillWidth: true 0094 Layout.maximumWidth: grid.cellWidth 0095 Layout.preferredHeight: grid.cellHeight 0096 title: i18nc("@title:row", "KRunner") 0097 subtitle: i18nc("@info Caption for KRunner button", "Search for anything") 0098 buttonIcon: "krunner" 0099 onClicked: pageStack.layers.push(krunnerView); 0100 } 0101 PlasmaFeatureButton { 0102 id: overview 0103 Layout.fillWidth: true 0104 Layout.maximumWidth: grid.cellWidth 0105 Layout.preferredHeight: grid.cellHeight 0106 title: i18nc("@title:row Name of the 'Overview' KWin effect", "Overview") 0107 subtitle: i18nc("@info Caption for Overview button", "Your system command center") 0108 buttonIcon: "kwin" 0109 onClicked: pageStack.layers.push(overviewView); 0110 } 0111 PlasmaFeatureButton { 0112 id: gns 0113 Layout.fillWidth: true 0114 Layout.maximumWidth: grid.cellWidth 0115 Layout.preferredHeight: grid.cellHeight 0116 title: i18nc("@title:row", "Get New Stuff") 0117 subtitle: i18nc("@info Caption for Get New Stuff button", "Extend the system with add-ons") 0118 buttonIcon: "get-hot-new-stuff" 0119 onClicked: pageStack.layers.push(gnsView); 0120 } 0121 } 0122 0123 Kirigami.UrlButton { 0124 text: i18nc("@action:button", "Learn about more Plasma features") 0125 url: "https://userbase.kde.org/Plasma?source=plasma-welcome" 0126 } 0127 } 0128 0129 Component { 0130 id: vaultsView 0131 0132 GenericPage { 0133 heading: i18nc("@info:window", "Plasma Vaults") 0134 description: xi18nc("@info:usagetip", "Plasma Vaults allows you to create encrypted folders, called <interface>Vaults.</interface> Inside each Vault, you can securely store your passwords, files, pictures, and documents, safe from prying eyes. Vaults can live inside folders that are synced to cloud storage services too, providing extra privacy for that content.<nl/><nl/>To get started, click the arrow on the <interface>System Tray</interface> to show hidden items, and then click the <interface>Vaults</interface> icon.") 0135 } 0136 } 0137 0138 Component { 0139 id: activitiesView 0140 0141 GenericPage { 0142 heading: i18nc("@info:window", "Activities") 0143 description: xi18nc("@info:usagetip", "Activities can be used to separate high-level projects or workflows so you can focus on one at a time. You can have an activity for \"Home\", \"School\", \"Work\", and so on. Each Activity has access to all your files but has its own set of open apps and windows, recent documents, \"Favorite\" apps, and desktop widgets.<nl/><nl/>To get started, launch <interface>System Settings</interface> and search for \"Activities\". On that page, you can create more Activities. You can then switch between them using the <shortcut>Meta+Tab</shortcut> keyboard shortcut.") 0144 0145 actions: [ 0146 Kirigami.Action { 0147 icon.name: "preferences-desktop-activities" 0148 text: i18nc("@action:button", "Open Settings…") 0149 onTriggered: KCMUtils.KCMLauncher.openSystemSettings("kcm_activities") 0150 } 0151 ] 0152 } 0153 } 0154 0155 Component { 0156 id: kdeconnectView 0157 0158 GenericPage { 0159 heading: i18nc("@info:window", "KDE Connect") 0160 0161 // Don't change the weird indentation; it's intentional to make this 0162 // long string nicer for translators 0163 description: xi18nc("@info:usagetip", "KDE Connect lets you integrate your phone with your computer in various ways:\ 0164 <nl/>\ 0165 <list><item>See notifications from your phone on your computer</item>\ 0166 <item>Reply to text messages from your phone on your computer</item>\ 0167 <item>Sync your clipboard contents between your computer and your phone</item>\ 0168 <item>Make a noise on your phone when it's been misplaced</item>\ 0169 <item>Copy pictures, videos, and other files from your phone to your computer, and vice versa</item>\ 0170 <item>…And much more!</item></list>\ 0171 <nl/>To get started, launch <interface>System Settings</interface> and search for \"KDE Connect\". On that page, you can pair your phone.") 0172 0173 // TODO: KDE Connect might not be installed: 0174 // We should show an InlineMessage and hide the action. 0175 0176 actions: [ 0177 Kirigami.Action { 0178 icon.name: "kdeconnect" 0179 text: i18nc("@action:button", "Open Settings…") 0180 onTriggered: KCMUtils.KCMLauncher.openSystemSettings("kcm_kdeconnect") 0181 } 0182 ] 0183 } 0184 } 0185 0186 Component { 0187 id: krunnerView 0188 0189 GenericPage { 0190 heading: i18nc("@info:window", "KRunner") 0191 0192 // Don't change the weird indentation; it's intentional to make this 0193 // long string nicer for translators 0194 description: xi18nc("@info:usagetip translators: In the example queries, make sure to use the keywords as they are localized in the actual runner plugins. If needed, change 'Shanghai' to a city that on the other side of the world from likely speakers of the language", "KRunner is Plasma's exceptionally powerful and versatile search system. It powers the search functionality in the Application Launcher menu and the Overview screen, and it can be accessed as a standalone search bar using the <shortcut>Alt+Space</shortcut> keyboard shortcut.<nl/><nl/>In addition to finding your files and folders, KRunner can launch apps, search the web, convert between currencies, calculate math problems, and a lot more. Try typing any of the following into one of those search fields:\ 0195 <nl/>\ 0196 <list><item>\"time Shanghai\"</item>\ 0197 <item>\"27/3\"</item>\ 0198 <item>\"200 EUR in USD\"</item>\ 0199 <item>\"25 miles in km\"</item>\ 0200 <item>…And much more!</item></list>\ 0201 <nl/>\ 0202 To learn more, open the KRunner search bar using the <shortcut>Alt+Space</shortcut> keyboard shortcut and click on the question mark icon.") 0203 } 0204 } 0205 0206 Component { 0207 id: overviewView 0208 0209 GenericPage { 0210 heading: i18nc("@info:window The name of a KWin effect", "Overview") 0211 description: xi18nc("@info:usagetip", "Overview is a full-screen overlay that shows all of your open windows, letting you easily access any of them. It also shows your current Virtual Desktops, allowing you to add more, remove some, and switch between them. Finally, it offers a KRunner-powered search field that can also filter through open windows.<nl/><nl/>You can access Overview using the <shortcut>Meta+W</shortcut> keyboard shortcut.") 0212 } 0213 } 0214 0215 Component { 0216 id: gnsView 0217 0218 GenericPage { 0219 heading: i18nc("@info:window", "Get New Stuff") 0220 description: xi18nc("@info:usagetip", "Throughout Plasma, System Settings, and KDE apps, you'll find buttons marked \"Get New <emphasis>thing</emphasis>…\". Clicking on them will show you 3rd-party content to extend the system, made by other people like you! In this way, it is often possible to add functionality you want without having to ask KDE developers to implement it themselves.<nl/><nl/>Note that content acquired this way has not been reviewed by your distributor for functionality or stability.") 0221 0222 actions: [ 0223 Kirigami.Action { 0224 icon.name: "get-hot-new-stuff" 0225 text: i18nc("@action:button", "See 3rd-Party Content…") 0226 onTriggered: Controller.launchApp("org.kde.knewstuff-dialog") 0227 } 0228 ] 0229 } 0230 } 0231 }