From f1ceb118c084112050c7cbd3262af982cc6cbd19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20P=C3=A5lsson?= Date: Mon, 24 Feb 2014 16:46:07 +0100 Subject: Added ErrorLogger QML --- testapp/qml/testapp/ErrorLogger.qml | 86 +++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 testapp/qml/testapp/ErrorLogger.qml (limited to 'testapp') diff --git a/testapp/qml/testapp/ErrorLogger.qml b/testapp/qml/testapp/ErrorLogger.qml new file mode 100644 index 0000000..095ddab --- /dev/null +++ b/testapp/qml/testapp/ErrorLogger.qml @@ -0,0 +1,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)); +} + } + } + } + +} -- cgit v1.2.1