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