summaryrefslogtreecommitdiff
path: root/sowatchui/qml/main.qml
blob: 8697b6d5804a6a3fb271ca6c2aa83784e06a24a6 (plain)
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
import QtQuick 1.1
import com.nokia.meego 1.0

import "sowatch.js" as Sowatch

PageStackWindow {
    id: appWindow

    initialPage: mainPage

    MainPage {
        id: mainPage
    }

    ToolBarLayout {
        id: commonTools
        visible: true
        ToolIcon {
            platformIconId: "toolbar-view-menu"
            anchors.right: (parent === undefined) ? undefined : parent.right
            onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
        }
    }

    Menu {
        id: myMenu
        visualParent: pageStack
        MenuLayout {
			MenuItem {
				text: qsTr("Start service")
				onClicked: {
					Sowatch.start();
				}
			}
			MenuItem {
				text: qsTr("Stop service")
				onClicked: {
					Sowatch.stop();
				}
			}
        }
    }
}