-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnalyticsSelectorWidget.qml
More file actions
178 lines (150 loc) · 6.07 KB
/
AnalyticsSelectorWidget.qml
File metadata and controls
178 lines (150 loc) · 6.07 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qmlcomponents
TibiaSidebarWidget {
id: vipSidebarWidget
caption: qsTrId("cyclopedia_analytics_caption")
picSource: "/images/skin/classic/icon-analyticsselector-widget.png"
minContentHeight: TibiaStyle.buttonHeightDefault * 3
initialContentHeight: buttonLayout.height + TibiaStyle.marginRelated * 2
maxContentHeight: buttonLayout.height + TibiaStyle.marginRelated * 2
TibiaScrollView {
id: listView
anchors.fill: parent
clip: true // Ensure items don't overflow
Flickable {
id: skillsFlickable
boundsBehavior: Flickable.StopAtBounds
interactive: false //prevent flick behavior on touch screens
contentHeight: buttonLayout.height
contentWidth: width
ColumnLayout {
id: buttonLayout
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: TibiaStyle.marginRelated
spacing: TibiaStyle.marginNarrow
TibiaButton {
text: widgetController != null && !widgetController.isPremium ? "" : qsTrId("cyclopedia_open_hunting_session_analyser")
Layout.fillWidth: true
Layout.topMargin: TibiaStyle.marginRelated
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.huntingSessionAnalyserVisible
useButtonShouldBeChecked: true
color: widgetController != null && !widgetController.isPremium ? "blue" : "grey";
tooltipText: widgetController != null && !widgetController.isPremium ? qsTrId("cyclopedia_hunting_analyser_premium_only") : ""
tooltipTextChecked: tooltipText
imageSource: widgetController != null && !widgetController.isPremium ? "/images/cyclopedia-hunting-session-premium.png" : ""
onClicked: {
if (widgetController != null) {
widgetController.huntingSessionAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_loot_analyser")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.lootAnalyserVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.lootAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_waste_analyser")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.wasteAnalyserVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.wasteAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_impact_analyser")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.impactAnalyserVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.impactAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_damageinput_analyser")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.damageInputAnalyserVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.damageInputAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_progress_analyser")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.progressAnalyserVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.progressAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_loot_tracker")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.lootTrackerVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.lootTrackerButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_party_hunt_analyser")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.partyHuntAnalyserVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.partyHuntAnalyserButtonClicked();
}
} //onClicked
} // TibiaButton
TibiaButton {
text: qsTrId("cyclopedia_open_boss_tracker")
Layout.fillWidth: true
checkable: true
buttonShouldBeChecked: widgetController == null ? false : widgetController.bossTrackerVisible
useButtonShouldBeChecked: true
onClicked: {
if (widgetController != null) {
widgetController.bossTrackerButtonClicked();
}
} //onClicked
} // TibiaButton
} // ColumnLayout
} // Flickable
} // TibiaScrollView
Lenshelp {
anchors.fill: parent
triggerRect: mapFromItem(widgetRoot, 0, 0, widgetRoot.width, widgetRoot.height)
caption: qsTrId("cyclopedia_analytics_lenshelp_caption")
content: qsTrId("cyclopedia_analytics_lenshelp")
} //Lenshelp
} // TibiaSidebarWidget