FirstRunWizard::FirstRunWizard(QWidget *parent) : QWizard(parent) { // Use default style on other platforms // but force ModernStyle on UNIX #ifdef Q_OS_UNIX setWizardStyle( QWizard::ModernStyle ); #endif setWindowTitle( tr("First Run Wizard") ); addPage( createIntroPage() ); addPage( createSetupDatabasePage() ); addPage( createArtistInformationPage() ); addPage( createFinalPage() ); }
AuthenticationWizard::AuthenticationWizard( KTp::ChannelAdapter *chAdapter, const QString &contact, QWidget *parent, bool initiate, const QString &question) : QWizard(parent), chAdapter(chAdapter), contact(contact), question(question), initiate(initiate) { wizardList.append(this); setAttribute(Qt::WA_DeleteOnClose); setPage(Page_SelectMethod, createIntroPage()); setPage(Page_QuestionAnswer, createQAPage()); setPage(Page_SharedSecret, createSSPage()); setPage(Page_ManualVerification, createMVPage()); setPage(Page_Wait1, new WaitPage(i18n("Waiting for <b>%1</b>...", contact))); setPage(Page_Wait2, new WaitPage(i18n("Checking if answers match..."))); setPage(Page_Final, createFinalPage()); if(!initiate) { if(question.isEmpty()) { setStartId(Page_SharedSecret); } else { setStartId(Page_QuestionAnswer); } } connect(this, SIGNAL(rejected()), this, SLOT(cancelVerification())); connect(rbQA, SIGNAL(clicked()), this, SLOT(updateInfoBox())); connect(rbSS, SIGNAL(clicked()), this, SLOT(updateInfoBox())); connect(rbMV, SIGNAL(clicked()), this, SLOT(updateInfoBox())); updateInfoBox(); resize(rbMV->width() * 1.05, rbMV->width() * 0.5); show(); }