KQProgressModalDialog::KQProgressModalDialog ( const QString & captionText, const QString & labelText, const QString & cancelButtonText, int totalSteps, QWidget * creator ) : KProgressDialog( creator, captionText, labelText ) { setAllowCancel( true ); showCancelButton( true ); setAutoClose( true ); setButtonText( cancelButtonText ); progressBar()->setMaximum( totalSteps ); setMinimumDuration( 1 ); }
/** * Class constructor. * @param sCaption The dialogue's title * @param sText The text to display * @param pParent The parent widget */ ProgressDlg::ProgressDlg(const QString& sCaption, const QString& sText, QWidget* pParent) : KProgressDialog(pParent, sCaption, sText), m_nIdleValue(-1) { setAutoClose(false); setAllowCancel(false); // Create the idle-progress timer m_pIdleTimer = new QTimer(this); // Display a busy indicator by increasing the value of the idle counter connect (m_pIdleTimer, SIGNAL(timeout()), this, SLOT(slotShowBusy())); }
akuWaitDialog::akuWaitDialog(QWidget *parent) : KProgressDialog(parent, i18n("Processing Archive"), i18n("Work in progress, aKu is not freezed")) { progressBar() -> setMaximumSize(654999, 20); progressBar() -> setMaximum(0); progressBar() -> setMinimum(0); progressBar() -> setValue(0); setMinimumSize(320, 100); setMaximumSize(320, 100); setModal(true); setAutoClose(false); setAutoReset(false); setAllowCancel(false); }
void KProgressDialog::slotAutoActions(int percentage) { if (percentage < 100) { if (!d->cancelButtonShown) { setButtonCancel(mCancelText); d->cancelButtonShown = true; } return; } mShowTimer->stop(); if (mAutoReset) { mProgressBar->setProgress(0); } else { setAllowCancel(true); setButtonCancel(KStdGuiItem::close()); d->cancelButtonShown = false; } if (mAutoClose) { if (mShown) { hide(); } else { emit finished(); } } }
void akuWaitDialog::moveCursor() { progressBar() -> setValue(progressBar() -> value() + 10); setAllowCancel(false); }