void StatusbarProgressWidget::slotProgressItemAdded( ProgressItem *item )
{
    if ( item->parent() ) return; // we are only interested in top level items
    connectSingleItem(); // if going to 1 item
    if ( m_currentitem )
    {
        // Exactly one item
        delete m_busytimer;
        m_busytimer = 0;
        m_delaytimer->setSingleShot( true );
        m_delaytimer->start( 1000 );
    }
    else
    {
        // N items
        if ( !m_busytimer )
        {
            m_busytimer = new QTimer( this );
            connect( m_busytimer, SIGNAL( timeout() ),
                     this, SLOT( slotBusyIndicator() ) );
            m_delaytimer->setSingleShot( true );
            m_delaytimer->start( 1000 );
        }
    }
}
void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
{
    if ( item->parent() ) return; // we are only interested in top level items
    connectSingleItem(); // if going back to 1 item
    if ( ProgressManager::self()->isEmpty() )
    {
        // No item
        // Done. In 5s the progress-widget will close, then we can clean up the statusbar
        QTimer::singleShot( 5000, this, SLOT( slotClean() ) );
    }
    else if ( m_currentitem )
    {
        // Exactly one item
        delete m_busytimer;
        m_busytimer = 0;
        activateSingleItemMode();
    }
}
void StatusbarProgressWidget::slotProgressItemCompleted(ProgressItem* item)
{
    if (item && item->parent())
        return; // we are only interested in top level items

    connectSingleItem(); // if going back to 1 item

    if (ProgressManager::instance()->isEmpty())
    {
        // No item
        // Done. In 5s the progress-widget will close, then we can clean up the statusbar
        d->cleanTimer->start(5000);
    }
    else if (d->currentItem)
    {
        // Exactly one item
        delete d->busyTimer;
        d->busyTimer = 0;
        activateSingleItemMode();
    }
}