1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 04:51:53 +02:00

* Remove remaining context-widget stuff.

This commit is contained in:
Christian Muehlhaeuser 2014-08-23 12:14:35 +02:00
parent 9f499cf029
commit 6caace66ca
10 changed files with 3 additions and 77 deletions

@ -23,13 +23,6 @@ set( libGuiSources
ViewManager.cpp
LatchManager.cpp
context/ContextPage.cpp
context/ContextWidget.cpp
context/pages/TopTracksContext.cpp
context/pages/RelatedArtistsContext.cpp
context/pages/WikipediaContext.cpp
context/pages/WebContext.cpp
jobview/JobStatusView.cpp
jobview/JobStatusModel.cpp
jobview/JobStatusDelegate.cpp
@ -403,7 +396,6 @@ set( libUI ${libUI}
widgets/infowidgets/TrackInfoWidget.ui
playlist/QueueView.ui
filemetadata/MetadataEditor.ui
context/ContextWidget.ui
infobar/InfoBar.ui
accounts/AccountFactoryWrapper.ui
accounts/spotify/SpotifyAccountConfig.ui

@ -22,7 +22,6 @@
#include "ViewManager.h"
#include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "infobar/InfoBar.h"
#include "playlist/FlexibleView.h"
@ -95,11 +94,8 @@ 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_widget->layout()->addWidget( m_infobar );
m_widget->layout()->addWidget( m_stack );
// m_widget->layout()->addWidget( m_contextWidget );
m_superCollectionView = new TreeWidget();
m_superCollectionView->view()->proxyModel()->setStyle( PlayableProxyModel::Collection );
@ -129,7 +125,6 @@ ViewManager::~ViewManager()
delete m_newReleasesWidget;
delete m_recentPlaysWidget;
delete m_inboxWidget;
// delete m_contextWidget;
delete m_widget;
}

@ -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 2012, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@ -29,7 +29,6 @@ class QueryLabel;
class QCheckBox;
class QTimeLine;
class QSearchField;
class ContextWidget;
namespace Ui
{

@ -1,6 +1,6 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2013, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2014, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2014, Teo Mrnjavac <teo@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@ -20,7 +20,6 @@
#include "ColumnView.h"
#include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "utils/AnimatedSpinner.h"
#include "widgets/OverlayWidget.h"
@ -57,7 +56,6 @@ ColumnView::ColumnView( QWidget* parent )
, m_delegate( 0 )
, m_loadingSpinner( new LoadingSpinner( this ) )
, m_previewWidget( new ColumnViewPreviewWidget( this ) )
, m_updateContextView( true )
, m_contextMenu( new ContextMenu( this ) )
, m_scrollDelta( 0 )
{
@ -221,22 +219,6 @@ void
ColumnView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{
QColumnView::currentChanged( current, previous );
if ( !m_updateContextView )
return;
/* PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
if ( item )
{
if ( !item->result().isNull() )
ViewManager::instance()->context()->setQuery( item->result()->toQuery() );
else if ( !item->artist().isNull() )
ViewManager::instance()->context()->setArtist( item->artist() );
else if ( !item->album().isNull() )
ViewManager::instance()->context()->setAlbum( item->album() );
else if ( !item->query().isNull() )
ViewManager::instance()->context()->setQuery( item->query() );
}*/
}

@ -69,9 +69,6 @@ public:
virtual bool jumpToCurrentTrack();
bool updatesContextView() const { return m_updateContextView; }
void setUpdatesContextView( bool b ) { m_updateContextView = b; }
public slots:
void onItemActivated( const QModelIndex& index );
@ -110,8 +107,6 @@ private:
AnimatedSpinner* m_loadingSpinner;
ColumnViewPreviewWidget* m_previewWidget;
bool m_updateContextView;
QModelIndex m_contextMenuIndex;
Tomahawk::ContextMenu* m_contextMenu;

@ -20,7 +20,6 @@
#include "GridView.h"
#include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "TomahawkSettings.h"
#include "Artist.h"
#include "Source.h"

@ -20,7 +20,6 @@
#include "TrackView.h"
#include "ViewHeader.h"
#include "ViewManager.h"
#include "PlayableModel.h"
#include "PlayableProxyModel.h"
#include "PlayableItem.h"
@ -28,7 +27,6 @@
#include "Source.h"
#include "TomahawkSettings.h"
#include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "widgets/OverlayWidget.h"
#include "utils/TomahawkUtilsGui.h"
#include "utils/Closure.h"
@ -61,7 +59,6 @@ TrackView::TrackView( QWidget* parent )
, m_loadingSpinner( new LoadingSpinner( this ) )
, m_resizing( false )
, m_dragging( false )
, m_updateContextView( true )
, m_alternatingRowColors( false )
, m_autoExpanding( true )
, m_contextMenu( new ContextMenu( this ) )
@ -360,9 +357,6 @@ TrackView::currentChanged( const QModelIndex& current, const QModelIndex& previo
PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
if ( item && item->query() )
{
// if ( m_updateContextView )
// ViewManager::instance()->context()->setQuery( item->query() );
emit querySelected( item->query() );
}
}
@ -441,7 +435,6 @@ TrackView::keyPressEvent( QKeyEvent* event )
void
TrackView::onItemResized( const QModelIndex& index )
{
tDebug() << Q_FUNC_INFO;
m_delegate->updateRowSize( index );
}
@ -461,8 +454,6 @@ TrackView::resizeEvent( QResizeEvent* event )
int sortSection = m_header->sortIndicatorSection();
Qt::SortOrder sortOrder = m_header->sortIndicatorOrder();
// tDebug() << Q_FUNC_INFO << width();
if ( m_header->checkState() && sortSection >= 0 )
{
// restoreState keeps overwriting our previous sort-order

@ -78,9 +78,6 @@ public:
QModelIndex contextMenuIndex() const { return m_contextMenuIndex; }
void setContextMenuIndex( const QModelIndex& idx ) { m_contextMenuIndex = idx; }
bool updatesContextView() const { return m_updateContextView; }
void setUpdatesContextView( bool b ) { m_updateContextView = b; }
bool autoResize() const { return m_autoResize; }
void setAutoResize( bool b );
@ -157,7 +154,6 @@ private:
bool m_dragging;
QRect m_dropRect;
bool m_updateContextView;
bool m_autoResize;
bool m_alternatingRowColors;
bool m_autoExpanding;

@ -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 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@ -20,7 +20,6 @@
#include "TreeView.h"
#include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "utils/AnimatedSpinner.h"
#include "widgets/OverlayWidget.h"
@ -55,7 +54,6 @@ TreeView::TreeView( QWidget* parent )
, m_proxyModel( 0 )
, m_delegate( 0 )
, m_loadingSpinner( new LoadingSpinner( this ) )
, m_updateContextView( true )
, m_contextMenu( new ContextMenu( this ) )
{
setFrameShape( QFrame::NoFrame );
@ -209,22 +207,6 @@ void
TreeView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{
QTreeView::currentChanged( current, previous );
if ( !m_updateContextView )
return;
/* PlayableItem* item = m_model->itemFromIndex( m_proxyModel->mapToSource( current ) );
if ( item )
{
if ( !item->result().isNull() )
ViewManager::instance()->context()->setQuery( item->result()->toQuery() );
else if ( !item->artist().isNull() )
ViewManager::instance()->context()->setArtist( item->artist() );
else if ( !item->album().isNull() )
ViewManager::instance()->context()->setAlbum( item->album() );
else if ( !item->query().isNull() )
ViewManager::instance()->context()->setQuery( item->query() );
}*/
}

@ -66,9 +66,6 @@ public:
virtual bool jumpToCurrentTrack();
bool updatesContextView() const { return m_updateContextView; }
void setUpdatesContextView( bool b ) { m_updateContextView = b; }
public slots:
void onItemActivated( const QModelIndex& index );
@ -102,8 +99,6 @@ private:
TreeItemDelegate* m_delegate;
AnimatedSpinner* m_loadingSpinner;
bool m_updateContextView;
QModelIndex m_contextMenuIndex;
Tomahawk::ContextMenu* m_contextMenu;