~qqworini/aesydict/knowndict-master

« back to all changes in this revision

Viewing changes to app/aesydict.qml

  • Committer: Joey Chan
  • Date: 2015-02-15 03:17:55 UTC
  • Revision ID: qqworini@gmail.com-20150215031755-q4ozkh6kbp5gv5cq
initial branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import Ubuntu.Components 1.1
 
3
 
 
4
/*!
 
5
    \brief MainView with Tabs element.
 
6
           First Tab has a single Label and
 
7
           second Tab has a single ToolbarAction.
 
8
*/
 
9
 
 
10
MainView {
 
11
    // objectName for functional testing purposes (autopilot-qt5)
 
12
    objectName: "mainView"
 
13
 
 
14
    // Note! applicationName needs to match the "name" field of the click manifest
 
15
    applicationName: "aesydict.qqworini"
 
16
 
 
17
    /*
 
18
     This property enables the application to change orientation
 
19
     when the device is rotated. The default is false.
 
20
    */
 
21
    //automaticOrientation: true
 
22
 
 
23
    // Removes the old toolbar and enables new features of the new header.
 
24
    useDeprecatedToolbar: false
 
25
 
 
26
    width: units.gu(100)
 
27
    height: units.gu(75)
 
28
 
 
29
    Page {
 
30
        title: i18n.tr("Simple")
 
31
 
 
32
        Column {
 
33
            spacing: units.gu(1)
 
34
            anchors {
 
35
                margins: units.gu(2)
 
36
                fill: parent
 
37
            }
 
38
 
 
39
            Label {
 
40
                id: label
 
41
                objectName: "label"
 
42
 
 
43
                text: i18n.tr("Hello..")
 
44
            }
 
45
 
 
46
            Button {
 
47
                objectName: "button"
 
48
                width: parent.width
 
49
 
 
50
                text: i18n.tr("Tap me!")
 
51
 
 
52
                onClicked: {
 
53
                    label.text = i18n.tr("..world!")
 
54
                }
 
55
            }
 
56
        }
 
57
    }
 
58
}
 
59