mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +02:00
* LoadingSpinner requires a parent and should install an event-filter on its parent.
This commit is contained in:
@@ -39,6 +39,7 @@ AnimatedSpinner::AnimatedSpinner( QWidget* parent )
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
AnimatedSpinner::AnimatedSpinner( const QSize& size, QWidget *parent )
|
||||
: QWidget( parent )
|
||||
, m_showHide( new QTimeLine )
|
||||
@@ -275,6 +276,8 @@ LoadingSpinner::LoadingSpinner( QAbstractItemView* parent )
|
||||
: AnimatedSpinner( parent )
|
||||
, m_parent( parent )
|
||||
{
|
||||
installEventFilter( m_parent );
|
||||
|
||||
if ( m_parent->model() )
|
||||
{
|
||||
connect( m_parent->model(), SIGNAL( loadingStarted() ), SLOT( fadeIn() ), Qt::UniqueConnection );
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
QSize sizeHint() const;
|
||||
|
||||
QPixmap pixmap() const { return m_pixmap; }
|
||||
|
||||
|
||||
void setAutoCenter( bool enabled ) { m_autoCenter = enabled; }
|
||||
|
||||
public slots:
|
||||
@@ -98,8 +98,8 @@ class DLLEXPORT LoadingSpinner : public AnimatedSpinner
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LoadingSpinner( QAbstractItemView* parent = 0 ); // widget mode
|
||||
|
||||
explicit LoadingSpinner( QAbstractItemView* parent ); // widget mode
|
||||
|
||||
private slots:
|
||||
void onViewModelChanged();
|
||||
|
||||
|
Reference in New Issue
Block a user