mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Got rid of TreeHeader. Handled by ViewHeader now.
This commit is contained in:
@@ -48,7 +48,6 @@ set( libGuiSources
|
|||||||
playlist/TreeModel.cpp
|
playlist/TreeModel.cpp
|
||||||
playlist/TreeProxyModel.cpp
|
playlist/TreeProxyModel.cpp
|
||||||
playlist/TreeProxyModelPlaylistInterface.cpp
|
playlist/TreeProxyModelPlaylistInterface.cpp
|
||||||
playlist/TreeHeader.cpp
|
|
||||||
playlist/TreeItemDelegate.cpp
|
playlist/TreeItemDelegate.cpp
|
||||||
playlist/PlaylistModel.cpp
|
playlist/PlaylistModel.cpp
|
||||||
playlist/PlaylistView.cpp
|
playlist/PlaylistView.cpp
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "ContextMenu.h"
|
#include "ContextMenu.h"
|
||||||
#include "TomahawkSettings.h"
|
#include "TomahawkSettings.h"
|
||||||
#include "TreeHeader.h"
|
#include "ViewHeader.h"
|
||||||
#include "TreeItemDelegate.h"
|
#include "TreeItemDelegate.h"
|
||||||
#include "TreeModel.h"
|
#include "TreeModel.h"
|
||||||
#include "PlayableItem.h"
|
#include "PlayableItem.h"
|
||||||
@@ -47,7 +47,7 @@ using namespace Tomahawk;
|
|||||||
|
|
||||||
ArtistView::ArtistView( QWidget* parent )
|
ArtistView::ArtistView( QWidget* parent )
|
||||||
: QTreeView( parent )
|
: QTreeView( parent )
|
||||||
, m_header( new TreeHeader( this ) )
|
, m_header( new ViewHeader( this ) )
|
||||||
, m_overlay( new OverlayWidget( this ) )
|
, m_overlay( new OverlayWidget( this ) )
|
||||||
, m_model( 0 )
|
, m_model( 0 )
|
||||||
, m_proxyModel( 0 )
|
, m_proxyModel( 0 )
|
||||||
@@ -145,6 +145,7 @@ ArtistView::setTreeModel( TreeModel* model )
|
|||||||
|
|
||||||
guid(); // this will set the guid on the header
|
guid(); // this will set the guid on the header
|
||||||
|
|
||||||
|
m_header->setDefaultColumnWeights( model->columnWeights() );
|
||||||
if ( model->style() == PlayableModel::Large )
|
if ( model->style() == PlayableModel::Large )
|
||||||
{
|
{
|
||||||
setHeaderHidden( true );
|
setHeaderHidden( true );
|
||||||
|
@@ -36,7 +36,7 @@ namespace Tomahawk
|
|||||||
class ContextMenu;
|
class ContextMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TreeHeader;
|
class ViewHeader;
|
||||||
class AnimatedSpinner;
|
class AnimatedSpinner;
|
||||||
class OverlayWidget;
|
class OverlayWidget;
|
||||||
class TreeModel;
|
class TreeModel;
|
||||||
@@ -106,7 +106,7 @@ private slots:
|
|||||||
void onMenuTriggered( int action );
|
void onMenuTriggered( int action );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TreeHeader* m_header;
|
ViewHeader* m_header;
|
||||||
OverlayWidget* m_overlay;
|
OverlayWidget* m_overlay;
|
||||||
TreeModel* m_model;
|
TreeModel* m_model;
|
||||||
TreeProxyModel* m_proxyModel;
|
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
|
|
Reference in New Issue
Block a user