-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHelpButton.qml
More file actions
63 lines (55 loc) · 2.34 KB
/
HelpButton.qml
File metadata and controls
63 lines (55 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// HelpButton.qml
import QtQuick 6.0
import QtQuick.Controls 6.0
import QtQuick.Layouts 6.0
import org.kde.kirigami 2.20 as Kirigami
Button {
property string page: "general"
icon.name: "help-contents"
text: i18n("Help")
onClicked: helpDialog.open()
Dialog {
id: helpDialog
title: i18n("Cryptonite Help")
standardButtons: Dialog.Close
width: 400
height: 300
ColumnLayout {
anchors.fill: parent
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
TextArea {
id: helpText
readOnly: true
wrapMode: Text.Wrap
text: {
switch (page) {
case "general":
return i18n(
"General Settings Help:\n\n" +
"• Widget Title: Custom name for your widget\n" +
"• Cryptocurrencies: Comma-separated symbols (BTC,ETH,XRP)\n" +
"• Update Interval: Data refresh rate in seconds\n" +
"• Colors: Customize widget appearance\n" +
"• Portfolio: Enter your cryptocurrency holdings\n" +
" - Amount: Quantity you own\n" +
" - Purchase Price: Price per coin when purchased"
);
case "notifications":
return i18n(
"Notifications Settings Help:\n\n" +
"• Enable notifications: Toggle sound alerts\n" +
"• Gain Sound: Play when portfolio increases by 0.1%\n" +
"• Loss Sound: Play when portfolio decreases by 0.1%\n\n" +
"Sounds will play when your total profit/loss changes by more than 0.1%."
);
default:
return i18n("Select a help topic");
}
}
}
}
}
}
}