-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.qml
More file actions
90 lines (84 loc) · 2.64 KB
/
main.qml
File metadata and controls
90 lines (84 loc) · 2.64 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
import QtQuick 2.11
import QtQuick.Controls 2.5
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.11
import QtQuick.Window 2.11
import QtQuick.Dialogs 1.1
import QtQml.Models 2.11
import il.luminati 1.0
ApplicationWindow {
id: window
visible: true
width: 540
height: 720
header: ToolBar {
height: window.height * 0.075
RowLayout {
anchors.fill: parent
ToolButton {
text: qsTr("<")
onClicked: stack.pop()
opacity : stack.depth > 1 ? 1.0 : 0.0
}
Label {
id: toolBarLabel
text: stack.currentItem.title
elide: Label.ElideRight
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
Layout.fillWidth: true
}
ToolButton {
text: qsTr("?")
onClicked: console.log("show help")
}
}
}
StackView {
id: stack
anchors.fill: parent
initialItem: Page {
title: qsTr("E-Reader Launcher")
ListView {
width: window.width
height: window.height
model: ObjectModel {
id: views
ListObjectItem {
label: qsTr("Start CoolReader")
ProcessManager {
id: coolreader_p
command: "zenity --info --text=launched"
onFinished: {
window.show();
}
}
onClicked: {
window.hide();
coolreader_p.run();
}
}
ListObjectItem {
label: qsTr("About")
Page {
title: qsTr("About")
id: settings
visible: false
contentItem: Text {
anchors.fill: parent
anchors.margins: window.height * 0.075 * 0.3
text: "none"
}
}
onClicked: stack.push(settings)
}
}
}
}
// disable all animations
pushEnter: Transition { }
pushExit: Transition { }
popEnter: Transition { }
popExit: Transition { }
}
}