mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Got rid of obsolete CollectionProxyModel*.
This commit is contained in:
@@ -50,8 +50,6 @@ set( libGuiSources
|
|||||||
playlist/TreeProxyModelPlaylistInterface.cpp
|
playlist/TreeProxyModelPlaylistInterface.cpp
|
||||||
playlist/TreeHeader.cpp
|
playlist/TreeHeader.cpp
|
||||||
playlist/TreeItemDelegate.cpp
|
playlist/TreeItemDelegate.cpp
|
||||||
playlist/CollectionProxyModel.cpp
|
|
||||||
playlist/CollectionProxyModelPlaylistInterface.cpp
|
|
||||||
playlist/CollectionView.cpp
|
playlist/CollectionView.cpp
|
||||||
playlist/PlaylistModel.cpp
|
playlist/PlaylistModel.cpp
|
||||||
playlist/PlaylistView.cpp
|
playlist/PlaylistView.cpp
|
||||||
|
@@ -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;
|
|
||||||
}
|
|
@@ -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
|
|
@@ -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();
|
|
||||||
}
|
|
@@ -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
|
|
@@ -22,7 +22,6 @@
|
|||||||
#include <QDragEnterEvent>
|
#include <QDragEnterEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
#include "CollectionProxyModel.h"
|
|
||||||
#include "PlayableModel.h"
|
#include "PlayableModel.h"
|
||||||
#include "widgets/OverlayWidget.h"
|
#include "widgets/OverlayWidget.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
@@ -34,7 +33,7 @@ using namespace Tomahawk;
|
|||||||
CollectionView::CollectionView( QWidget* parent )
|
CollectionView::CollectionView( QWidget* parent )
|
||||||
: TrackView( parent )
|
: TrackView( parent )
|
||||||
{
|
{
|
||||||
setProxyModel( new CollectionProxyModel( this ) );
|
setProxyModel( new PlayableProxyModel( this ) );
|
||||||
|
|
||||||
setDragDropMode( QAbstractItemView::DragOnly );
|
setDragDropMode( QAbstractItemView::DragOnly );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user