summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/shared
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
committerMatthew Vogt <matthew.vogt@nokia.com>2012-01-30 14:16:15 +1000
commit12a5ddf456ba8549645a8cb28a8b4ed6197a14da (patch)
tree63ee2c88af936e0609a3a194f5bcc304c4c0b707 /tests/auto/declarative/qmlvisual/shared
Import relevant source from Qt 4.8
Diffstat (limited to 'tests/auto/declarative/qmlvisual/shared')
-rw-r--r--tests/auto/declarative/qmlvisual/shared/DejaVuSansMono.ttfbin0 -> 237788 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/shared/README7
-rw-r--r--tests/auto/declarative/qmlvisual/shared/TestText.qml8
-rw-r--r--tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/shared/TestTextInput.qml14
-rw-r--r--tests/auto/declarative/qmlvisual/shared/qmldir3
6 files changed, 46 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/shared/DejaVuSansMono.ttf b/tests/auto/declarative/qmlvisual/shared/DejaVuSansMono.ttf
new file mode 100644
index 00000000..029fcac3
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/DejaVuSansMono.ttf
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/shared/README b/tests/auto/declarative/qmlvisual/shared/README
new file mode 100644
index 00000000..56a88ae5
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/README
@@ -0,0 +1,7 @@
+These components provide a standard set of what would otherwise be system dependant settings. These are
+-default font
+-default fontSize
+-cursor blink time (unblinking cursor)
+
+This should probably be replaced with a Test Style/Theme once QtComponents is done.
+Note that having multiple font loaders is probably quite inefficient, so don't use these for performance tests.
diff --git a/tests/auto/declarative/qmlvisual/shared/TestText.qml b/tests/auto/declarative/qmlvisual/shared/TestText.qml
new file mode 100644
index 00000000..ab624c31
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/TestText.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.0
+import "../shared" 1.0
+
+Text{
+ FontLoader { id: fixedFont; source: "DejaVuSansMono.ttf" }
+ font.family: fixedFont.name
+ font.pixelSize: 12
+}
diff --git a/tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml b/tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml
new file mode 100644
index 00000000..e7c5bc1b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/TestTextEdit.qml
@@ -0,0 +1,14 @@
+import QtQuick 1.0
+import "../shared" 1.0
+
+TextEdit {
+ id: edit
+ FontLoader { id: fixedFont; source: "DejaVuSansMono.ttf" }
+ font.family: fixedFont.name
+ font.pixelSize: 12
+ cursorDelegate: Rectangle {
+ width: 1;
+ color: "black";
+ visible: edit.cursorVisible
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/shared/TestTextInput.qml b/tests/auto/declarative/qmlvisual/shared/TestTextInput.qml
new file mode 100644
index 00000000..64938e04
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/TestTextInput.qml
@@ -0,0 +1,14 @@
+import QtQuick 1.0
+import "../shared" 1.0
+
+TextInput {
+ id: inp
+ FontLoader { id: fixedFont; source: "DejaVuSansMono.ttf" }
+ font.family: fixedFont.name
+ font.pixelSize: 12
+ cursorDelegate: Rectangle {
+ width: 1;
+ color: "black";
+ visible: parent.cursorVisible//bug that 'inp' doesn't seem to work?
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/shared/qmldir b/tests/auto/declarative/qmlvisual/shared/qmldir
new file mode 100644
index 00000000..4aebb393
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/qmldir
@@ -0,0 +1,3 @@
+TestText 1.0 TestText.qml
+TestTextEdit 1.0 TestTextEdit.qml
+TestTextInput 1.0 TestTextInput.qml