mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Simplify new releases ui
This commit is contained in:
@@ -64,11 +64,7 @@ NewReleasesWidget::NewReleasesWidget( QWidget* parent )
|
|||||||
ui->albumsView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
ui->albumsView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
|
|
||||||
TomahawkUtils::unmarginLayout( layout() );
|
TomahawkUtils::unmarginLayout( layout() );
|
||||||
TomahawkUtils::unmarginLayout( ui->stackLeft->layout() );
|
|
||||||
TomahawkUtils::unmarginLayout( ui->horizontalLayout->layout() );
|
|
||||||
TomahawkUtils::unmarginLayout( ui->horizontalLayout_2->layout() );
|
|
||||||
TomahawkUtils::unmarginLayout( ui->breadCrumbLeft->layout() );
|
TomahawkUtils::unmarginLayout( ui->breadCrumbLeft->layout() );
|
||||||
TomahawkUtils::unmarginLayout( ui->verticalLayout->layout() );
|
|
||||||
|
|
||||||
m_crumbModelLeft = new QStandardItemModel( this );
|
m_crumbModelLeft = new QStandardItemModel( this );
|
||||||
m_sortedProxy = new QSortFilterProxyModel( this );
|
m_sortedProxy = new QSortFilterProxyModel( this );
|
||||||
@@ -183,12 +179,12 @@ NewReleasesWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData request
|
|||||||
if( !returnedData.contains(type) )
|
if( !returnedData.contains(type) )
|
||||||
break;
|
break;
|
||||||
const QString side = requestData.customData["whatshot_side"].toString();
|
const QString side = requestData.customData["whatshot_side"].toString();
|
||||||
const QString chartId = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >().value( "nr_id" );
|
const QString releaseId = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >().value( "nr_id" );
|
||||||
|
|
||||||
m_queuedFetches.remove( chartId );
|
m_queuedFetches.remove( releaseId );
|
||||||
|
|
||||||
ChartDataLoader* loader = new ChartDataLoader();
|
ChartDataLoader* loader = new ChartDataLoader();
|
||||||
loader->setProperty( "nrid", chartId );
|
loader->setProperty( "nrid", releaseId );
|
||||||
loader->moveToThread( m_workerThread );
|
loader->moveToThread( m_workerThread );
|
||||||
|
|
||||||
if ( type == "albums" )
|
if ( type == "albums" )
|
||||||
@@ -201,9 +197,9 @@ NewReleasesWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData request
|
|||||||
|
|
||||||
AlbumModel* albumModel = new AlbumModel( ui->albumsView );
|
AlbumModel* albumModel = new AlbumModel( ui->albumsView );
|
||||||
|
|
||||||
m_albumModels[ chartId ] = albumModel;
|
m_albumModels[ releaseId ] = albumModel;
|
||||||
|
|
||||||
if ( m_queueItemToShow == chartId )
|
if ( m_queueItemToShow == releaseId )
|
||||||
setLeftViewAlbums( albumModel );
|
setLeftViewAlbums( albumModel );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -355,7 +351,6 @@ NewReleasesWidget::setLeftViewAlbums( AlbumModel* model )
|
|||||||
{
|
{
|
||||||
ui->albumsView->setAlbumModel( model );
|
ui->albumsView->setAlbumModel( model );
|
||||||
ui->albumsView->proxyModel()->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel
|
ui->albumsView->proxyModel()->sort( -1 ); // disable sorting, must be called after artistsViewLeft->setTreeModel
|
||||||
ui->stackLeft->setCurrentIndex( 2 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -12,18 +12,9 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="Tomahawk::Breadcrumb" name="breadCrumbLeft" native="true"/>
|
<widget class="Tomahawk::Breadcrumb" name="breadCrumbLeft" native="true">
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QStackedWidget" name="stackLeft">
|
|
||||||
<widget class="QWidget" name="page">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="page1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="page2">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="AlbumView" name="albumsView">
|
<widget class="AlbumView" name="albumsView">
|
||||||
<property name="dragEnabled">
|
<property name="dragEnabled">
|
||||||
@@ -36,10 +27,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>AlbumView</class>
|
<class>AlbumView</class>
|
||||||
|
Reference in New Issue
Block a user