diff options
author | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2011-12-07 15:35:53 +0100 |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2011-12-07 15:35:53 +0100 |
commit | d3e4f76d7fcd51768130afe9d47601af9c80a35b (patch) | |
tree | ae5a18bb07e3c55335d945fe3c5a5e07bccff126 | |
parent | dfe0080179f362b9958ff9d11cfe59a6eb9dd1f9 (diff) |
Added a simplify version of my Qt devdays example
-rw-r--r-- | examples/QuickSpot/QuickSpot.qml | 119 | ||||
-rw-r--r-- | examples/QuickSpot/QuickSpot.qmlproject | 20 | ||||
-rw-r--r-- | examples/QuickSpot/images/album.jpg | bin | 0 -> 25680 bytes | |||
-rw-r--r-- | examples/QuickSpot/images/media-playback-pause.png | bin | 0 -> 655 bytes | |||
-rw-r--r-- | examples/QuickSpot/images/media-playback-start.png | bin | 0 -> 1028 bytes | |||
-rw-r--r-- | examples/QuickSpot/images/media-skip-backward.png | bin | 0 -> 1048 bytes | |||
-rw-r--r-- | examples/QuickSpot/images/media-skip-forward.png | bin | 0 -> 1124 bytes |
7 files changed, 139 insertions, 0 deletions
diff --git a/examples/QuickSpot/QuickSpot.qml b/examples/QuickSpot/QuickSpot.qml new file mode 100644 index 000000000..9b9937269 --- /dev/null +++ b/examples/QuickSpot/QuickSpot.qml @@ -0,0 +1,119 @@ +import QtQuick 1.1 +import QtDesktop 0.1 + +ApplicationWindow { + id: window + width: 640 + height: 400 + + SystemPalette { id: palette } + + Settings { // Store persistant settings here + property alias width: window.width + property alias height: window.height + } + + toolBar: ToolBar{ + RowLayout { + anchors.fill: parent + anchors.margins: 8 + ToolButton { + iconSource: "images/media-skip-backward.png" + } + ToolButton { + iconSource: "images/media-playback-pause.png" + } + ToolButton { + iconSource: "images/media-skip-forward.png" + } + Label{ + text: "0:00" + } + Slider{ + id: slider + Layout.horizontalSizePolicy: Layout.Expanding + } + Label{ + text: "4:00" + } + TextField { + id: searchedit + styleHint: "rounded" + } + } + } + + statusBar: StatusBar { + Label { + anchors.centerIn: parent + text: "Currently playing track" + } + } + + SplitterRow { + anchors.fill: parent + handleWidth: 1 + Item { + width: 160 + Splitter.maximumWidth: 200 + Splitter.minimumWidth: 50 + TableView { + id: view + frame: false + alternateRowColor: false + backgroundColor: palette.alternateBase + anchors.top: parent.top + anchors.bottom: albumview.top + TableColumn{ + title: "Playlists" + role: "name" + elideMode: Text.ElideRight + } + model: ListModel { + Component.onCompleted: { + for (var i = 0 ; i < 10 ; ++i) + append( {"name" : "Playlist "+i}) + } + } + } + Image { + id: albumview + anchors.bottom: parent.bottom + width: parent.width + height: parent.width + fillMode: Image.PreserveAspectCrop + clip: true + source: "images/album.jpg" + Rectangle { + anchors.top: parent.top + width: parent.width + height: 1 + color: palette.dark + } + } + } + TableView { + frame: false + TableColumn{ + title: "Track" + role: "name" + } + TableColumn{ + title: "Artist" + role: "artist" + } + TableColumn{ + title: "Album" + role: "album" + } + model: ListModel { + Component.onCompleted: { + for (var i = 0 ; i < 100 ; ++i) + append( {"name" : "Track "+i, + "artist" : "Artist "+i, + "album" : "Album "+i}) + } + } + } + } +} diff --git a/examples/QuickSpot/QuickSpot.qmlproject b/examples/QuickSpot/QuickSpot.qmlproject new file mode 100644 index 000000000..99ff5245d --- /dev/null +++ b/examples/QuickSpot/QuickSpot.qmlproject @@ -0,0 +1,20 @@ +/* File generated by Qt Creator, version 2.3.1 */ + +import QmlProject 1.1 + +Project { + mainFile: "QuickSpot.qml" + + /* 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/QuickSpot/images/album.jpg b/examples/QuickSpot/images/album.jpg Binary files differnew file mode 100644 index 000000000..5946deed7 --- /dev/null +++ b/examples/QuickSpot/images/album.jpg diff --git a/examples/QuickSpot/images/media-playback-pause.png b/examples/QuickSpot/images/media-playback-pause.png Binary files differnew file mode 100644 index 000000000..ee40fc266 --- /dev/null +++ b/examples/QuickSpot/images/media-playback-pause.png diff --git a/examples/QuickSpot/images/media-playback-start.png b/examples/QuickSpot/images/media-playback-start.png Binary files differnew file mode 100644 index 000000000..66f32d89b --- /dev/null +++ b/examples/QuickSpot/images/media-playback-start.png diff --git a/examples/QuickSpot/images/media-skip-backward.png b/examples/QuickSpot/images/media-skip-backward.png Binary files differnew file mode 100644 index 000000000..2a5e70306 --- /dev/null +++ b/examples/QuickSpot/images/media-skip-backward.png diff --git a/examples/QuickSpot/images/media-skip-forward.png b/examples/QuickSpot/images/media-skip-forward.png Binary files differnew file mode 100644 index 000000000..28bca3e72 --- /dev/null +++ b/examples/QuickSpot/images/media-skip-forward.png |