summaryrefslogtreecommitdiffstats
path: root/examples/declarative/scrollbar
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/scrollbar')
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml33
-rw-r--r--examples/declarative/scrollbar/display.qml54
-rw-r--r--examples/declarative/scrollbar/pics/niagara_falls.jpgbin604121 -> 0 bytes
-rw-r--r--examples/declarative/scrollbar/scrollbar.qmlproject16
4 files changed, 0 insertions, 103 deletions
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
deleted file mode 100644
index 5433156..0000000
--- a/examples/declarative/scrollbar/ScrollBar.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-import Qt 4.7
-
-Item {
- id: scrollBar
-
- // The properties that define the scrollbar's state.
- // position and pageSize are in the range 0.0 - 1.0. They are relative to the
- // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
- // of the height of the view.
- // orientation can be either 'Vertical' or 'Horizontal'
- property real position
- property real pageSize
- property variant orientation : "Vertical"
-
- // A light, semi-transparent background
- Rectangle {
- id: background
- anchors.fill: parent
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
- color: "white"
- opacity: 0.3
- }
- // Size the bar to the required size, depending upon the orientation.
- Rectangle {
- x: orientation == 'Vertical' ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
- y: orientation == 'Vertical' ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
- width: orientation == 'Vertical' ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
- height: orientation == 'Vertical' ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
- color: "black"
- opacity: 0.7
- }
-}
diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml
deleted file mode 100644
index cb1da16..0000000
--- a/examples/declarative/scrollbar/display.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 640
- height: 480
-
- // Create a flickable to view a large image.
- Flickable {
- id: view
- anchors.fill: parent
- contentWidth: picture.width
- contentHeight: picture.height
-
- Image {
- id: picture
- source: "pics/niagara_falls.jpg"
- asynchronous: true
- }
-
- // Only show the scrollbars when the view is moving.
- states: State {
- name: "ShowBars"
- when: view.moving
- PropertyChanges { target: verticalScrollBar; opacity: 1 }
- PropertyChanges { target: horizontalScrollBar; opacity: 1 }
- }
-
- transitions: Transition {
- from: "*"; to: "*"
- NumberAnimation { properties: "opacity"; duration: 400 }
- }
- }
-
- // Attach scrollbars to the right and bottom edges of the view.
- ScrollBar {
- id: verticalScrollBar
- width: 12; height: view.height-12
- anchors.right: view.right
- opacity: 0
- orientation: "Vertical"
- position: view.visibleArea.yPosition
- pageSize: view.visibleArea.heightRatio
- }
-
- ScrollBar {
- id: horizontalScrollBar
- width: view.width-12; height: 12
- anchors.bottom: view.bottom
- opacity: 0
- orientation: "Horizontal"
- position: view.visibleArea.xPosition
- pageSize: view.visibleArea.widthRatio
- }
-}
diff --git a/examples/declarative/scrollbar/pics/niagara_falls.jpg b/examples/declarative/scrollbar/pics/niagara_falls.jpg
deleted file mode 100644
index 618d808..0000000
--- a/examples/declarative/scrollbar/pics/niagara_falls.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/scrollbar/scrollbar.qmlproject b/examples/declarative/scrollbar/scrollbar.qmlproject
deleted file mode 100644
index d4909f8..0000000
--- a/examples/declarative/scrollbar/scrollbar.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 " ]
-}