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

* Got rid of obsolete CollectionProxyModel*.

This commit is contained in:
Christian Muehlhaeuser 2012-06-01 04:23:03 +02:00
parent faf8cf1539
commit f5bdc3a30b
6 changed files with 1 additions and 174 deletions

View File

@ -50,8 +50,6 @@ set( libGuiSources
playlist/TreeProxyModelPlaylistInterface.cpp
playlist/TreeHeader.cpp
playlist/TreeItemDelegate.cpp
playlist/CollectionProxyModel.cpp
playlist/CollectionProxyModelPlaylistInterface.cpp
playlist/CollectionView.cpp
playlist/PlaylistModel.cpp
playlist/PlaylistView.cpp

View File

@ -1,46 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CollectionProxyModel.h"
#include "CollectionProxyModelPlaylistInterface.h"
#include <QTreeView>
#include "Album.h"
#include "Query.h"
#include "utils/Logger.h"
#include "Source.h"
CollectionProxyModel::CollectionProxyModel( QObject* parent )
: PlayableProxyModel( parent )
{
}
Tomahawk::playlistinterface_ptr
CollectionProxyModel::playlistInterface()
{
if ( m_playlistInterface.isNull() )
{
m_playlistInterface = Tomahawk::playlistinterface_ptr( new Tomahawk::CollectionProxyModelPlaylistInterface( this ) );
}
return m_playlistInterface;
}

View File

@ -1,40 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef COLLECTIONPROXYMODEL_H
#define COLLECTIONPROXYMODEL_H
#include "PlayableProxyModel.h"
#include "PlayableProxyModelPlaylistInterface.h"
#include "DllMacro.h"
class DLLEXPORT CollectionProxyModel : public PlayableProxyModel
{
Q_OBJECT
public:
explicit CollectionProxyModel( QObject* parent = 0 );
virtual ~CollectionProxyModel() {}
virtual Tomahawk::playlistinterface_ptr playlistInterface();
};
#endif // COLLECTIONPROXYMODEL_H

View File

@ -1,38 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CollectionProxyModelPlaylistInterface.h"
#include "CollectionProxyModel.h"
#include "Album.h"
#include "Query.h"
#include "Source.h"
#include "utils/Logger.h"
using namespace Tomahawk;
CollectionProxyModelPlaylistInterface::CollectionProxyModelPlaylistInterface( CollectionProxyModel *proxyModel )
: PlayableProxyModelPlaylistInterface( proxyModel )
{
}
CollectionProxyModelPlaylistInterface::~CollectionProxyModelPlaylistInterface()
{
m_proxyModel.clear();
}

View File

@ -1,46 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef COLLECTIONPROXYMODELPLAYLISTINTERFACE_H
#define COLLECTIONPROXYMODELPLAYLISTINTERFACE_H
#include "PlayableProxyModel.h"
#include "PlayableProxyModelPlaylistInterface.h"
#include "DllMacro.h"
class CollectionProxyModel;
namespace Tomahawk
{
class DLLEXPORT CollectionProxyModelPlaylistInterface : public PlayableProxyModelPlaylistInterface
{
Q_OBJECT
public:
explicit CollectionProxyModelPlaylistInterface( CollectionProxyModel* proxyModel );
virtual ~CollectionProxyModelPlaylistInterface();
virtual PlaylistModes::ViewMode viewMode() const { return PlaylistModes::Flat; }
};
} //ns
#endif // COLLECTIONPROXYMODELPLAYLISTINTERFACE_H

View File

@ -22,7 +22,6 @@
#include <QDragEnterEvent>
#include <QPainter>
#include "CollectionProxyModel.h"
#include "PlayableModel.h"
#include "widgets/OverlayWidget.h"
#include "utils/Logger.h"
@ -34,7 +33,7 @@ using namespace Tomahawk;
CollectionView::CollectionView( QWidget* parent )
: TrackView( parent )
{
setProxyModel( new CollectionProxyModel( this ) );
setProxyModel( new PlayableProxyModel( this ) );
setDragDropMode( QAbstractItemView::DragOnly );
}