mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Style fixes for NetworkActivityWidget.
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
NetworkActivityWidget::NetworkActivityWidget( QWidget *parent )
|
NetworkActivityWidget::NetworkActivityWidget( QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
, ui( new Ui::NetworkActivityWidget )
|
, ui( new Ui::NetworkActivityWidget )
|
||||||
, m_sortedProxy( 0 )
|
, m_sortedProxy( 0 )
|
||||||
@@ -72,16 +72,19 @@ NetworkActivityWidget::NetworkActivityWidget( QWidget *parent )
|
|||||||
m_spinner->fadeIn();
|
m_spinner->fadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NetworkActivityWidget::~NetworkActivityWidget()
|
NetworkActivityWidget::~NetworkActivityWidget()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tomahawk::playlistinterface_ptr
|
Tomahawk::playlistinterface_ptr
|
||||||
NetworkActivityWidget::playlistInterface() const
|
NetworkActivityWidget::playlistInterface() const
|
||||||
{
|
{
|
||||||
return m_playlistInterface;
|
return m_playlistInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
NetworkActivityWidget::isBeingPlayed() const
|
NetworkActivityWidget::isBeingPlayed() const
|
||||||
{
|
{
|
||||||
@@ -91,6 +94,7 @@ NetworkActivityWidget::isBeingPlayed() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
NetworkActivityWidget::jumpToCurrentTrack()
|
NetworkActivityWidget::jumpToCurrentTrack()
|
||||||
{
|
{
|
||||||
@@ -100,6 +104,7 @@ NetworkActivityWidget::jumpToCurrentTrack()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::fetchData()
|
NetworkActivityWidget::fetchData()
|
||||||
{
|
{
|
||||||
@@ -107,6 +112,7 @@ NetworkActivityWidget::fetchData()
|
|||||||
QtConcurrent::run( this, &NetworkActivityWidget::actualFetchData );
|
QtConcurrent::run( this, &NetworkActivityWidget::actualFetchData );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::weeklyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
NetworkActivityWidget::weeklyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
||||||
{
|
{
|
||||||
@@ -120,6 +126,7 @@ NetworkActivityWidget::weeklyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
|||||||
checkDone( locker );
|
checkDone( locker );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::monthlyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
NetworkActivityWidget::monthlyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
||||||
{
|
{
|
||||||
@@ -133,6 +140,7 @@ NetworkActivityWidget::monthlyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
|||||||
checkDone( locker );
|
checkDone( locker );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::yearlyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
NetworkActivityWidget::yearlyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
||||||
{
|
{
|
||||||
@@ -146,8 +154,9 @@ NetworkActivityWidget::yearlyCharts( const QList<Tomahawk::track_ptr>& tracks )
|
|||||||
checkDone( locker );
|
checkDone( locker );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::leftCrumbIndexChanged( QModelIndex index )
|
NetworkActivityWidget::leftCrumbIndexChanged( const QModelIndex& index )
|
||||||
{
|
{
|
||||||
QStandardItem* item = m_crumbModelLeft->itemFromIndex( m_sortedProxy->mapToSource( index ) );
|
QStandardItem* item = m_crumbModelLeft->itemFromIndex( m_sortedProxy->mapToSource( index ) );
|
||||||
if ( !item )
|
if ( !item )
|
||||||
@@ -176,6 +185,7 @@ NetworkActivityWidget::leftCrumbIndexChanged( QModelIndex index )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::actualFetchData()
|
NetworkActivityWidget::actualFetchData()
|
||||||
{
|
{
|
||||||
@@ -203,6 +213,7 @@ NetworkActivityWidget::actualFetchData()
|
|||||||
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( yearCharts ) );
|
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( yearCharts ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NetworkActivityWidget::checkDone( QSharedPointer<QMutexLocker> )
|
NetworkActivityWidget::checkDone( QSharedPointer<QMutexLocker> )
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ class NetworkActivityWidget : public QWidget, public Tomahawk::ViewPage
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
NetworkActivityWidget(QWidget *parent = 0);
|
NetworkActivityWidget(QWidget* parent = 0);
|
||||||
~NetworkActivityWidget();
|
~NetworkActivityWidget();
|
||||||
|
|
||||||
virtual QWidget* widget() { return this; }
|
virtual QWidget* widget() { return this; }
|
||||||
@@ -57,7 +57,7 @@ private slots:
|
|||||||
void monthlyCharts( const QList<Tomahawk::track_ptr>& );
|
void monthlyCharts( const QList<Tomahawk::track_ptr>& );
|
||||||
void yearlyCharts( const QList<Tomahawk::track_ptr>& );
|
void yearlyCharts( const QList<Tomahawk::track_ptr>& );
|
||||||
|
|
||||||
void leftCrumbIndexChanged( QModelIndex );
|
void leftCrumbIndexChanged( const QModelIndex& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void actualFetchData();
|
void actualFetchData();
|
||||||
|
Reference in New Issue
Block a user