Warning, /education/kwordquiz/src/qml/SettingsPage.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org> 0002 // SPDX-License-Identifier: LGPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import org.kde.kirigami 2.20 as Kirigami 0006 import QtQuick.Layouts 1.15 0007 import org.kde.kirigamiaddons.formcard 1.0 as FormCard 0008 import org.kde.kwordquiz 1.0 0009 0010 FormCard.FormCardPage { 0011 id: root 0012 0013 title: i18nc("@title:window", "Settings") 0014 0015 FormCard.FormHeader { 0016 title: i18n("General") 0017 } 0018 0019 FormCard.FormCard { 0020 FormCard.FormCheckDelegate { 0021 id: showScoreCheckbox 0022 text: i18n("Show score as percentage") 0023 checked: Prefs.percent 0024 onCheckedChanged: { 0025 Prefs.percent = checked; 0026 Prefs.save(); 0027 } 0028 } 0029 } 0030 0031 FormCard.FormHeader { 0032 title: i18n("Flash Card") 0033 } 0034 0035 FormCard.FormCard { 0036 FormCard.FormCheckDelegate { 0037 id: autoFlipCheck 0038 text: i18n("Automatically flip flashcard") 0039 checked: Prefs.autoFlip 0040 onCheckedChanged: { 0041 Prefs.autoFlip = checked; 0042 Prefs.save(); 0043 } 0044 } 0045 0046 FormCard.FormDelegateSeparator { above: flipDelayCheck; below: autoFlipCheck } 0047 0048 FormCard.FormSpinBoxDelegate { 0049 id: flipDelayCheck 0050 label: i18n("Time delay for flipping the flashcard") 0051 value: Prefs.flipDelay 0052 from: 1 0053 to: 30 0054 enabled: Prefs.autoFlip 0055 onValueChanged: { 0056 Prefs.flipDelay = value; 0057 Prefs.save(); 0058 } 0059 } 0060 } 0061 0062 FormCard.FormHeader { 0063 title: i18n("Multiple choice") 0064 } 0065 0066 FormCard.FormCard { 0067 FormCard.FormCheckDelegate { 0068 text: i18n("Automatically check selected answer") 0069 checked: Prefs.autoCheck 0070 onCheckedChanged: { 0071 Prefs.autoCheck = checked; 0072 Prefs.save(); 0073 } 0074 } 0075 } 0076 0077 FormCard.FormHeader { 0078 title: i18n("Question and Answer") 0079 } 0080 0081 FormCard.FormCard { 0082 FormCard.FormCheckDelegate { 0083 id: hintErrorCheckbox 0084 text: i18n("Count using hint as an error") 0085 checked: Prefs.hintError 0086 onCheckedChanged: { 0087 Prefs.hintError = checked 0088 Prefs.save(); 0089 } 0090 } 0091 0092 FormCard.FormDelegateSeparator { above: caseSensitiveCheck; below: hintErrorCheckbox } 0093 0094 FormCard.FormCheckDelegate { 0095 id: caseSensitiveCheck 0096 text: i18n("Compare answers in a case sensitive way") 0097 checked: Prefs.caseSensitiveAnswers 0098 onCheckedChanged: { 0099 Prefs.caseSensitiveAnswers = checked 0100 Prefs.save(); 0101 } 0102 } 0103 } 0104 0105 FormCard.FormCard { 0106 Layout.topMargin: Kirigami.Units.gridUnit 0107 0108 FormCard.FormButtonDelegate { 0109 id: aboutPageButton 0110 icon.name: "org.kde.kwordquiz" 0111 text: i18n("About KWordQuiz") 0112 onClicked: applicationWindow().pageStack.layers.push(aboutPage) 0113 0114 Component { 0115 id: aboutPage 0116 FormCard.AboutPage { 0117 aboutData: About 0118 } 0119 } 0120 } 0121 0122 FormCard.FormDelegateSeparator { above: aboutKDEButton; below: aboutKDEButton} 0123 0124 FormCard.FormButtonDelegate { 0125 id: aboutKDEButton 0126 icon.name: "kde" 0127 text: i18n("About KDE") 0128 onClicked: applicationWindow().pageStack.layers.push(aboutKde) 0129 0130 Component { 0131 id: aboutKde 0132 FormCard.AboutKDE {} 0133 } 0134 } 0135 } 0136 }