1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 23:39:42 +01:00

* Removed header from ColumnView.

This commit is contained in:
Christian Muehlhaeuser 2013-06-12 07:35:10 +02:00
parent b6cfe162aa
commit b9cd71d919
2 changed files with 2 additions and 15 deletions

View File

@ -50,7 +50,6 @@ using namespace Tomahawk;
ColumnView::ColumnView( QWidget* parent )
: QColumnView( parent )
, m_header( new ViewHeader( this ) )
, m_overlay( new OverlayWidget( this ) )
, m_model( 0 )
, m_proxyModel( 0 )
@ -133,7 +132,6 @@ ColumnView::setTreeModel( TreeModel* model )
guid(); // this will set the guid on the header
m_header->setDefaultColumnWeights( m_proxyModel->columnWeights() );
if ( m_proxyModel->style() == PlayableProxyModel::Large )
{
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
@ -154,7 +152,7 @@ ColumnView::setTreeModel( TreeModel* model )
sortByColumn( PlayableModel::Artist, Qt::AscendingOrder );*/
QList< int > widths;
widths << 320;
widths << m_previewWidget->minimumSize().width() + 32;
setColumnWidths( widths );
}
@ -273,15 +271,6 @@ void
ColumnView::resizeEvent( QResizeEvent* event )
{
QColumnView::resizeEvent( event );
m_header->checkState();
if ( !model() )
return;
if ( model()->columnCount( QModelIndex() ) == 1 )
{
m_header->resizeSection( 0, event->size().width() );
}
}
@ -450,7 +439,6 @@ ColumnView::guid() const
if ( m_guid.isEmpty() )
{
m_guid = QString( "columnview/%1" ).arg( m_model->columnCount( QModelIndex() ) );
m_header->setGuid( m_guid );
}
return m_guid;
@ -467,7 +455,7 @@ ColumnView::onUpdatePreviewWidget( const QModelIndex& index )
QList< int > finalWidths;
foreach ( int w, widths )
{
finalWidths << qMax( 320, w );
finalWidths << qMax( m_previewWidget->minimumSize().width() + 32, w );
}
setColumnWidths( finalWidths );

View File

@ -98,7 +98,6 @@ private slots:
void onMenuTriggered( int action );
private:
ViewHeader* m_header;
OverlayWidget* m_overlay;
TreeModel* m_model;
TreeProxyModel* m_proxyModel;