diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-14 01:32:57 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-16 23:42:12 (GMT) |
commit | 82d0b03c4f81c2832975d548917c03dbaddeee72 (patch) | |
tree | cb2d7ae0c7c8c5870f4c9439453c938a9423afad /examples/declarative/fonts | |
parent | 0aca20bf669ef7e7702ee96d0d0676392cfd1b72 (diff) | |
download | Qt-82d0b03c4f81c2832975d548917c03dbaddeee72.zip Qt-82d0b03c4f81c2832975d548917c03dbaddeee72.tar.gz Qt-82d0b03c4f81c2832975d548917c03dbaddeee72.tar.bz2 |
Restructure the examples. They are now organized into various
subdirectories to make it easier to locate examples for certain
features (e.g. animation) and to distinguish between different types
of examples (e.g. very basic examples vs complex demo-like examples).
Diffstat (limited to 'examples/declarative/fonts')
-rw-r--r-- | examples/declarative/fonts/availableFonts.qml | 17 | ||||
-rw-r--r-- | examples/declarative/fonts/banner.qml | 21 | ||||
-rw-r--r-- | examples/declarative/fonts/fonts.qml | 64 | ||||
-rw-r--r-- | examples/declarative/fonts/fonts.qmlproject | 16 | ||||
-rw-r--r-- | examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf | bin | 24544 -> 0 bytes | |||
-rw-r--r-- | examples/declarative/fonts/hello.qml | 38 |
6 files changed, 0 insertions, 156 deletions
diff --git a/examples/declarative/fonts/availableFonts.qml b/examples/declarative/fonts/availableFonts.qml deleted file mode 100644 index defa4ce..0000000 --- a/examples/declarative/fonts/availableFonts.qml +++ /dev/null @@ -1,17 +0,0 @@ -import Qt 4.7 - -Rectangle { - width: 480; height: 640; color: "steelblue" - - ListView { - anchors.fill: parent; model: Qt.fontFamilies() - - delegate: Item { - height: 40; width: ListView.view.width - Text { - anchors.centerIn: parent - text: modelData; font.family: modelData; font.pixelSize: 24; color: "white" - } - } - } -} diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/fonts/banner.qml deleted file mode 100644 index 353354a..0000000 --- a/examples/declarative/fonts/banner.qml +++ /dev/null @@ -1,21 +0,0 @@ -import Qt 4.7 - -Rectangle { - id: screen - - property int pixelSize: screen.height * 1.25 - property color textColor: "lightsteelblue" - property string text: "Hello world! " - - width: 640; height: 320 - color: "steelblue" - - Row { - y: -screen.height / 4.5 - - NumberAnimation on x { from: 0; to: -text.width; duration: 6000; loops: Animation.Infinite } - Text { id: text; font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text } - Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text } - Text { font.pixelSize: screen.pixelSize; color: screen.textColor; text: screen.text } - } -} diff --git a/examples/declarative/fonts/fonts.qml b/examples/declarative/fonts/fonts.qml deleted file mode 100644 index f3eac48..0000000 --- a/examples/declarative/fonts/fonts.qml +++ /dev/null @@ -1,64 +0,0 @@ -import Qt 4.7 - -Rectangle { - property string myText: "The quick brown fox jumps over the lazy dog." - - width: 800; height: 480 - color: "steelblue" - - FontLoader { id: fixedFont; name: "Courier" } - FontLoader { id: localFont; source: "fonts/tarzeau_ocr_a.ttf" } - FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" } - - Column { - anchors { fill: parent; leftMargin: 10; rightMargin: 10 } - spacing: 15 - - Text { - text: myText - color: "lightsteelblue" - width: parent.width - elide: Text.ElideRight - font.family: "Times"; font.pointSize: 42 - } - Text { - text: myText - color: "lightsteelblue" - width: parent.width - elide: Text.ElideLeft - font { family: "Times"; pointSize: 42; capitalization: Font.AllUppercase } - } - Text { - text: myText - color: "lightsteelblue" - width: parent.width - elide: Text.ElideMiddle - font { family: fixedFont.name; pointSize: 42; weight: Font.Bold; capitalization: Font.AllLowercase } - } - Text { - text: myText - color: "lightsteelblue" - width: parent.width - elide: Text.ElideRight - font { family: fixedFont.name; pointSize: 42; italic: true; capitalization: Font.SmallCaps } - } - Text { - text: myText - color: "lightsteelblue" - width: parent.width - elide: Text.ElideLeft - font { family: localFont.name; pointSize: 42; capitalization: Font.Capitalize } - } - Text { - text: { - if (webFont.status == FontLoader.Ready) myText - else if (webFont.status == FontLoader.Loading) "Loading..." - else if (webFont.status == FontLoader.Error) "Error loading font" - } - color: "lightsteelblue" - width: parent.width - elide: Text.ElideMiddle - font.family: webFont.name; font.pointSize: 42 - } - } -} diff --git a/examples/declarative/fonts/fonts.qmlproject b/examples/declarative/fonts/fonts.qmlproject deleted file mode 100644 index d4909f8..0000000 --- a/examples/declarative/fonts/fonts.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf b/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf Binary files differdeleted file mode 100644 index cf93f96..0000000 --- a/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf +++ /dev/null diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml deleted file mode 100644 index 0d6f4cd..0000000 --- a/examples/declarative/fonts/hello.qml +++ /dev/null @@ -1,38 +0,0 @@ -import Qt 4.7 - -Rectangle { - id: screen - - width: 800; height: 480 - color: "black" - - Item { - id: container - x: screen.width / 2; y: screen.height / 2 - - Text { - id: text - anchors.centerIn: parent - color: "white" - text: "Hello world!" - font.pixelSize: 60 - - SequentialAnimation on font.letterSpacing { - loops: Animation.Infinite; - NumberAnimation { from: 100; to: 300; easing.type: Easing.InQuad; duration: 3000 } - ScriptAction { - script: { - container.y = (screen.height / 4) + (Math.random() * screen.height / 2) - container.x = (screen.width / 4) + (Math.random() * screen.width / 2) - } - } - } - - SequentialAnimation on opacity { - loops: Animation.Infinite; - NumberAnimation { from: 1; to: 0; duration: 2600 } - PauseAnimation { duration: 400 } - } - } - } -} |