summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/shared
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlvisual/shared')
-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/Vera.ttfbin0 -> 65932 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/shared/qmldir3
6 files changed, 46 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/shared/README b/tests/auto/declarative/qmlvisual/shared/README
new file mode 100644
index 0000000..56a88ae
--- /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 0000000..be40112
--- /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: "Vera.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 0000000..e19e418
--- /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: "Vera.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 0000000..e01c2c2
--- /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: "Vera.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/Vera.ttf b/tests/auto/declarative/qmlvisual/shared/Vera.ttf
new file mode 100644
index 0000000..58cd6b5
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/shared/Vera.ttf
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/shared/qmldir b/tests/auto/declarative/qmlvisual/shared/qmldir
new file mode 100644
index 0000000..4aebb39
--- /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