-
Notifications
You must be signed in to change notification settings - Fork 1
/
SlideShow.qml
189 lines (141 loc) · 4.44 KB
/
SlideShow.qml
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
179
180
181
182
183
184
185
import QtQuick 2.9
import QtQuick.Window 2.4
//import QtQuick.Controls 1.3
//import QtQuick.Controls.Styles 1.3
import "main.js" as Scripts
import "slides.js" as Slides
Item {
id:popup
property string number: "0"
property string list:""
property string maintitle:""
clip: true
onStateChanged: if(popup.state == "Active") {Slides.aboutslides(qsTr);} else {slidelist.clear();}
states: [
State {
name:"Active"
PropertyChanges {
target: popup
visible:true
}
},
State {
name:"InActive"
PropertyChanges {
target: popup
visible:false
}
}
]
anchors.centerIn: parent
Rectangle {
anchors.fill:parent
color:"white"
//radius:6
//border.width:1
// border.color:"black"
}
GridView {
id:ftext
property string list:""
//property string pindex:pageindex
anchors.fill:parent
z:0
//width: parent.width * 0.25//- units.gu(.4)
// height: parent.height //- units.gu(4.8)
snapMode: GridView.SnapOneRow
//flow: GridView.FlowLeftToRight
flow:GridView.FlowTopToBottom
boundsBehavior: Flickable.DragAndOvershootBounds
flickableDirection: Flickable.VerticalFlick
//highlightFollowsCurrentItem: true
visible: true
//cellHeight: units.gu(26)
clip:true
//enabled:false
//enabled:if(selection == 2) {true} else {false}
cellHeight:parent.height //passerbyGrid.height
cellWidth: popup.width
delegate: Item {
//anchors.fill:parent
width:popup.width
height:popup.height
clip:true
Column {
width:parent.width
height:parent.height
spacing:20
Text {
id:title
text:ftitle
font.pixelSize: parent.height * 0.075
anchors.horizontalCenter: parent.horizontalCenter
//anchors.verticalCenter: parent.verticalCenter
//anchors.horizontalCenterOffset: parent.width * (0.01*fHoffset)
// anchors.verticalCenterOffset: parent.height * (0.01*fVoffset)
color:fontColor
style: Text.Outline; styleColor: "#FFFFFF"
}
Image {
id:picture
source:pic
fillMode:Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter
width:popup.width * 0.8
height:popup.height * 0.4
}
Text {
id:discript
text:disc
font.pixelSize: parent.height * 0.025
anchors.leftMargin:10
anchors.left:parent.left
wrapMode:Text.WordWrap
width:parent.width - 10
color:fontColor
style: Text.Outline; styleColor: "#FFFFFF"
}
}
Text {
id:slidenum
text:qsTr("Pages:")+slidnum +"/"+ftext.count
font.pixelSize: parent.height * 0.025
anchors.bottom:parent.bottom
anchors.right:parent.right
anchors.rightMargin: 10
color:fontColor
style: Text.Outline; styleColor: "#FFFFFF"
}
}
model:
ListModel {
id:slidelist
}
}
Rectangle {
anchors.bottom:parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin:90
// border.color:"black"
// border.width:1
color:Qt.rgba(1,1,1,0)
width:parent.width * 0.34
height:parent.height * 0.08
Flasher {
id:closeflash
}
Text {
id:btext
font.pixelSize: parent.width * 0.08
anchors.centerIn: parent
text:qsTr("close")
color:fontColor
}
MouseArea {
anchors.fill:parent
onPressed:closeflash.state = "Active"
onReleased:closeflash.state = "InActive"
onClicked:popup.state = "InActive"
}
}
}