mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
* Got rid of TreeHeader. Handled by ViewHeader now.
This commit is contained in:
parent
59fb1fefa0
commit
d97b83557b
@ -48,7 +48,6 @@ set( libGuiSources
|
||||
playlist/TreeModel.cpp
|
||||
playlist/TreeProxyModel.cpp
|
||||
playlist/TreeProxyModelPlaylistInterface.cpp
|
||||
playlist/TreeHeader.cpp
|
||||
playlist/TreeItemDelegate.cpp
|
||||
playlist/PlaylistModel.cpp
|
||||
playlist/PlaylistView.cpp
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "ContextMenu.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "TreeHeader.h"
|
||||
#include "ViewHeader.h"
|
||||
#include "TreeItemDelegate.h"
|
||||
#include "TreeModel.h"
|
||||
#include "PlayableItem.h"
|
||||
@ -47,7 +47,7 @@ using namespace Tomahawk;
|
||||
|
||||
ArtistView::ArtistView( QWidget* parent )
|
||||
: QTreeView( parent )
|
||||
, m_header( new TreeHeader( this ) )
|
||||
, m_header( new ViewHeader( this ) )
|
||||
, m_overlay( new OverlayWidget( this ) )
|
||||
, m_model( 0 )
|
||||
, m_proxyModel( 0 )
|
||||
@ -145,6 +145,7 @@ ArtistView::setTreeModel( TreeModel* model )
|
||||
|
||||
guid(); // this will set the guid on the header
|
||||
|
||||
m_header->setDefaultColumnWeights( model->columnWeights() );
|
||||
if ( model->style() == PlayableModel::Large )
|
||||
{
|
||||
setHeaderHidden( true );
|
||||
|
@ -36,7 +36,7 @@ namespace Tomahawk
|
||||
class ContextMenu;
|
||||
};
|
||||
|
||||
class TreeHeader;
|
||||
class ViewHeader;
|
||||
class AnimatedSpinner;
|
||||
class OverlayWidget;
|
||||
class TreeModel;
|
||||
@ -106,7 +106,7 @@ private slots:
|
||||
void onMenuTriggered( int action );
|
||||
|
||||
private:
|
||||
TreeHeader* m_header;
|
||||
ViewHeader* m_header;
|
||||
OverlayWidget* m_overlay;
|
||||
TreeModel* m_model;
|
||||
TreeProxyModel* m_proxyModel;
|
||||
|
@ -1,39 +0,0 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, 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
|
||||
* 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 "TreeHeader.h"
|
||||
|
||||
#include "playlist/ArtistView.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Source.h"
|
||||
|
||||
|
||||
TreeHeader::TreeHeader( ArtistView* parent )
|
||||
: ViewHeader( parent )
|
||||
, m_parent( parent )
|
||||
{
|
||||
QList< double > columnWeights;
|
||||
columnWeights << 0.42 << 0.12 << 0.07 << 0.07 << 0.07 << 0.07 << 0.07; // << 0.11;
|
||||
|
||||
setDefaultColumnWeights( columnWeights );
|
||||
}
|
||||
|
||||
|
||||
TreeHeader::~TreeHeader()
|
||||
{
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, 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
|
||||
* 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 TREEHEADER_H
|
||||
#define TREEHEADER_H
|
||||
|
||||
#include "ViewHeader.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
class ArtistView;
|
||||
|
||||
class DLLEXPORT TreeHeader : public ViewHeader
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TreeHeader( ArtistView* parent = 0 );
|
||||
~TreeHeader();
|
||||
|
||||
private:
|
||||
ArtistView* m_parent;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user