// SPDX-FileCopyrightText: 2026 Matvey Shcherbinin // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL import QtQuick import QtQuick.Layouts import QtQuick.Controls as QQC2 import org.kde.kirigami as Kirigami import org.kde.kirigamiaddons.formcard as FormCard import koutnet.app // The third of four: the things the default window keeps out of the way and // hands back when asked. A card opens what it names, and what it opens opens // here rather than making the tour a menu of doors out of itself. // // The theme card is the same appearance page the settings show, so a choice made // during the tour is already made afterwards. A sign-in that is not built yet // says so instead of pretending; the one that is, Matrix, is handed to the same // login the settings page opens. WizardPage { id: root signal matrixLoginRequested() title: i18nc("@title:window", "Powerful when you need it") description: i18nc("@info:usagetip", "None of this is in the way until you look for it. Open any of these now, or from the settings page later.") ColumnLayout { anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter width: Math.min(parent.width - Kirigami.Units.gridUnit * 2, Kirigami.Units.gridUnit * 32) FormCard.FormCard { Layout.fillWidth: true FormCard.FormButtonDelegate { id: shortcutsCard icon.name: "preferences-desktop-keyboard" text: i18nc("@action:button", "Keyboard shortcuts") description: i18nc("@info:whatsthis", "The keys the window already listens for.") onClicked: shortcutsSheet.open() } FormCard.FormDelegateSeparator { above: shortcutsCard; below: themeCard } FormCard.FormButtonDelegate { id: themeCard icon.name: "preferences-desktop-theme" text: i18nc("@action:button", "Themes and appearance") description: i18nc("@info:whatsthis", "Colours, font, icons, widget style and wallpaper, the same page the settings show.") onClicked: themeSheet.open() } FormCard.FormDelegateSeparator { above: themeCard; below: matrixCard } FormCard.FormButtonDelegate { id: matrixCard icon.name: "network-server" text: i18nc("@action:button", "Sign in to Matrix") description: i18nc("@info:whatsthis", "Talk to people beyond your network, through a homeserver.") onClicked: root.matrixLoginRequested() } FormCard.FormDelegateSeparator { above: matrixCard; below: telegramCard } FormCard.FormButtonDelegate { id: telegramCard icon.name: "send-to-symbolic" text: i18nc("@action:button", "Sign in to Telegram") description: i18nc("@info a transport that is not implemented yet", "Not built yet.") enabled: false } FormCard.FormDelegateSeparator { above: telegramCard; below: rocketchatCard } FormCard.FormButtonDelegate { id: rocketchatCard icon.name: "chat-partner-symbolic" text: i18nc("@action:button", "Sign in to Rocket.Chat") description: i18nc("@info a transport that is not implemented yet", "Not built yet.") enabled: false } FormCard.FormDelegateSeparator { above: rocketchatCard; below: ircCard } FormCard.FormButtonDelegate { id: ircCard icon.name: "internet-services" text: i18nc("@action:button", "Sign in to IRC") description: i18nc("@info a transport that is not implemented yet", "Sign-in is not implemented yet.") enabled: false } } Item { Layout.fillHeight: true } } // The keys that are actually bound, read off the window: full screen, the // settings page and quitting. Kept short on purpose - a fabricated list // longer than the real one is worse than a short true one. Kirigami.OverlaySheet { id: shortcutsSheet header: Kirigami.Heading { text: i18nc("@title:window", "Keyboard shortcuts") } ColumnLayout { spacing: Kirigami.Units.largeSpacing Repeater { model: [ { keys: i18nc("@item:inlistbox a keyboard key", "F11"), what: i18nc("@info what the shortcut does", "Full screen") }, { keys: i18nc("@item:inlistbox a keyboard shortcut, Ctrl and the comma key", "Ctrl+,"), what: i18nc("@info what the shortcut does", "Settings") }, { keys: i18nc("@item:inlistbox a keyboard shortcut", "Ctrl+Q"), what: i18nc("@info what the shortcut does", "Quit KOutNet") }, ] delegate: RowLayout { Layout.fillWidth: true required property var modelData spacing: Kirigami.Units.largeSpacing QQC2.Label { Layout.preferredWidth: Kirigami.Units.gridUnit * 6 text: modelData.keys font.bold: true } QQC2.Label { Layout.fillWidth: true text: modelData.what } } } } } // The same component the settings page uses, so the two cannot drift. Kirigami.OverlaySheet { id: themeSheet header: Kirigami.Heading { text: i18nc("@title:window", "Themes and appearance") } QQC2.ScrollView { Layout.preferredWidth: Kirigami.Units.gridUnit * 34 Layout.preferredHeight: Kirigami.Units.gridUnit * 28 AppearancePage { width: parent.width contentWidth: Kirigami.Units.gridUnit * 30 } } } }