summaryrefslogtreecommitdiffstats
path: root/tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-01-08 11:32:33 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-01-08 14:36:21 +0200
commit0144b397eff1340497ac2e599f7d9238bf99609c (patch)
treee65e1d9c0f8ddd077cf559c7c0e705eea9a027f4 /tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml
parent467e729eabece018cd42eeee0160f932983561b0 (diff)
Enable showing multiple graphs in QML
+ other minor fixes Task-number: QTRD-2749 Change-Id: I654d41fd4124d6596f9df3ace7019706452d8bfa Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Diffstat (limited to 'tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml')
-rw-r--r--tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml b/tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml
new file mode 100644
index 00000000..e44c9d1a
--- /dev/null
+++ b/tests/qmlmultigraph/qml/qmlmultigraph/newbutton.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Styles 1.0
+
+Item {
+ id: newbutton
+
+ property alias text: buttonText.text
+
+ signal clicked
+
+ implicitWidth: buttonText.implicitWidth + 5
+ implicitHeight: buttonText.implicitHeight + 10
+
+ Button {
+ id: buttonText
+ width: parent.width
+ height: parent.height
+
+ style: ButtonStyle {
+ label: Component {
+ Text {
+ text: buttonText.text
+ clip: true
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ anchors.fill: parent
+ }
+ }
+ }
+ onClicked: newbutton.clicked()
+ }
+}