From 2fb8b57e2557d9632d95662201260c3fe7e81b25 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 3 Jul 2012 16:51:35 +0200 Subject: [PATCH] added qml file template for stations --- CMakeLists.txt.user.2.3pre1 | 147 ++++++++++++++++++ data/qml/StationScene.qml | 11 ++ resources.qrc | 1 + .../dynamic/widgets/DynamicQmlWidget.cpp | 12 +- 4 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt.user.2.3pre1 create mode 100644 data/qml/StationScene.qml diff --git a/CMakeLists.txt.user.2.3pre1 b/CMakeLists.txt.user.2.3pre1 new file mode 100644 index 000000000..06f8c9cbc --- /dev/null +++ b/CMakeLists.txt.user.2.3pre1 @@ -0,0 +1,147 @@ + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + UTF-8 + false + false + 4 + true + 1 + true + false + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.Target.0 + + Desktop + + CMakeProjectManager.DefaultCMakeTarget + 0 + 0 + 0 + + /home/micha/Develop/tomahawk-build + ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit. + ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit. + + + + + false + Make + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + clean + + true + Make + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + all + + CMakeProjectManager.CMakeBuildConfiguration + + 1 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + No deployment + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + tomahawk + --verbose + false + + Q_FATAL_WARNINGS=1 + + + tomahawk + + CMakeProjectManager.CMakeRunConfiguration. + 3768 + true + false + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {6caf061d-47d5-4e4f-a8d8-0d83c14e4267} + + + ProjectExplorer.Project.Updater.FileVersion + 9 + + diff --git a/data/qml/StationScene.qml b/data/qml/StationScene.qml new file mode 100644 index 000000000..ca11c9141 --- /dev/null +++ b/data/qml/StationScene.qml @@ -0,0 +1,11 @@ +import QtQuick 1.1 + +Rectangle { + color: "red" + anchors.fill: parent +// height: 200 +// width: 200 + + + +} diff --git a/resources.qrc b/resources.qrc index b44da5c7a..4c05c85bf 100644 --- a/resources.qrc +++ b/resources.qrc @@ -147,5 +147,6 @@ data/images/scrollbar-vertical-handle.png data/images/scrollbar-horizontal-handle.png data/qml/ArtistInfoScene.qml + data/qml/StationScene.qml diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp b/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp index 58299bac5..a712b978b 100644 --- a/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp +++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicQmlWidget.cpp @@ -3,8 +3,11 @@ #include "playlist/dynamic/DynamicModel.h" #include "playlist/PlayableProxyModel.h" #include "utils/TomahawkUtilsGui.h" +#include "dynamic/DynamicModel.h" #include +#include +#include namespace Tomahawk { @@ -14,9 +17,14 @@ DynamicQmlWidget::DynamicQmlWidget( const dynplaylist_ptr& playlist, QWidget* pa { setResizeMode(QDeclarativeView::SizeRootObjectToView); - setSource(QUrl("qrc" RESPATH "qml/ArtistInfoScene.qml")); -} + m_model = new DynamicModel( this ); + rootContext()->setContextProperty("dynamicModel", m_model); + + setSource(QUrl("qrc" RESPATH "qml/StationScene.qml")); + + // TODO: fill m_model with the station stuff +} DynamicQmlWidget::~DynamicQmlWidget() {