mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Removed contextual view in ViewManager.
This commit is contained in:
parent
fbf7727212
commit
08e2113451
@ -94,11 +94,11 @@ ViewManager::ViewManager( QObject* parent )
|
||||
m_inboxModel->setDescription( tr( "Listening suggestions from your friends" ) );
|
||||
m_inboxModel->setIcon( TomahawkUtils::defaultPixmap( TomahawkUtils::Inbox ) );
|
||||
|
||||
m_contextWidget = new ContextWidget();
|
||||
// m_contextWidget = new ContextWidget();
|
||||
|
||||
m_widget->layout()->addWidget( m_infobar );
|
||||
m_widget->layout()->addWidget( m_stack );
|
||||
m_widget->layout()->addWidget( m_contextWidget );
|
||||
// m_widget->layout()->addWidget( m_contextWidget );
|
||||
|
||||
m_superCollectionView = new TreeWidget();
|
||||
m_superCollectionView->view()->proxyModel()->setStyle( PlayableProxyModel::Collection );
|
||||
@ -128,7 +128,7 @@ ViewManager::~ViewManager()
|
||||
delete m_newReleasesWidget;
|
||||
delete m_recentPlaysWidget;
|
||||
delete m_inboxWidget;
|
||||
delete m_contextWidget;
|
||||
// delete m_contextWidget;
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,6 @@ class AlbumInfoWidget;
|
||||
class ArtistInfoWidget;
|
||||
class TreeWidget;
|
||||
class CollectionModel;
|
||||
class ContextWidget;
|
||||
class FlexibleView;
|
||||
class FlexibleTreeView;
|
||||
class PlaylistModel;
|
||||
@ -77,7 +76,6 @@ public:
|
||||
|
||||
QWidget* widget() const { return m_widget; }
|
||||
InfoBar* infobar() const { return m_infobar; }
|
||||
ContextWidget* context() const { return m_contextWidget; }
|
||||
|
||||
PlaylistView* queue() const { return m_queue->queue(); }
|
||||
void setQueue( QueueView* queue ) { m_queue = queue; }
|
||||
@ -183,7 +181,6 @@ private:
|
||||
|
||||
QWidget* m_widget;
|
||||
InfoBar* m_infobar;
|
||||
ContextWidget* m_contextWidget;
|
||||
QStackedWidget* m_stack;
|
||||
AnimatedSplitter* m_splitter;
|
||||
|
||||
|
@ -162,8 +162,8 @@ GridView::currentChanged( const QModelIndex& current, const QModelIndex& previou
|
||||
PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
|
||||
if ( item )
|
||||
{
|
||||
if ( !item->album().isNull() )
|
||||
ViewManager::instance()->context()->setAlbum( item->album() );
|
||||
// if ( !item->album().isNull() )
|
||||
// ViewManager::instance()->context()->setAlbum( item->album() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -349,13 +349,13 @@ TrackView::currentChanged( const QModelIndex& current, const QModelIndex& previo
|
||||
{
|
||||
QTreeView::currentChanged( current, previous );
|
||||
|
||||
if ( !m_updateContextView )
|
||||
return;
|
||||
|
||||
PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
|
||||
if ( item )
|
||||
if ( item && item->query() )
|
||||
{
|
||||
ViewManager::instance()->context()->setQuery( item->query() );
|
||||
// if ( m_updateContextView )
|
||||
// ViewManager::instance()->context()->setQuery( item->query() );
|
||||
|
||||
emit querySelected( item->query() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,7 @@ public slots:
|
||||
|
||||
signals:
|
||||
void itemActivated( const QModelIndex& index );
|
||||
void querySelected( const Tomahawk::query_ptr& query );
|
||||
void modelChanged();
|
||||
|
||||
protected:
|
||||
|
@ -213,7 +213,7 @@ TreeView::currentChanged( const QModelIndex& current, const QModelIndex& previou
|
||||
if ( !m_updateContextView )
|
||||
return;
|
||||
|
||||
PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
|
||||
/* PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
|
||||
if ( item )
|
||||
{
|
||||
if ( !item->result().isNull() )
|
||||
@ -224,7 +224,7 @@ TreeView::currentChanged( const QModelIndex& current, const QModelIndex& previou
|
||||
ViewManager::instance()->context()->setAlbum( item->album() );
|
||||
else if ( !item->query().isNull() )
|
||||
ViewManager::instance()->context()->setQuery( item->query() );
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user