diff --git a/resources.qrc b/resources.qrc
index 575b389c9..602774165 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -143,6 +143,5 @@
data/images/process-stop.png
data/icons/tomahawk-icon-128x128-grayscale.png
data/images/collection.png
- data/images/loading-animation-dark.gif
diff --git a/src/AccountDelegate.cpp b/src/AccountDelegate.cpp
index 4362d2519..c5c3fc91e 100644
--- a/src/AccountDelegate.cpp
+++ b/src/AccountDelegate.cpp
@@ -27,7 +27,7 @@
#include "utils/tomahawkutils.h"
#include "utils/logger.h"
-#include "utils/chasewidget.h"
+#include "utils/AnimatedSpinner.h"
#include "utils/closure.h"
#define CHILD_ACCOUNT_HEIGHT 24
@@ -681,7 +681,7 @@ void
AccountDelegate::startInstalling( const QPersistentModelIndex& idx )
{
qDebug() << "START INSTALLING:" << idx.data( Qt::DisplayRole ).toString();
- ChaseWidget* anim = new ChaseWidget( QApplication::topLevelWidgets().first() );
+ AnimatedSpinner* anim = new AnimatedSpinner( 0 );
_detail::Closure* closure = NewClosure( anim, SIGNAL( requestUpdate() ), this, SLOT( doUpdateIndex( const QPersistentModelIndex& ) ), idx );
closure->setAutoDelete( false );
diff --git a/src/AccountDelegate.h b/src/AccountDelegate.h
index f6a4a873e..e0d4112bc 100644
--- a/src/AccountDelegate.h
+++ b/src/AccountDelegate.h
@@ -22,7 +22,7 @@
#include
#include "accounts/AccountModel.h"
-class ChaseWidget;
+class AnimatedSpinner;
namespace Tomahawk
{
@@ -72,7 +72,7 @@ private:
mutable QHash< QPersistentModelIndex, QRect > m_cachedStarRects;
mutable QHash< QPersistentModelIndex, QRect > m_cachedConfigRects;
mutable QHash< QPersistentModelIndex, QSize > m_sizeHints;
- mutable QHash< QPersistentModelIndex, ChaseWidget* > m_loadingSpinners;
+ mutable QHash< QPersistentModelIndex, AnimatedSpinner* > m_loadingSpinners;
mutable int m_accountRowHeight;
};
diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt
index 0ad71153f..199b479e8 100644
--- a/src/libtomahawk/CMakeLists.txt
+++ b/src/libtomahawk/CMakeLists.txt
@@ -122,7 +122,7 @@ set( libGuiSources
utils/closure.cpp
utils/PixmapDelegateFader.cpp
utils/SmartPointerList.h
- utils/chasewidget.cpp
+ utils/AnimatedSpinner.cpp
widgets/animatedcounterlabel.cpp
widgets/checkdirtree.cpp
diff --git a/src/libtomahawk/accounts/AccountManager.cpp b/src/libtomahawk/accounts/AccountManager.cpp
index 7c3f68035..9299d96fc 100644
--- a/src/libtomahawk/accounts/AccountManager.cpp
+++ b/src/libtomahawk/accounts/AccountManager.cpp
@@ -266,7 +266,7 @@ void
AccountManager::loadFromConfig()
{
QStringList accountIds = TomahawkSettings::instance()->accounts();
-
+ qDebug() << "LOADING ALL ACCOUNTS" << accountIds;
foreach( const QString& accountId, accountIds )
{
QString pluginFactory = factoryFromId( accountId );
diff --git a/src/libtomahawk/accounts/AccountModel.cpp b/src/libtomahawk/accounts/AccountModel.cpp
index f58014435..f4614c322 100644
--- a/src/libtomahawk/accounts/AccountModel.cpp
+++ b/src/libtomahawk/accounts/AccountModel.cpp
@@ -29,7 +29,7 @@
using namespace Tomahawk;
using namespace Accounts;
-#define ACCOUNTMODEL_DEBUG 0
+#define ACCOUNTMODEL_DEBUG 1
AccountModel::AccountModel( QObject* parent )
: QAbstractListModel( parent )
diff --git a/src/libtomahawk/accounts/AccountModelNode.h b/src/libtomahawk/accounts/AccountModelNode.h
index 857d57402..a1754a8d2 100644
--- a/src/libtomahawk/accounts/AccountModelNode.h
+++ b/src/libtomahawk/accounts/AccountModelNode.h
@@ -26,7 +26,7 @@
#include
-#define ACCOUNTMODELNODE_DEBUG 0
+#define ACCOUNTMODELNODE_DEBUG 1
namespace Tomahawk {
diff --git a/src/libtomahawk/playlist/trackview.cpp b/src/libtomahawk/playlist/trackview.cpp
index 20410cad3..3640a9e83 100644
--- a/src/libtomahawk/playlist/trackview.cpp
+++ b/src/libtomahawk/playlist/trackview.cpp
@@ -31,7 +31,7 @@
#include "context/ContextWidget.h"
#include "widgets/overlaywidget.h"
#include "dynamic/widgets/LoadingSpinner.h"
-#include "utils/chasewidget.h"
+#include "utils/AnimatedSpinner.h"
#include "utils/tomahawkutils.h"
#include "utils/logger.h"
#include "utils/closure.h"
@@ -51,7 +51,7 @@ TrackView::TrackView( QWidget* parent )
, m_delegate( 0 )
, m_header( new TrackHeader( this ) )
, m_overlay( new OverlayWidget( this ) )
- , m_loadingSpinner( new ChaseWidget( this ) )
+ , m_loadingSpinner( new AnimatedSpinner( this ) )
, m_resizing( false )
, m_dragging( false )
, m_updateContextView( true )
diff --git a/src/libtomahawk/playlist/trackview.h b/src/libtomahawk/playlist/trackview.h
index f2ac5d389..7824c2399 100644
--- a/src/libtomahawk/playlist/trackview.h
+++ b/src/libtomahawk/playlist/trackview.h
@@ -31,7 +31,7 @@
class QAction;
class LoadingSpinner;
-class ChaseWidget;
+class AnimatedSpinner;
class TrackHeader;
class TrackModel;
class TrackProxyModel;
@@ -58,7 +58,7 @@ public:
TrackHeader* header() const { return m_header; }
OverlayWidget* overlay() const { return m_overlay; }
Tomahawk::ContextMenu* contextMenu() const { return m_contextMenu; }
- ChaseWidget* loadingSpinner() const { return m_loadingSpinner; }
+ AnimatedSpinner* loadingSpinner() const { return m_loadingSpinner; }
QModelIndex hoveredIndex() const { return m_hoveredIndex; }
QModelIndex contextMenuIndex() const { return m_contextMenuIndex; }
@@ -120,7 +120,7 @@ private:
PlaylistItemDelegate* m_delegate;
TrackHeader* m_header;
OverlayWidget* m_overlay;
- ChaseWidget* m_loadingSpinner;
+ AnimatedSpinner* m_loadingSpinner;
bool m_resizing;
bool m_dragging;
diff --git a/src/libtomahawk/utils/chasewidget.cpp b/src/libtomahawk/utils/chasewidget.cpp
deleted file mode 100644
index 8acb66736..000000000
--- a/src/libtomahawk/utils/chasewidget.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "chasewidget.h"
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-ChaseWidget::ChaseWidget(QWidget *parent, QPixmap pixmap, bool pixmapEnabled)
- : QWidget(parent)
- , m_segment(0)
- , m_delay(100)
- , m_step(40)
- , m_timerId(-1)
- , m_animated(false)
- , m_pixmap(pixmap)
- , m_pixmapEnabled(pixmapEnabled)
- , m_showHide( new QTimeLine )
-{
- m_showHide->setDuration( 300 );
- m_showHide->setStartFrame( 0 );
- m_showHide->setEndFrame( 100 );
- m_showHide->setUpdateInterval( 20 );
- connect( m_showHide, SIGNAL( frameChanged( int ) ), this, SLOT( update() ) );
- connect( m_showHide, SIGNAL( finished() ), this, SLOT( hideFinished() ) );
-
- hide();
-
-}
-
-void ChaseWidget::setAnimated(bool value)
-{
- if (m_animated == value)
- return;
- m_animated = value;
- if (m_timerId != -1) {
- killTimer(m_timerId);
- m_timerId = -1;
- }
- if (m_animated) {
- m_segment = 0;
- m_timerId = startTimer(m_delay);
- }
- update();
-}
-
-void ChaseWidget::paintEvent(QPaintEvent *event)
-{
- Q_UNUSED(event);
-
- if ( parentWidget() )
- {
- QPoint center( ( parentWidget()->width() / 2 ) - ( width() / 2 ), ( parentWidget()->height() / 2 ) - ( height() / 2 ) );
- if ( center != pos() )
- {
- move( center );
- return;
- }
- }
-
- QPainter p(this);
-
- if ( m_showHide->state() == QTimeLine::Running )
- {
- // showing or hiding
- p.setOpacity( (qreal)m_showHide->currentValue() );
- }
-
- if (m_pixmapEnabled && !m_pixmap.isNull()) {
- p.drawPixmap(0, 0, m_pixmap);
- return;
- }
-
- const int extent = qMin(width() - 8, height() - 8);
- const int displ = extent / 4;
- const int ext = extent / 4 - 1;
-
- p.setRenderHint(QPainter::Antialiasing, true);
-
- if(m_animated)
- p.setPen(Qt::gray);
- else
- p.setPen(QPen(palette().dark().color()));
-
- p.translate(width() / 2, height() / 2); // center
-
- for (int segment = 0; segment < segmentCount(); ++segment) {
- p.rotate(QApplication::isRightToLeft() ? m_step : -m_step);
- if(m_animated)
- p.setBrush(colorForSegment(segment));
- else
- p.setBrush(palette().background());
- p.drawEllipse(QRect(displ, -ext / 2, ext, ext));
- }
-}
-
-void ChaseWidget::fadeIn()
-{
- if ( isVisible() )
- return;
-
- show();
-
- setAnimated( true );
- m_showHide->setDirection( QTimeLine::Forward );
-
- if ( m_showHide->state() != QTimeLine::Running )
- m_showHide->start();
-}
-
-void ChaseWidget::fadeOut()
-{
- m_showHide->setDirection( QTimeLine::Backward );
-
- if ( m_showHide->state() != QTimeLine::Running )
- m_showHide->start();
-}
-
-void ChaseWidget::hideFinished()
-{
- if ( m_showHide->direction() == QTimeLine::Backward )
- {
- hide();
- setAnimated(false);
- }
-}
-
-QSize ChaseWidget::sizeHint() const
-{
- return QSize(64, 64);
-}
-
-void ChaseWidget::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() == m_timerId) {
- ++m_segment;
- update();
- emit requestUpdate();
- }
- QWidget::timerEvent(event);
-}
-
-QColor ChaseWidget::colorForSegment(int seg) const
-{
- int index = ((seg + m_segment) % segmentCount());
- int comp = qMax(0, 255 - (index * (255 / segmentCount())));
- return QColor(comp, comp, comp, 255);
-}
-
-int ChaseWidget::segmentCount() const
-{
- return 360 / m_step;
-}
-
-void ChaseWidget::setPixmapEnabled(bool enable)
-{
- m_pixmapEnabled = enable;
-}
-
diff --git a/src/libtomahawk/utils/chasewidget.h b/src/libtomahawk/utils/chasewidget.h
deleted file mode 100644
index 0c3450ac7..000000000
--- a/src/libtomahawk/utils/chasewidget.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CHASEWIDGET_H
-#define CHASEWIDGET_H
-
-#include "dllmacro.h"
-
-#include
-
-#include
-#include
-#include
-
-class QTimeLine;
-class QHideEvent;
-class QShowEvent;
-class QPaintEvent;
-class QTimerEvent;
-
-class DLLEXPORT ChaseWidget : public QWidget
-{
- Q_OBJECT
-public:
- ChaseWidget(QWidget *parent = 0, QPixmap pixmap = QPixmap(), bool pixmapEnabled = false);
-
- void setPixmapEnabled(bool enable);
- QSize sizeHint() const;
-
-public slots:
- void fadeIn();
- void fadeOut();
-
-signals:
- void requestUpdate();
-
-protected:
- void paintEvent(QPaintEvent *event);
- void timerEvent(QTimerEvent *event);
-
-private slots:
- void hideFinished();
-
-private:
- void setAnimated(bool value);
- int segmentCount() const;
- QColor colorForSegment(int segment) const;
-
- QTimeLine* m_showHide;
-
- int m_segment;
- int m_delay;
- int m_step;
- int m_timerId;
- bool m_animated;
- QPixmap m_pixmap;
- bool m_pixmapEnabled;
-};
-
-#endif
diff --git a/src/libtomahawk/widgets/searchwidget.cpp b/src/libtomahawk/widgets/searchwidget.cpp
index 8add731b0..4e2e43974 100644
--- a/src/libtomahawk/widgets/searchwidget.cpp
+++ b/src/libtomahawk/widgets/searchwidget.cpp
@@ -26,7 +26,7 @@
#include "sourcelist.h"
#include "viewmanager.h"
#include "dynamic/widgets/LoadingSpinner.h"
-#include "utils/chasewidget.h"
+#include "utils/AnimatedSpinner.h"
#include "playlist/albummodel.h"
#include "playlist/playlistmodel.h"
#include "widgets/overlaywidget.h"
diff --git a/src/main.cpp b/src/main.cpp
index 6ab65e66e..ac3e2b596 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -127,7 +127,7 @@ main( int argc, char *argv[] )
#ifndef ENABLE_HEADLESSs
#ifdef WITH_BREAKPAD
- new BreakPad( QDir::tempPath(), TomahawkSettings::instance()->crashReporterEnabled() );
+ //new BreakPad( QDir::tempPath(), TomahawkSettings::instance()->crashReporterEnabled() );
#endif
#endif