1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

* Support new AlbumModel API.

This commit is contained in:
Christian Muehlhaeuser 2012-05-31 23:09:58 +02:00
parent bc982f0ca5
commit 6d057732b5
2 changed files with 7 additions and 7 deletions

View File

@ -37,7 +37,7 @@ AlbumProxyModel::AlbumProxyModel( QObject* parent )
setSortCaseSensitivity( Qt::CaseInsensitive );
setDynamicSortFilter( true );
setSourceAlbumModel( 0 );
setSourcePlayableModel( 0 );
}
@ -51,7 +51,7 @@ AlbumProxyModel::setSourceModel( QAbstractItemModel* sourceModel )
void
AlbumProxyModel::setSourceAlbumModel( AlbumModel* sourceModel )
AlbumProxyModel::setSourcePlayableModel( PlayableModel* sourceModel )
{
m_model = sourceModel;
@ -125,7 +125,7 @@ AlbumProxyModel::removeIndex( const QModelIndex& index )
if ( index.column() > 0 )
return;
sourceModel()->removeIndex( mapToSource( index ) );
sourceModel()->remove( mapToSource( index ) );
}

View File

@ -23,7 +23,7 @@
#include <QSortFilterProxyModel>
#include "PlaylistInterface.h"
#include "playlist/AlbumModel.h"
#include "playlist/PlayableModel.h"
#include "DllMacro.h"
@ -35,8 +35,8 @@ public:
explicit AlbumProxyModel( QObject* parent = 0 );
virtual ~AlbumProxyModel() {}
virtual AlbumModel* sourceModel() const { return m_model; }
virtual void setSourceAlbumModel( AlbumModel* sourceModel );
virtual PlayableModel* sourceModel() const { return m_model; }
virtual void setSourcePlayableModel( PlayableModel* sourceModel );
virtual void setSourceModel( QAbstractItemModel* sourceModel );
virtual int albumCount() const { return rowCount( QModelIndex() ); }
@ -56,7 +56,7 @@ protected:
bool lessThan( const QModelIndex& left, const QModelIndex& right ) const;
private:
AlbumModel* m_model;
PlayableModel* m_model;
Tomahawk::playlistinterface_ptr m_playlistInterface;
};