summaryrefslogtreecommitdiff
path: root/testapp/qml/testapp/ErrorLogger.qml
blob: 095ddaba2e904912ccc15ddbaf8bae6eac3b0fb4 (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
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
import QtQuick 2.0
import QtQuick.Controls 1.0

Item {
    id: item1
    GroupBox {
        id: groupCreateEntry
        anchors.bottom: groupGetErrors.top
        anchors.right: parent.right
        anchors.left: parent.left
        anchors.top: parent.top
        title: "Create entry (simple)"

        TextField {
            id: textDescription
            anchors.right: btnCreateEntry.left
            anchors.left: parent.left
            anchors.top: parent.top
            font.pixelSize: 12
        }

        Button {
            id: btnCreateEntry
            x: -106
            y: 0
            text: "Create entry"
            anchors.top: groupCreateEntry.bottom
            anchors.right: parent.right
        }

        Text {
            id: text1
            x: 0
            y: 27
            text: qsTr("Description")
            anchors.left: parent.left
        anchors.top: textDescription.bottom
        font.pixelSize: 12
    }


    }

    GroupBox {
        id: groupGetErrors
        anchors.topMargin: 0
        anchors.top: groupCreateEntry.bottom
        anchors.bottom: parent.bottom
        title: "Retrieve errors"
        anchors.left: parent.left
        anchors.right: parent.right

    ListModel {
    id: errorsModel;
    }

        ListView {
            id: listErrors
            anchors.bottom: groupErrorsControls.top
            anchors.left: parent.left
            anchors.right: parent.right
model: errorsModel;
        }

        GroupBox {
            id: groupErrorsControls
            anchors.bottom: parent.bottom
            anchors.left: parent.left
            anchors.right: parent.right

            Button {
                id: btnGetErrors
                text: "Get errors"
                anchors.bottom: parent.bottom
                anchors.left: item1.right
                anchors.leftMargin: 8
                anchors.right: parent.right
        onClicked: {
            var list = errorloggerinterface.getItems(0, Math.round(new Date().getTime() / 1000), 0, 0, 100);
    console.log(list.at(0));
}
            }
        }
        }

}