mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 23:39:42 +01:00
* Drop obsolete PlaylistView.
This commit is contained in:
parent
7b2ec66d1d
commit
ab33f35f84
@ -24,6 +24,7 @@
|
||||
#include "database/Database.h"
|
||||
#include "SourceList.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/dynamic/database/DatabaseGenerator.h"
|
||||
#include "utils/Logger.h"
|
||||
@ -71,7 +72,7 @@ SocialPlaylistWidget::SocialPlaylistWidget ( QWidget* parent )
|
||||
// connect( model, SIGNAL( emptinessChanged( bool) ), this, SLOT( updatePlaylists() ) );
|
||||
|
||||
m_topForeignTracksModel = new PlaylistModel( ui->newTracksView );
|
||||
ui->newTracksView->setPlaylistModel( m_topForeignTracksModel );
|
||||
ui->newTracksView->setPlayableModel( m_topForeignTracksModel );
|
||||
ui->newTracksView->proxyModel()->setStyle( PlayableProxyModel::Fancy );
|
||||
ui->newTracksView->overlay()->setEnabled( false );
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistView" name="newTracksView">
|
||||
<widget class="TrackView" name="newTracksView">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
@ -82,9 +82,9 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PlaylistView</class>
|
||||
<class>TrackView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>playlist/PlaylistView.h</header>
|
||||
<header>playlist/TrackView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeaderLabel</class>
|
||||
|
@ -49,7 +49,6 @@ set( libGuiSources
|
||||
playlist/ColumnItemDelegate.cpp
|
||||
playlist/ColumnViewPreviewWidget.cpp
|
||||
playlist/PlaylistModel.cpp
|
||||
playlist/PlaylistView.cpp
|
||||
playlist/PlaylistItemDelegate.cpp
|
||||
playlist/QueueProxyModel.cpp
|
||||
playlist/QueueView.cpp
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2013, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
@ -20,7 +20,9 @@
|
||||
#include "ContextMenu.h"
|
||||
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "filemetadata/MetadataEditor.h"
|
||||
#include "GlobalActionManager.h"
|
||||
#include "ViewManager.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Copyright (C) 2011 Leo Franchi <lfranchi@kde.org>
|
||||
* Copyright (C) 2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||
* Copyright (C) 2011-2012, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright (C) 2011-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright (C) 2013, Uwe L. Korn <uwelk@xhochy.com>
|
||||
* Copyright (C) 2013, Teo Mrnjavac <teo@kde.org>
|
||||
*
|
||||
@ -33,7 +33,9 @@
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/PlaylistTemplate.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "resolvers/ExternalResolver.h"
|
||||
#include "resolvers/ScriptCommand_LookupUrl.h"
|
||||
#include "utils/JspfLoader.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "database/DatabaseCommand_DeletePlaylist.h"
|
||||
#include "database/DatabaseCommand_RenamePlaylist.h"
|
||||
#include "playlist/PlaylistUpdaterInterface.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Closure.h"
|
||||
|
||||
|
@ -25,10 +25,11 @@
|
||||
#include "infobar/InfoBar.h"
|
||||
|
||||
#include "playlist/FlexibleView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/FlexibleTreeView.h"
|
||||
#include "playlist/TreeModel.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableProxyModel.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "playlist/ColumnView.h"
|
||||
@ -133,13 +134,8 @@ ViewManager::createPageForPlaylist( const playlist_ptr& playlist )
|
||||
FlexibleView* view = new FlexibleView();
|
||||
PlaylistModel* model = new PlaylistModel();
|
||||
|
||||
PlaylistView* pv = new PlaylistView();
|
||||
view->setDetailedView( pv );
|
||||
view->setPixmap( pv->pixmap() );
|
||||
|
||||
// We need to set the model on the view before loading the playlist, so spinners & co are connected
|
||||
view->setPlaylistModel( model );
|
||||
pv->setPlaylistModel( model );
|
||||
view->view()->trackView()->setPlayableModel( model );
|
||||
|
||||
model->loadPlaylist( playlist );
|
||||
playlist->resolve();
|
||||
@ -154,14 +150,10 @@ ViewManager::createPageForList( const QString& title, const QList< query_ptr >&
|
||||
FlexibleView* view = new FlexibleView();
|
||||
PlaylistModel* model = new PlaylistModel();
|
||||
|
||||
PlaylistView* pv = new PlaylistView();
|
||||
view->setDetailedView( pv );
|
||||
view->setPixmap( pv->pixmap() );
|
||||
view->setTemporaryPage( true );
|
||||
|
||||
// We need to set the model on the view before loading the playlist, so spinners & co are connected
|
||||
view->setPlaylistModel( model );
|
||||
pv->setPlaylistModel( model );
|
||||
view->view()->trackView()->setPlayableModel( model );
|
||||
|
||||
model->setTitle( title );
|
||||
model->appendQueries( queries );
|
||||
@ -174,10 +166,15 @@ playlist_ptr
|
||||
ViewManager::playlistForPage( ViewPage* page ) const
|
||||
{
|
||||
playlist_ptr p;
|
||||
if ( dynamic_cast< PlaylistView* >( page ) && dynamic_cast< PlaylistView* >( page )->playlistModel() &&
|
||||
!dynamic_cast< PlaylistView* >( page )->playlistModel()->playlist().isNull() )
|
||||
|
||||
FlexibleView* fv = dynamic_cast< FlexibleView* >( page );
|
||||
if ( fv && fv->view()->trackView()->model() )
|
||||
{
|
||||
p = dynamic_cast< PlaylistView* >( page )->playlistModel()->playlist();
|
||||
PlaylistModel* m = dynamic_cast< PlaylistModel* >( fv->view()->trackView()->model() );
|
||||
if ( m && m->playlist() )
|
||||
{
|
||||
p = m->playlist();
|
||||
}
|
||||
}
|
||||
else if ( dynamic_cast< DynamicWidget* >( page ) )
|
||||
p = dynamic_cast< DynamicWidget* >( page )->playlist();
|
||||
|
@ -46,7 +46,6 @@ class CollectionModel;
|
||||
class FlexibleView;
|
||||
class FlexibleTreeView;
|
||||
class PlaylistModel;
|
||||
class PlaylistView;
|
||||
class TrackProxyModel;
|
||||
class TrackModel;
|
||||
class TreeProxyModel;
|
||||
@ -101,7 +100,7 @@ public:
|
||||
Tomahawk::ViewPage* pageForPlaylist( const Tomahawk::playlist_ptr& pl ) const;
|
||||
Tomahawk::ViewPage* pageForDynPlaylist( const Tomahawk::dynplaylist_ptr& pl ) const;
|
||||
|
||||
/// Get a playlist (or dynamic playlist ) from a ViewPage* if the page is PlaylistView or DynamicWidget.
|
||||
/// Get a playlist (or dynamic playlist ) from a ViewPage* if the page is FlexibleView or DynamicWidget.
|
||||
/// Lives here but used by SourcesModel
|
||||
Tomahawk::playlist_ptr playlistForPage( Tomahawk::ViewPage* ) const;
|
||||
|
||||
|
@ -23,14 +23,11 @@
|
||||
#include "PlaylistInterface.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
class QStackedWidget;
|
||||
|
||||
class CaptionLabel;
|
||||
class GridView;
|
||||
class TrackView;
|
||||
class PlayableModel;
|
||||
class PlaylistModel;
|
||||
class FilterHeader;
|
||||
|
||||
class DLLEXPORT ContextView : public QWidget, public Tomahawk::ViewPage
|
||||
{
|
||||
|
@ -1,141 +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 "PlaylistView.h"
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include "ViewManager.h"
|
||||
#include "PlaylistUpdaterInterface.h"
|
||||
#include "Source.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/DpiScaler.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
PlaylistView::PlaylistView( QWidget* parent )
|
||||
: TrackView( parent )
|
||||
, m_model( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PlaylistView::~PlaylistView()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::setModel( QAbstractItemModel* model )
|
||||
{
|
||||
Q_UNUSED( model );
|
||||
qDebug() << "Explicitly use setPlaylistModel instead";
|
||||
Q_ASSERT( false );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::setPlaylistModel( PlaylistModel* model )
|
||||
{
|
||||
m_model = model;
|
||||
|
||||
TrackView::setPlayableModel( m_model );
|
||||
setColumnHidden( PlayableModel::Age, true ); // Hide age column per default
|
||||
setColumnHidden( PlayableModel::Filesize, true ); // Hide filesize column per default
|
||||
setColumnHidden( PlayableModel::Composer, true ); // Hide composer column per default
|
||||
|
||||
connect( m_model, SIGNAL( playlistDeleted() ), SLOT( onDeleted() ) );
|
||||
connect( m_model, SIGNAL( playlistChanged() ), SLOT( onChanged() ) );
|
||||
|
||||
emit modelChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::keyPressEvent( QKeyEvent* event )
|
||||
{
|
||||
TrackView::keyPressEvent( event );
|
||||
}
|
||||
|
||||
|
||||
QList<PlaylistUpdaterInterface*>
|
||||
PlaylistView::updaters() const
|
||||
{
|
||||
if ( !m_model->playlist().isNull() )
|
||||
return m_model->playlist()->updaters();
|
||||
|
||||
return QList<PlaylistUpdaterInterface*>();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::onDeleted()
|
||||
{
|
||||
emit destroyed( widget() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::onChanged()
|
||||
{
|
||||
if ( m_model )
|
||||
{
|
||||
if ( m_model->isReadOnly() )
|
||||
setEmptyTip( tr( "This playlist is currently empty." ) );
|
||||
else
|
||||
setEmptyTip( tr( "This playlist is currently empty. Add some tracks to it and enjoy the music!" ) );
|
||||
|
||||
setGuid( proxyModel()->guid() );
|
||||
|
||||
if ( !m_model->playlist().isNull() && ViewManager::instance()->currentPage() == this )
|
||||
emit nameChanged( m_model->playlist()->title() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PlaylistView::isTemporaryPage() const
|
||||
{
|
||||
return ( m_model && m_model->isTemporary() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistView::onMenuTriggered( int action )
|
||||
{
|
||||
TrackView::onMenuTriggered( action );
|
||||
|
||||
switch ( action )
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QPixmap
|
||||
PlaylistView::pixmap() const
|
||||
{
|
||||
return TomahawkUtils::defaultPixmap( TomahawkUtils::Playlist,
|
||||
TomahawkUtils::Original,
|
||||
TomahawkUtils::DpiScaler::scaled( this, 80, 80 ) );
|
||||
}
|
@ -1,66 +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 PLAYLISTVIEW_H
|
||||
#define PLAYLISTVIEW_H
|
||||
|
||||
#include "playlist/PlayableProxyModel.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "TrackView.h"
|
||||
#include "ViewPage.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
class DLLEXPORT PlaylistView : public TrackView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PlaylistView( QWidget* parent = 0 );
|
||||
virtual ~PlaylistView();
|
||||
|
||||
PlaylistModel* playlistModel() const { return m_model; }
|
||||
virtual void setPlaylistModel( PlaylistModel* model );
|
||||
virtual void setModel( QAbstractItemModel* model );
|
||||
|
||||
virtual QList<Tomahawk::PlaylistUpdaterInterface*> updaters() const;
|
||||
|
||||
virtual QPixmap pixmap() const;
|
||||
virtual bool isTemporaryPage() const;
|
||||
|
||||
signals:
|
||||
void nameChanged( const QString& title );
|
||||
void destroyed( QWidget* widget );
|
||||
void modelChanged();
|
||||
|
||||
protected:
|
||||
void keyPressEvent( QKeyEvent* event );
|
||||
|
||||
private slots:
|
||||
void onMenuTriggered( int action );
|
||||
|
||||
void onDeleted();
|
||||
void onChanged();
|
||||
|
||||
private:
|
||||
PlaylistModel* m_model;
|
||||
QString m_customTitle;
|
||||
QString m_customDescripton;
|
||||
};
|
||||
|
||||
#endif // PLAYLISTVIEW_H
|
@ -19,6 +19,7 @@
|
||||
#include "QueueView.h"
|
||||
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/QueueProxyModel.h"
|
||||
#include "playlist/TrackItemDelegate.h"
|
||||
|
@ -48,7 +48,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="PlaylistView" name="queue"/>
|
||||
<widget class="TrackView" name="queue"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
@ -74,9 +74,9 @@
|
||||
<header location="global">widgets/HeaderLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>PlaylistView</class>
|
||||
<class>TrackView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header location="global">playlist/PlaylistView.h</header>
|
||||
<header location="global">playlist/TrackView.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "Source.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
#include "PlaylistView.h"
|
||||
#include "TrackView.h"
|
||||
#include "PlayableModel.h"
|
||||
#include "PlayableItem.h"
|
||||
#include "PlayableProxyModel.h"
|
||||
|
@ -43,7 +43,7 @@ using namespace Tomahawk;
|
||||
|
||||
|
||||
DynamicView::DynamicView( QWidget* parent )
|
||||
: PlaylistView( parent )
|
||||
: TrackView( parent )
|
||||
, m_onDemand( false )
|
||||
, m_checkOnCollapse( false )
|
||||
, m_working( false )
|
||||
@ -77,7 +77,7 @@ void
|
||||
DynamicView::setDynamicModel( DynamicModel* model )
|
||||
{
|
||||
m_model = model;
|
||||
PlaylistView::setPlaylistModel( m_model );
|
||||
TrackView::setPlayableModel( m_model );
|
||||
setAcceptDrops( false );
|
||||
|
||||
connect( m_model, SIGNAL( itemCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef DYNAMIC_VIEW_H
|
||||
#define DYNAMIC_VIEW_H
|
||||
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include <QTimer>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QTimeLine>
|
||||
@ -34,7 +34,7 @@ namespace Tomahawk
|
||||
class DynamicModel;
|
||||
|
||||
|
||||
class DynamicView : public PlaylistView
|
||||
class DynamicView : public TrackView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -35,7 +35,6 @@ class QHBoxLayout;
|
||||
class QPushButton;
|
||||
class QComboBox;
|
||||
class PlaylistModel;
|
||||
class PlaylistView;
|
||||
class AnimatedSplitter;
|
||||
class QLabel;
|
||||
class ReadOrWriteWidget;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "MetaPlaylistInterface.h"
|
||||
|
||||
#include "playlist/RecentlyPlayedModel.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "utils/TomahawkStyle.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
|
@ -52,7 +52,7 @@ NewPlaylistWidget::NewPlaylistWidget( QWidget* parent )
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( cancel() ) );
|
||||
|
||||
m_suggestionsModel = new PlaylistModel( ui->suggestionsView );
|
||||
ui->suggestionsView->setPlaylistModel( m_suggestionsModel );
|
||||
ui->suggestionsView->setPlayableModel( m_suggestionsModel );
|
||||
ui->suggestionsView->overlay()->setEnabled( false );
|
||||
|
||||
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( updateSuggestions() ) );
|
||||
@ -123,7 +123,7 @@ NewPlaylistWidget::suggestionsFound()
|
||||
|
||||
delete m_suggestionsModel;
|
||||
m_suggestionsModel = new PlaylistModel( ui->suggestionsView );
|
||||
ui->suggestionsView->setPlaylistModel( m_suggestionsModel );
|
||||
ui->suggestionsView->setPlayableModel( m_suggestionsModel );
|
||||
|
||||
m_suggestionsModel->appendQueries( m_queries );
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistView" name="suggestionsView"/>
|
||||
<widget class="TrackView" name="suggestionsView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
@ -75,9 +75,9 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PlaylistView</class>
|
||||
<class>TrackView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>playlist/PlaylistView.h</header>
|
||||
<header>playlist/TrackView.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "ViewManager.h"
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
@ -141,7 +142,7 @@ SearchWidget::SearchWidget( const QString& search, QWidget* parent )
|
||||
ContextView* topHitsFullView = new ContextView( m_stackedWidget );
|
||||
topHitsFullView->setCaption( tr( "Songs" ) );
|
||||
topHitsFullView->setShowCloseButton( true );
|
||||
topHitsFullView->setPlayableModel( m_resultsModel );
|
||||
topHitsFullView->trackView()->setPlayableModel( m_resultsModel );
|
||||
m_stackedWidget->addWidget( topHitsFullView );
|
||||
|
||||
connect( topHitsFullView, SIGNAL( closeClicked() ), SLOT( onTopHitsMoreClosed() ) );
|
||||
|
@ -58,7 +58,7 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par
|
||||
m_tracksModel->setMode( Mixed );
|
||||
|
||||
// We need to set the model on the view before loading the playlist, so spinners & co are connected
|
||||
ui->albumView->setPlayableModel( m_tracksModel );
|
||||
ui->albumView->trackView()->setPlayableModel( m_tracksModel );
|
||||
ui->albumView->setCaption( tr( "Album Details" ) );
|
||||
|
||||
ui->topHits->setStyleSheet( QString( "QListView { background-color: #f9f9f9; }" ) );
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/TreeProxyModel.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "database/DatabaseCommand_AllTracks.h"
|
||||
#include "database/DatabaseCommand_AllAlbums.h"
|
||||
#include "Source.h"
|
||||
@ -181,7 +182,7 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget*
|
||||
ContextView* topHitsFullView = new ContextView( m_stackedWidget );
|
||||
topHitsFullView->setCaption( tr( "Songs" ) );
|
||||
topHitsFullView->setShowCloseButton( true );
|
||||
topHitsFullView->setPlayableModel( m_topHitsModel );
|
||||
topHitsFullView->trackView()->setPlayableModel( m_topHitsModel );
|
||||
m_stackedWidget->addWidget( topHitsFullView );
|
||||
|
||||
connect( topHitsFullView, SIGNAL( closeClicked() ), SLOT( onPageClosed() ) );
|
||||
|
@ -90,7 +90,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistView" name="historyView"/>
|
||||
<widget class="TrackView" name="historyView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
@ -112,9 +112,9 @@
|
||||
<header>playlist/GridView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>PlaylistView</class>
|
||||
<class>TrackView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>playlist/PlaylistView.h</header>
|
||||
<header>playlist/TrackView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TrackView</class>
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "ViewManager.h"
|
||||
#include "SourceList.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "widgets/BasicHeader.h"
|
||||
@ -47,7 +48,7 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par
|
||||
m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Original, QSize( 48, 48 ) );
|
||||
|
||||
m_relatedTracksModel = new PlayableModel( ui->trackView );
|
||||
ui->trackView->setPlayableModel( m_relatedTracksModel );
|
||||
ui->trackView->trackView()->setPlayableModel( m_relatedTracksModel );
|
||||
ui->trackView->setCaption( tr( "Similar Tracks" ) );
|
||||
ui->trackView->setEmptyTip( tr( "Sorry, but we could not find similar tracks for this song!" ) );
|
||||
|
||||
|
@ -29,7 +29,9 @@
|
||||
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "database/Database.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableModel.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Logger.h"
|
||||
|
@ -55,7 +55,9 @@
|
||||
#include "thirdparty/Qocoa/qsearchfield.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/PlayableProxyModel.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/QueueView.h"
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "DropJob.h"
|
||||
#include "items/PlaylistItems.h"
|
||||
#include "playlist/TreeView.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/dynamic/widgets/DynamicWidget.h"
|
||||
#include "utils/Closure.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "ViewManager.h"
|
||||
|
||||
#include "playlist/FlexibleView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/TopLovedTracksModel.h"
|
||||
#include "playlist/TrackItemDelegate.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2012, Leo Franchi <lfranchi@kde.org>
|
||||
* Copyright 2010-2013, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@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
|
||||
@ -27,7 +27,8 @@
|
||||
#include "Source.h"
|
||||
#include "audio/AudioEngine.h"
|
||||
#include "playlist/dynamic/GeneratorInterface.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/PlayableProxyModel.h"
|
||||
#include "ViewManager.h"
|
||||
|
@ -34,8 +34,9 @@
|
||||
#include "LovedTracksItem.h"
|
||||
#include "Source.h"
|
||||
#include "SourceList.h"
|
||||
#include "playlist/ContextView.h"
|
||||
#include "playlist/FlexibleView.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/TrackView.h"
|
||||
#include "playlist/RecentlyAddedModel.h"
|
||||
#include "playlist/RecentlyPlayedModel.h"
|
||||
#include "sip/PeerInfo.h"
|
||||
|
@ -48,7 +48,7 @@
|
||||
<customwidget>
|
||||
<class>GridView</class>
|
||||
<extends>QListView</extends>
|
||||
<header location="global">playlist/GridView.h</header>
|
||||
<header>playlist/GridView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TreeView</class>
|
||||
@ -56,9 +56,9 @@
|
||||
<header>playlist/TreeView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>PlaylistView</class>
|
||||
<class>TrackView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header>playlist/PlaylistView.h</header>
|
||||
<header>playlist/TrackView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Tomahawk::Breadcrumb</class>
|
||||
|
@ -74,7 +74,7 @@ DashboardWidget::DashboardWidget( QWidget* parent )
|
||||
|
||||
{
|
||||
m_tracksModel = new RecentlyPlayedModel( ui->trackView->trackView(), HISTORY_TRACK_ITEMS );
|
||||
ui->trackView->setPlayableModel( m_tracksModel );
|
||||
ui->trackView->trackView()->setPlayableModel( m_tracksModel );
|
||||
ui->trackView->setCaption( tr( "Recently Played Tracks" ) );
|
||||
ui->trackView->trackView()->setUniformRowHeights( false );
|
||||
ui->trackView->trackView()->setIndentation( 0 );
|
||||
|
@ -41,7 +41,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistView" name="trendingTracksView">
|
||||
<widget class="TrackView" name="trendingTracksView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -152,7 +152,7 @@
|
||||
<widget class="Tomahawk::Breadcrumb" name="breadCrumbLeft" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="PlaylistView" name="tracksViewLeft">
|
||||
<widget class="TrackView" name="tracksViewLeft">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -189,9 +189,9 @@
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PlaylistView</class>
|
||||
<class>TrackView</class>
|
||||
<extends>QTreeView</extends>
|
||||
<header location="global">playlist/PlaylistView.h</header>
|
||||
<header location="global">playlist/TrackView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>GridView</class>
|
||||
|
Loading…
x
Reference in New Issue
Block a user