-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.qml
executable file
·94 lines (77 loc) · 2.37 KB
/
main.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
import QtQuick 2.0
import Sailfish.Silica 1.0
import "pages"
import "controls"
ApplicationWindow
{
property string warnColor : "red" //Theme.highlightColor
allowedOrientations : "Portrait" | "Landscape"
id: appWin
onApplicationActiveChanged :
{
myqquickview.fullRestart();
}
//onStateChanged: { console.log("onStateChanged")}
//onActiveFocusChanged: console.log("onActiveFocusChanged")
initialPage: MFiledialog {}// {}//MFiledialog {} //SecondPage {}
cover: Qt.resolvedUrl("cover/CoverPage.qml")
function myQmlFunction(msg)
{
// console.log("Got message:", msg)
myQmlSignal(0, 5555);
return "some return value"
}
signal myQmlListBoxSignal(int listNr, string name, int total, bool checked, int currentIndex)
signal mButtonSignal(int buttonNr)
function loadTextEdit(text)
{
pageStack.replaceAbove(pageStack.previousPage(), Qt.resolvedUrl("controls/MTextEdit.qml"))
pageStack.currentPage.setText(text)
return true;
}
function errorDialog(errtext)
{
var errorDialog = pageStack.push("./controls/MMessageDialog.qml", {text : errtext}, PageStackAction.Immediate)
errorDialog.accepted.connect(
function()
{
myqquickview.shutDown()
})
errorDialog.rejected.connect(
function()
{
myqquickview.shutDown()
})
return 0;
}
function showCheckLists()
{
pageStack.push(Qt.resolvedUrl("pages/ClDialog.qml"))
return true
}
function setAtBegin(listNr)
{if (listNr === 1)
{return (pageStack.currentPage.listWidgetlistWidget.listBox.setAtBegin())}
else
{return (pageStack.currentPage.listWidgetCheck.listBox.setAtBegin())}
}
function setInMid(listNr, nr)
{
if (listNr === 0)
{
return (pageStack.currentPage.fileDialog.listbox.setInMid(nr))
}
else if (listNr === 1)
{
return (pageStack.currentPage.listWidget.listBox.setInMid(nr))
}
else
{return (pageStack.currentPage.listWidgetCheck.listBox.setInMid(nr))}
}
function ready(msg)
{
pageStack.pop(initialPage, PageStackAction.Immediate)
var dialog = pageStack.push("./controls/MMessageDialog.qml", {text : msg}, PageStackAction.Immediate)
initialPage.ready = true
}
}