-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExaltationForgeHistoryPage.qml
More file actions
100 lines (82 loc) · 2.5 KB
/
Copy pathExaltationForgeHistoryPage.qml
File metadata and controls
100 lines (82 loc) · 2.5 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
import QtQuick
import QtQuick.Layouts
import qmlcomponents
import QtQuick.LegacyControls
ColumnLayout {
id: root
spacing: TibiaStyle.marginRelated
property var controller: null
property int currentPage: controller != null ? controller.currentPageId + 1 : 1
property int numberOfPages: controller != null ? controller.numberOfPages : 1
TibiaTableView {
id: historyTable
Layout.fillWidth: true
Layout.fillHeight: true
//verticalScrollBarPolicy: ScrollBar.ScrollBarAlwaysOff
headerVisible: true
alternatingRowColors: true
rowHeight: TibiaStyle.tableViewRowHeight2Lines
model: controller != null ? controller.exaltationHistoryModel : null
TableViewColumn {
id: dateColumn
role: "dateString"
title: qsTrId("date_column_header")
width: TibiaStyle.columnWidthDateTime
movable: false
resizable: false
} //TableViewColumn
TableViewColumn {
id: actionColumn
role: "actionString"
title: qsTrId("action_column_header")
width: 95
movable: false
resizable: false
} //TableViewColumn
TableViewColumn {
id: detailsColumn
role: "detailsString"
title: qsTrId("details")
width: historyTable.contentItem.width
- dateColumn.width
- actionColumn.width
movable: false
resizable: false
} //TableViewColumn
} //TibiaTableView
RowLayout {
Layout.fillWidth: true
spacing: TibiaStyle.marginRelated
TibiaButton {
id: previouPageButton
Layout.preferredWidth: TibiaStyle.buttonWidthWide
text: qsTrId("previous_page")
enabled: root.currentPage > 1
opacity: enabled ? 1 : 0
onClicked: {
if (controller != null) {
controller.requestPreviousPage();
}
} //onClicked
} //TibiaButton
TibiaText {
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
text: qsTrId("page_current_and_max").arg(root.currentPage)
.arg(root.numberOfPages)
opacity: previouPageButton.enabled || nextPageButton.enabled ? 1 : 0
} //TibiaText
TibiaButton {
id: nextPageButton
Layout.preferredWidth: TibiaStyle.buttonWidthWide
text: qsTrId("next_page")
enabled: root.currentPage < root.numberOfPages
opacity: enabled ? 1 : 0
onClicked: {
if (controller != null) {
controller.requestNextPage();
}
} //onClicked
} //TibiaButton
} //RowLayout
} //ColumnLayout