Example #1
0
void ProgressItem::cancel()
{
    if ( m_canceled || !m_canbecanceled ) return;

    m_canceled = true;
    emit progressItemCanceled( this );
}
Example #2
0
MaintenanceTool::MaintenanceTool(const QString& id, ProgressItem* const parent)
    : ProgressItem(parent, id, QString(), QString(), true, true),
      d(new Private)
{
    connect(this, SIGNAL(progressItemCanceled(QString)),
            this, SLOT(slotCancel()));
}
Example #3
0
void ProgressItem::cancel()
{
   if ( mCanceled || !mCanBeCanceled ) return;
   kdDebug(5300) << "ProgressItem::cancel() - " << label() << endl;
   mCanceled = true;
   // Cancel all children.
   QValueList<ProgressItem*> kids = mChildren.keys();
   QValueList<ProgressItem*>::Iterator it( kids.begin() );
   QValueList<ProgressItem*>::Iterator end( kids.end() );
   for ( ; it != end; it++ ) {
     ProgressItem *kid = *it;
     if ( kid->canBeCanceled() )
       kid->cancel();
   }
   setStatus( i18n( "Aborting..." ) );
   emit progressItemCanceled( this );
}