1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 23:26:40 +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

View File

@@ -23,13 +23,6 @@ set( libGuiSources
ViewManager.cpp ViewManager.cpp
LatchManager.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/JobStatusView.cpp
jobview/JobStatusModel.cpp jobview/JobStatusModel.cpp
jobview/JobStatusDelegate.cpp jobview/JobStatusDelegate.cpp
@@ -403,7 +396,6 @@ set( libUI ${libUI}
widgets/infowidgets/TrackInfoWidget.ui widgets/infowidgets/TrackInfoWidget.ui
playlist/QueueView.ui playlist/QueueView.ui
filemetadata/MetadataEditor.ui filemetadata/MetadataEditor.ui
context/ContextWidget.ui
infobar/InfoBar.ui infobar/InfoBar.ui
accounts/AccountFactoryWrapper.ui accounts/AccountFactoryWrapper.ui
accounts/spotify/SpotifyAccountConfig.ui accounts/spotify/SpotifyAccountConfig.ui

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === 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> * Copyright 2014, Teo Mrnjavac <teo@kde.org>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
@@ -20,7 +20,6 @@
#include "ColumnView.h" #include "ColumnView.h"
#include "audio/AudioEngine.h" #include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "utils/AnimatedSpinner.h" #include "utils/AnimatedSpinner.h"
#include "widgets/OverlayWidget.h" #include "widgets/OverlayWidget.h"
@@ -57,7 +56,6 @@ ColumnView::ColumnView( QWidget* parent )
, m_delegate( 0 ) , m_delegate( 0 )
, m_loadingSpinner( new LoadingSpinner( this ) ) , m_loadingSpinner( new LoadingSpinner( this ) )
, m_previewWidget( new ColumnViewPreviewWidget( this ) ) , m_previewWidget( new ColumnViewPreviewWidget( this ) )
, m_updateContextView( true )
, m_contextMenu( new ContextMenu( this ) ) , m_contextMenu( new ContextMenu( this ) )
, m_scrollDelta( 0 ) , m_scrollDelta( 0 )
{ {
@@ -221,22 +219,6 @@ void
ColumnView::currentChanged( const QModelIndex& current, const QModelIndex& previous ) ColumnView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{ {
QColumnView::currentChanged( current, 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() );
}*/
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === /* === 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> * Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
* *
* Tomahawk is free software: you can redistribute it and/or modify * Tomahawk is free software: you can redistribute it and/or modify
@@ -20,7 +20,6 @@
#include "TreeView.h" #include "TreeView.h"
#include "audio/AudioEngine.h" #include "audio/AudioEngine.h"
#include "context/ContextWidget.h"
#include "utils/AnimatedSpinner.h" #include "utils/AnimatedSpinner.h"
#include "widgets/OverlayWidget.h" #include "widgets/OverlayWidget.h"
@@ -55,7 +54,6 @@ TreeView::TreeView( QWidget* parent )
, m_proxyModel( 0 ) , m_proxyModel( 0 )
, m_delegate( 0 ) , m_delegate( 0 )
, m_loadingSpinner( new LoadingSpinner( this ) ) , m_loadingSpinner( new LoadingSpinner( this ) )
, m_updateContextView( true )
, m_contextMenu( new ContextMenu( this ) ) , m_contextMenu( new ContextMenu( this ) )
{ {
setFrameShape( QFrame::NoFrame ); setFrameShape( QFrame::NoFrame );
@@ -209,22 +207,6 @@ void
TreeView::currentChanged( const QModelIndex& current, const QModelIndex& previous ) TreeView::currentChanged( const QModelIndex& current, const QModelIndex& previous )
{ {
QTreeView::currentChanged( current, 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() );
}*/
} }

View File

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