mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
a very very basic pathview for covers
This commit is contained in:
@@ -1,11 +1,37 @@
|
||||
import QtQuick 1.1
|
||||
|
||||
Rectangle {
|
||||
color: "red"
|
||||
color: "black"
|
||||
anchors.fill: parent
|
||||
// height: 200
|
||||
// width: 200
|
||||
|
||||
PathView {
|
||||
id: view
|
||||
anchors.fill: parent
|
||||
highlight: appHighlight
|
||||
|
||||
preferredHighlightBegin: 0.5
|
||||
preferredHighlightEnd: 0.5
|
||||
focus: true
|
||||
model: dynamicModel
|
||||
|
||||
delegate: Rectangle {
|
||||
height: 200
|
||||
width: 200
|
||||
color: "blue"
|
||||
border.color: "black"
|
||||
border.width: 2
|
||||
}
|
||||
|
||||
path: Path {
|
||||
startX: 0
|
||||
startY: 0
|
||||
// PathAttribute { name: "iconScale"; value: 0.5 }
|
||||
PathQuad { x: 400; y: 150; controlX: 200; controlY: 75 }
|
||||
// PathAttribute { name: "iconScale"; value: 1.0 }
|
||||
// PathQuad { x: 390; y: 50; controlX: 350; controlY: 200 }
|
||||
// PathAttribute { name: "iconScale"; value: 0.5 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,8 +4,10 @@
|
||||
#include "playlist/PlayableProxyModel.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "dynamic/DynamicModel.h"
|
||||
#include "PlayableItem.h"
|
||||
|
||||
#include <QUrl>
|
||||
#include <qdeclarative.h>
|
||||
#include <QDeclarativeContext>
|
||||
#include <QDeclarativeEngine>
|
||||
|
||||
@@ -23,9 +25,10 @@ DynamicQmlWidget::DynamicQmlWidget( const dynplaylist_ptr& playlist, QWidget* pa
|
||||
m_proxyModel = new PlayableProxyModel( this );
|
||||
m_proxyModel->setSourcePlayableModel( m_model );
|
||||
|
||||
rootContext()->setContextProperty( "dynamicModel", m_proxyModel );
|
||||
rootContext()->setContextProperty( "dynamicModel", m_model );
|
||||
|
||||
m_model->loadPlaylist( m_playlist );
|
||||
m_model->startOnDemand();
|
||||
|
||||
setSource( QUrl( "qrc" RESPATH "qml/StationScene.qml" ) );
|
||||
// TODO: fill m_model with the station stuff
|
||||
|
Reference in New Issue
Block a user