/** * Creates a progress bar if there currently isn't one. Set up values. * @param max - The max number of steps for the progressbar. * @param cur - The current step in the progressbar. * @param msg - The current message for the progressbar. */ void Login::initProgressBar(int max, int cur, QString msg){ if(progress) delete progress; progress = new QProgressDialog(this, "Kinkatta - Login"); progress->setCaption("Kinkatta - Signon"); progress->setIcon(SmallIcon("kinkatta")); progress->setTotalSteps(max); connect( progress, SIGNAL(cancelled()), connection, SLOT(cancelProgress()) ); progress->setProgress(cur); progress->setLabelText(msg); progress->show(); }
//---------------------------------------------------------------------------- ctkExampleDicomAppLogic::ctkExampleDicomAppLogic(): ctkDicomAbstractApp(ctkExampleDicomAppPlugin::getPluginContext()), AppWidget(0) { connect(this, SIGNAL(startProgress()), this, SLOT(onStartProgress()), Qt::QueuedConnection); connect(this, SIGNAL(resumeProgress()), this, SLOT(onResumeProgress()), Qt::QueuedConnection); connect(this, SIGNAL(suspendProgress()), this, SLOT(onSuspendProgress()), Qt::QueuedConnection); connect(this, SIGNAL(cancelProgress()), this, SLOT(onCancelProgress()), Qt::QueuedConnection); connect(this, SIGNAL(exitHostedApp()), this, SLOT(onExitHostedApp()), Qt::QueuedConnection); connect(this, SIGNAL(dataAvailable()), this, SLOT(onDataAvailable())); //notify Host we are ready. try { getHostInterface()->notifyStateChanged(ctkDicomAppHosting::IDLE); } catch(...) { qDebug() << "ctkDicomAbstractApp: Could not getHostInterface()"; } }