示例#1
0
void ConnectFriendWizard::setCertificate(const QString &certificate, bool friendRequest)
{
	if (certificate.isEmpty()) {
		setStartId(Page_Intro);
		return;
	}

	uint32_t cert_load_error_code;

	if (rsPeers->loadDetailsFromStringCert(certificate.toUtf8().constData(), peerDetails, cert_load_error_code))
	{
#ifdef FRIEND_WIZARD_DEBUG
		std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
#endif
        mCertificate = certificate.toUtf8().constData();

        // Cyril: I disabled this because it seems to be not used anymore.
        //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
        setStartId(Page_Conclusion);
        if (friendRequest){
        ui->fr_label->show();
        ui->requestinfolabel->show();
        setTitleText(ui->ConclusionPage, tr("Friend request"));
        ui->ConclusionPage->setSubTitle(tr("Details about the request"));
        }
    } else {
		// error message
		setField("errorMessage", tr("Certificate Load Failed") + ": \n\n" + getErrorString(cert_load_error_code)) ;
		setStartId(Page_ErrorMessage);
	}
}
示例#2
0
void NewElementWizard::setElementToCopy(
    NewElementWizardContext::ElementType type, const FilePath& fp) noexcept {
  try {
    mContext->reset(type);
    mContext->copyElement(type, fp);  // can throw
    setStartId(NewElementWizardContext::ID_EnterMetadata);
  } catch (const Exception& e) {
    QMessageBox::critical(this, tr("Could not copy element"), e.getMsg());
    setStartId(NewElementWizardContext::ID_ChooseType);
  }
}
void ConnectFriendWizard::setGpgId(const std::string &gpgId, const std::string &sslId, bool friendRequest)
{
    if (!rsPeers->getPeerDetails(gpgId, peerDetails)) {
        setField("errorMessage", tr("Cannot get peer details of PGP key %1").arg(QString::fromStdString(gpgId)));
        setStartId(Page_ErrorMessage);
        return;
    }

    /* Set ssl id when available */
    peerDetails.id = sslId;

    setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
}
示例#4
0
MatDBAboutDialog::MatDBAboutDialog(QWidget *parent) :
    QWizard(parent)
{
#ifdef Q_WS_MAC
    this->setParent(qApp->focusWidget());
    this->setWindowModality(Qt::WindowModal);
    this->setWindowFlags(Qt::Sheet);
    setWizardStyle(ModernStyle);
#endif
    setFixedWidth(900);
    setFixedHeight(450);

    setSizeGripEnabled(false);

    setPage(Page_Version, new VersionPage);
    setPage(Page_License, new LicensePage);

    setStartId(Page_Version);

    QList<QWizard::WizardButton> layout;
    layout << QWizard::Stretch << QWizard::FinishButton << QWizard::NextButton;
    setButtonLayout(layout);

    QPixmap pix(":/artwork/MatDBAbout.png");
    setPixmap(QWizard::WatermarkPixmap, pix);
    setPixmap(QWizard::LogoPixmap, pix);
    setPixmap(QWizard::BannerPixmap, pix);
    setPixmap(QWizard::BackgroundPixmap, pix);
}
示例#5
0
ProfileWizard::ProfileWizard(TKeyhoteeApplication& mainApp) :
  QWizard(nullptr),
  _mainApp(mainApp)
{
  setAttribute(Qt::WA_DeleteOnClose);
  setOption(HaveHelpButton, true);

  QWizardPage* intro_page = new QWizardPage(this);
  intro_page->setTitle(tr("Welcome to Keyhotee") );
  _profile_intro_ui = new Ui::IntroPage();
  _profile_intro_ui->setupUi(intro_page);

//  _nym_page = new NymPage(this);
  _profile_edit = new ProfileEditPage(this);

  connect(this, &ProfileWizard::helpRequested, this, &ProfileWizard::showHelp);
  connect(this, &ProfileWizard::finished, this, &ProfileWizard::createProfile);

  setPage(Page_Intro, intro_page);
  setPage(Page_Profile, _profile_edit);
//  setPage(Page_FirstNym, _nym_page);

  setStartId(Page_Intro);

   #ifndef Q_WS_MAC
  setWizardStyle(ModernStyle);
   #else
  setWizardStyle(MacStyle);
   #endif
}
示例#6
0
NewElementWizard::NewElementWizard(const workspace::Workspace& ws, Library& lib,
                                   const IF_GraphicsLayerProvider& lp,
                                   QWidget* parent) noexcept
  : QWizard(parent), mUi(new Ui::NewElementWizard) {
  mUi->setupUi(this);
  setPixmap(WizardPixmap::LogoPixmap, QPixmap(":/img/logo/48x48.png"));
  mContext.reset(new NewElementWizardContext(ws, lib, lp));

  // add pages
  insertPage(NewElementWizardContext::ID_ChooseType,
             new NewElementWizardPage_ChooseType(*mContext, this));
  insertPage(NewElementWizardContext::ID_CopyFrom,
             new NewElementWizardPage_CopyFrom(*mContext, this));
  insertPage(NewElementWizardContext::ID_EnterMetadata,
             new NewElementWizardPage_EnterMetadata(*mContext, this));
  insertPage(NewElementWizardContext::ID_PackagePads,
             new NewElementWizardPage_PackagePads(*mContext, this));
  insertPage(NewElementWizardContext::ID_ComponentProperties,
             new NewElementWizardPage_ComponentProperties(*mContext, this));
  insertPage(NewElementWizardContext::ID_ComponentSymbols,
             new NewElementWizardPage_ComponentSymbols(*mContext, this));
  insertPage(NewElementWizardContext::ID_ComponentSignals,
             new NewElementWizardPage_ComponentSignals(*mContext, this));
  insertPage(NewElementWizardContext::ID_ComponentPinSignalMap,
             new NewElementWizardPage_ComponentPinSignalMap(*mContext, this));
  insertPage(NewElementWizardContext::ID_DeviceProperties,
             new NewElementWizardPage_DeviceProperties(*mContext, this));

  setStartId(NewElementWizardContext::ID_ChooseType);
}
示例#7
0
//! [0] //! [1] //! [2]
LicenseWizard::LicenseWizard(QWidget *parent)
    : QWizard(parent)
{
//! [0]
    setPage(Page_Intro, new IntroPage);
    setPage(Page_Evaluate, new EvaluatePage);
    setPage(Page_Register, new RegisterPage);
    setPage(Page_Details, new DetailsPage);
    setPage(Page_Conclusion, new ConclusionPage);
//! [1]

    setStartId(Page_Intro);
//! [2]

//! [3]
#ifndef Q_WS_MAC
//! [3] //! [4]
    setWizardStyle(ModernStyle);
#endif
//! [4] //! [5]
    setOption(HaveHelpButton, true);
//! [5] //! [6]
    setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo.png"));

//! [7]
    connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
//! [7]

    setWindowTitle(tr("License Wizard"));
//! [8]
}
示例#8
0
void SetupWizard::createPages()
{
    setPage(PAGE_START, new OPStartPage(this));
    setPage(PAGE_UPDATE, new AutoUpdatePage(this));
    setPage(PAGE_CONTROLLER, new ControllerPage(this));
    setPage(PAGE_VEHICLES, new VehiclePage(this));
    setPage(PAGE_MULTI, new MultiPage(this));
    setPage(PAGE_FIXEDWING, new FixedWingPage(this));
    setPage(PAGE_AIRSPEED, new AirSpeedPage(this));
    setPage(PAGE_GPS, new GpsPage(this));
    setPage(PAGE_HELI, new HeliPage(this));
    setPage(PAGE_SURFACE, new SurfacePage(this));
    setPage(PAGE_INPUT, new InputPage(this));
    setPage(PAGE_ESC, new EscPage(this));
    setPage(PAGE_SERVO, new ServoPage(this));
    setPage(PAGE_BIAS_CALIBRATION, new BiasCalibrationPage(this));
    setPage(PAGE_ESC_CALIBRATION, new EscCalibrationPage(this));
    setPage(PAGE_OUTPUT_CALIBRATION, new OutputCalibrationPage(this));
    setPage(PAGE_SUMMARY, new SummaryPage(this));
    setPage(PAGE_SAVE, new SavePage(this));
    setPage(PAGE_NOTYETIMPLEMENTED, new NotYetImplementedPage(this));
    setPage(PAGE_AIRFRAME_INITIAL_TUNING, new AirframeInitialTuningPage(this));
    setPage(PAGE_END, new OPEndPage(this));

    setStartId(PAGE_START);

    connect(button(QWizard::CustomButton1), SIGNAL(clicked()), this, SLOT(customBackClicked()));
    setButtonText(QWizard::CustomButton1, buttonText(QWizard::BackButton));
    QList<QWizard::WizardButton> button_layout;
    button_layout << QWizard::Stretch << QWizard::CustomButton1 << QWizard::NextButton << QWizard::CancelButton << QWizard::FinishButton;
    setButtonLayout(button_layout);
    connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(pageChanged(int)));
}
示例#9
0
void SetupWizard::createPages()
{
    setPage(PAGE_START, new StartPage(this));
    setPage(PAGE_UPDATE, new AutoUpdatePage(this));
    setPage(PAGE_CONTROLLER, new ControllerPage(this));
    setPage(PAGE_VEHICLES, new VehiclePage(this));
    setPage(PAGE_MULTI, new MultiPage(this));
    setPage(PAGE_FIXEDWING, new FixedWingPage(this));
    setPage(PAGE_HELI, new HeliPage(this));
    setPage(PAGE_SURFACE, new SurfacePage(this));
    setPage(PAGE_INPUT, new InputPage(this));
    setPage(PAGE_OUTPUT, new OutputPage(this));
    setPage(PAGE_LEVELLING, new LevellingPage(this));
    setPage(PAGE_CALIBRATION, new OutputCalibrationPage(this));
    setPage(PAGE_SUMMARY, new SummaryPage(this));
    setPage(PAGE_SAVE, new SavePage(this));
    setPage(PAGE_REBOOT, new RebootPage(this));
    setPage(PAGE_NOTYETIMPLEMENTED, new NotYetImplementedPage(this));
    setPage(PAGE_END, new EndPage(this));

    setStartId(PAGE_START);

    connect(button(QWizard::CustomButton1), SIGNAL(clicked()), this, SLOT(customBackClicked()));
    setButtonText(QWizard::CustomButton1, buttonText(QWizard::BackButton));
    QList<QWizard::WizardButton> button_layout;
    button_layout << QWizard::Stretch << QWizard::CustomButton1 << QWizard::NextButton << QWizard::CancelButton << QWizard::FinishButton;
    setButtonLayout(button_layout);
    connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(pageChanged(int)));
}
AMBeamConfigurationWizard::AMBeamConfigurationWizard(QWidget* parent)
	: AMGraphicsViewWizard(parent)
{
	/// two points for each square, three squares.
	setNumberOfPoints(6);
	setNumberOfPages(numberOfPoints());
	setFreePage(Page_Free);

	setRotationEnabled(false);

	setPage(Page_Intro, new AMWizardPage);
	setPage(Page_Final, new AMWizardPage);
	setPage(Page_Option, new AMWizardOptionPage);
	for(int i = 0; i < numberOfPages(); i++)
	{
		setPage(pageWait(i), new AMBeamWaitPage);
		/* kind of a dirty hack here, but this makes the
		   wait logic cleaner */
		if(i < 3)
			setPage(pageSet(i), new AMBeamCheckPage);
		else
			setPage(pageSet(i), new AMBeamSelectPage);
	}
	setStartId(Page_Intro);
	setOption(HaveHelpButton, true);
	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
	setWindowTitle(message(Wizard_Title));
	/* have to disconnect/connect the buttons to get them to work with the new slots */
	disconnect(button(QWizard::BackButton), SIGNAL(clicked()), this, SLOT(back()));
	connect(button(QWizard::BackButton), SIGNAL(clicked()), this, SLOT(back()));
	disconnect(button(QWizard::NextButton), SIGNAL(clicked()), this, SLOT(next()));
	connect(button(QWizard::NextButton), SIGNAL(clicked()), this, SLOT(next()));

	setMinimumSize(600,600);

	setting_ = false;
	reviewBeamShape_ = true;




	for(int i = 0; i < numberOfPoints(); i++)
	{
		pointListAppend(new QPointF(0,0));
	}

	topLeft_ = true;

	coordinateListAppend(new QVector3D(0,0,0));
	coordinateListAppend(new QVector3D(0,-1,0));
	coordinateListAppend(new QVector3D(0,1,0));
	coordinateListAppend(new QVector3D(0,0,0));
	coordinateListAppend(new QVector3D(0,-1,0));
	coordinateListAppend(new QVector3D(0,1,0));


	addOptionPage(Page_Intro);

}
示例#11
0
ConnectionWizard::ConnectionWizard( LogPtr log, QWidget* parent ) :
    QWizard( parent ),
    scene_( nullptr )
{   
    setPage( PAGE_INTRO, new IntroPage );
    setPage( PAGE_CONNECT_SERVER, new ConnectServerPage( scene_, log ) );
    setPage( PAGE_CREATE_SERVER, new CreateServerPage( scene_, log ) );

    setStartId( PAGE_INTRO );
}
示例#12
0
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();
}
示例#13
0
void ConnectFriendWizard::setGpgId(const RsPgpId &gpgId, const RsPeerId &sslId, bool friendRequest)
{
	if (!rsPeers->getGPGDetails(gpgId, peerDetails)) {
		setField("errorMessage", tr("Cannot get peer details of PGP key %1").arg(QString::fromStdString(gpgId.toStdString())));
		setStartId(Page_ErrorMessage);
		return;
	}

	/* Set ssl id when available */
	peerDetails.id = sslId;

    //setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
    setStartId(Page_Conclusion);
    if (friendRequest){
    ui->fr_label->show();
    ui->requestinfolabel->show();
    setTitleText(ui->ConclusionPage,tr("Friend request"));
    ui->ConclusionPage->setSubTitle(tr("Details about the request"));
    }
}
示例#14
0
/*!
  Default Constructor for ConfigWizard class
*/
ConfigWizard::ConfigWizard(QWidget *parent) : QWizard(parent)
{
     setPage(Intro_Page, new IntroPage);
     setPage(Load_Or_New_Page, new LoadOrNewPage);
     setPage(Load_Page, new LoadPage);
     setPage(New_Page, new NewPage);
     setPage(Basic_Stats, new BasicStats);
     setPage(Deck_Stats, new DeckStats);
     setPage(Last_Page, new LastPage);

     setStartId(0);
}
示例#15
0
NewBuildingWizard::NewBuildingWizard(QWidget *parent) :
    QWizard(parent),
    ui(new Ui::NewBuildingWizard)
{
    ui->setupUi(this);

    setPage(GENERAL_PAGE, new GeneralWizardPage());
    setPage(SPECIAL_PAGE, new SpecialWizardPage());
    setPage(OMT_PAGE, new OMTWizardPage());

    setStartId(GENERAL_PAGE);
}
示例#16
0
ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
	QWizard(parent), ui(new Ui::ConnectFriendWizard)
{
	ui->setupUi(this);

	mTitleFontSize = 0; // Standard
	mTitleFontWeight = 0; // Standard

// this define comes from Qt example. I don't have mac, so it wasn't tested
#ifndef Q_OS_MAC
	setWizardStyle(ModernStyle);
#endif

	setStartId(Page_Intro);

// at this moment I don't know, what information should be in help
//	setOption(HaveHelpButton, true);
//	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));

	setPixmap(QWizard::LogoPixmap, QPixmap(":/images/connect/connectFriendLogo.png"));

// we have no good pictures for watermarks
//	setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/connectFriendWatermark.png"));

	/* register global fields */
	ui->ErrorMessagePage->registerField("errorMessage", ui->messageLabel, "text");

	/* disable not used pages */
	ui->foffRadioButton->hide();
	ui->rsidRadioButton->hide();
	
	ui->fr_label->hide();
	ui->requestinfolabel->hide();

    connect(ui->acceptNoSignGPGCheckBox,SIGNAL(toggled(bool)), ui->_options_GB,SLOT(setEnabled(bool))) ;
    connect(ui->addKeyToKeyring_CB,SIGNAL(toggled(bool)), ui->acceptNoSignGPGCheckBox,SLOT(setChecked(bool))) ;
	
    connect(ui->gmailButton, SIGNAL(clicked()), this, SLOT(inviteGmail()));
    connect(ui->yahooButton, SIGNAL(clicked()), this, SLOT(inviteYahoo()));
    connect(ui->outlookButton, SIGNAL(clicked()), this, SLOT(inviteOutlook()));
    connect(ui->aolButton, SIGNAL(clicked()), this, SLOT(inviteAol()));
    connect(ui->yandexButton, SIGNAL(clicked()), this, SLOT(inviteYandex()));
    connect(ui->emailButton, SIGNAL(clicked()), this, SLOT(runEmailClient2()));

    
    subject = tr("RetroShare Invitation");
    body = GetStartedDialog::GetInviteText();
	
    body += "\n" + GetStartedDialog::GetCutBelowText();
    body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str());

	updateStylesheet();
}
示例#17
0
void ConnectFriendWizard::setCertificate(const QString &certificate, bool friendRequest)
{
    if (certificate.isEmpty()) {
        setStartId(Page_Intro);
        return;
    }

    uint32_t cert_load_error_code;

    if (rsPeers->loadDetailsFromStringCert(certificate.toUtf8().constData(), peerDetails, cert_load_error_code))
    {
#ifdef FRIEND_WIZARD_DEBUG
        std::cerr << "ConnectFriendWizard got id : " << peerDetails.id << "; gpg_id : " << peerDetails.gpg_id << std::endl;
#endif
        mCertificate = certificate.toUtf8().constData();
        setStartId(friendRequest ? Page_FriendRequest : Page_Conclusion);
    } else {
        // error message
        setField("errorMessage", tr("Certificate Load Failed") + ": \n\n" + getErrorString(cert_load_error_code)) ;
        setStartId(Page_ErrorMessage);
    }
}
示例#18
0
LicenseWizard:: LicenseWizard(QWidget *parent)
	: QWizard(parent)
{
	setPage(Page_Intro, new IntroPage);
	setPage(Page_Evaluate, new EvaluatePage);
	setPage(Page_Register, new RegisterPage);
	setPage(Page_Details, new DetailsPage);
	setPage(Page_Conclusion, new ConclusionPage);

	setStartId(Page_Intro);
	setOption(HaveHelpButton, true);
	setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo.png"));
	setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/watermark.png"));
	
	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
	setWindowTitle("License Wizard");
}
示例#19
0
FirstRunWizard::FirstRunWizard(QWidget *parent)
    : QWizard(parent),
    _locale(new LocaleManager())
{
    setPage(Intro, new IntroPage);
    setPage(Settings, new SettingsPage);
    setPage(Conclusion, new ConclusionPage);

    setStartId(Intro);

#ifndef Q_WS_MAC
    setWizardStyle(ModernStyle);
#endif

    setPixmap(QWizard::LogoPixmap, QPixmap(":/logo/48x48/logo.png"));
    setWindowTitle(tr("First Run Wizard"));
}
示例#20
0
FirstRunWizard::FirstRunWizard(QWidget *parent) :
    QWizard(parent)
{
    setPage(Page_Intro, new IntroPage);
    setPage(Page_Login, new LoginPage);
    setPage(Page_NewAccount, new NewAccountPage);
    setPage(Page_Activate, new ActivatePage);
    setPage(Page_Welcome, new WelcomePage);
    setPage(Page_KeyboardShortcuts, new ShortcutsPage);
    setPage(Page_OnlineServices, new OnlineServicesPage);
    setPage(Page_Finished, new FinishedPage);

    setStartId(Page_Intro);

    setWindowTitle(tr("ScreenCloud"));
    setOptions(QWizard::CancelButtonOnLeft);
    background = QPixmap(":/images/wizard_background.png");
    setPixmap(QWizard::BackgroundPixmap, background);
}
示例#21
0
LoaderWizard::LoaderWizard(QStandardItemModel * _model,ItfDocument * _doc,DocumentResources * _resources,QWidget *parent)
		: QWizard(parent)
{

	loaderIntroPage=new LoaderIntroPage();
	QPixmap watermark("://Images/csv_text.png");
	loaderIntroPage->setPixmap(QWizard::WatermarkPixmap,watermark);
	setPage(Page_Intro, loaderIntroPage);

	loaderDataFilePage=new LoaderDataFilePage();
	setPage(Page_DataFile, loaderDataFilePage);
	loaderParamSettingPage=new LoaderParamSettingPage(_model,_doc,_resources);
	setPage(Page_ParamSet, loaderParamSettingPage);
	loaderValidationPage=new LoaderValidationPage();
	setPage(Page_Validation, loaderValidationPage);


	setStartId(Page_Intro);



#ifndef Q_OS_MAC
	setWizardStyle(MacStyle);

#endif


	setOption(HaveHelpButton, true);
	//setPixmap(QWizard::LogoPixmap, QPixmap(":/images/logo.png"));

	//connect(static_cast<LoaderDataFilePage*>(this->loaderDataFilePage),SIGNAL(data_loaded(std::vector<std::vector<QString> *> *)),static_cast<LoaderParamSettingPage*>(this->loaderParamSettingPage),SLOT(send_data(std::vector<std::vector<QString>*>*)),Qt::DirectConnection);
	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
	//connect(this,SIGNAL(),this->loaderDataFilePage,SLOT()

	setWindowTitle(tr("Loader extra data Wizard"));

	this->setMinimumWidth(700);
	this->setMinimumHeight(500);
	//setWindowFlags(Qt::WindowStaysOnTopHint);


}
示例#22
0
CleanupWizard::CleanupWizard(QWidget* parent) :QWizard(parent)
{
    setObjectName("cleanupWizard"); //set the name to find the html help file

    setPage(preselectionID, new PreselectionPage);
    setPage(documentTypeSelectionID, new DocumentTypeSelectionPage);
    setPage(documentListSelectionID, new DocumentListSelectionPage);
    setPage(mailSelectionID, new MailSelectionPage);
    setPage(eventSelectionID, new EventSelectionPage);
    setPage(finalSummaryID, new FinalSummaryPage);

    setStartId(preselectionID);
    setWindowTitle(tr("Cleanup Wizard"));

    connect(page(documentListSelectionID),SIGNAL(documentsDeleted(int,bool)),
            page(finalSummaryID),SLOT(documentsDeleted(int,bool)));

    // update the buttons layout each time a new page is shown
    connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(updateWizard(int)));
}
示例#23
0
ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
    QWizard(parent), ui(new Ui::ConnectFriendWizard)
{
    ui->setupUi(this);

    /* add stylesheet to title */
    QList<int> ids = pageIds();
    for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it) {
        QWizardPage *p = page(*it);
        p->setTitle(QString("<span style=\"font-size:16pt; font-weight:500; color:white;\">%1</span>").arg(p->title()));
    }

// this define comes from Qt example. I don't have mac, so it wasn't tested
#ifndef Q_WS_MAC
    setWizardStyle(ModernStyle);
#endif

    setStartId(Page_Intro);

// at this moment I don't know, what information should be in help
//	setOption(HaveHelpButton, true);
//	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));

    setPixmap(QWizard::LogoPixmap, QPixmap(":/images/connect/connectFriendLogo.png"));

// we have no good pictures for watermarks
//	setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/connectFriendWatermark.png"));
    setPixmap(QWizard::BannerPixmap, QPixmap(":/images/connect/connectFriendBanner1.png"));

    /* register global fields */
    ui->ErrorMessagePage->registerField("errorMessage", ui->messageLabel, "text");

    /* disable not used pages */
    ui->foffRadioButton->hide();
    ui->rsidRadioButton->hide();

    connect(ui->acceptNoSignGPGCheckBox,SIGNAL(toggled(bool)), ui->optionsFrame,SLOT(setEnabled(bool))) ;
    connect(ui->addKeyToKeyring_CB,SIGNAL(toggled(bool)), ui->acceptNoSignGPGCheckBox,SLOT(setChecked(bool))) ;
}
示例#24
0
LClsStartupWizard::LClsStartupWizard(QWidget *parent) :
    QWizard(parent)
{

    setPage(Page_Intro, new LIntroPage);
    setPage(Page_PowerHardwareOn, new LPowerHardwareOnPage);
    setPage(Page_WarmUpCls, new LWarmUpClsPage);
    setPage(Page_TurnInjectorOn, new LTurnInjectorOnPage);
    setPage(Page_BringEbeamToFirstScreen, new LBringEbeamToFirstScreenPage);
    setPage(Page_BringEbeamToThirdScreen, new LBringEbeamToThirdScreenPage);
    setPage(Page_StoreEbeam, new LStoreEbeamPage);
    setPage(Page_Conclusion, new LConclusionPage);
    setStartId(Page_Intro);

    setOption(HaveHelpButton, true);
    connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));

    //setPixmap(QWizard::BannerPixmap, QPixmap(":/images/banner.png"));
    //setPixmap(QWizard::BackgroundPixmap, QPixmap(":/images/background.png"));

    setWindowTitle(tr("Cls Startup Wizard"));
}
示例#25
0
Wizard::Wizard(Application* app, LibraryBackend* library, QWidget* parent)
  : QWizard(parent),
    app_(app),
    library_(library),
    type_page_(new TypePage(this)),
    finish_page_(new FinishPage(this)),
    type_index_(-1),
    type_mapper_(new QSignalMapper(this))
{
  setWindowIcon(QIcon(":/icon.png"));
  setWindowTitle(tr("Smart playlist"));
  resize(788, 628);

#ifdef Q_OS_MAC
  // MacStyle leaves an ugly empty space on the left side of the dialog.
  setWizardStyle(QWizard::ClassicStyle);
#endif // Q_OS_MAC

  // Type page
  type_page_->setTitle(tr("Playlist type"));
  type_page_->setSubTitle(tr("A smart playlist is a dynamic list of songs that come from your library.  There are different types of smart playlist that offer different ways of selecting songs."));
  type_page_->setStyleSheet(
        "QRadioButton { font-weight: bold; }"
        "QLabel { margin-bottom: 1em; margin-left: 24px; }");
  addPage(type_page_);

  // Finish page
  finish_page_->setTitle(tr("Finish"));
  finish_page_->setSubTitle(tr("Choose a name for your smart playlist"));
  finish_id_ = addPage(finish_page_);

  connect(type_mapper_, SIGNAL(mapped(int)), SLOT(TypeChanged(int)));

  new QVBoxLayout(type_page_);
  AddPlugin(new QueryWizardPlugin(app_, library_, this));

  // Skip the type page - remove this when we have more than one type
  setStartId(2);
}
AMSimpleBeamConfigurationWizard::AMSimpleBeamConfigurationWizard(QWidget *parent)
	: AMGraphicsViewWizard(parent)
{
	setNumberOfPoints(3);
	setNumberOfPages(numberOfPoints());
	setFreePage(Page_Free);

	coordinateListAppend(new QVector3D(0,0,0));
	coordinateListAppend(new QVector3D(0,2,0));
	coordinateListAppend(new QVector3D(0,-2,0));

	setPage(Page_Intro, new AMWizardPage);
	setPage(Page_Option, new AMWizardOptionPage);
	setPage(Page_Final, new AMWizardPage);
	for(int i = 0; i < numberOfPages(); i++)
	{
		setPage(pageWait(i), new AMSimpleBeamConfigurationWaitPage);
		setPage(pageSet(i), new AMSimpleBeamConfigurationSetPage);
		connect(page(pageSet(i)), SIGNAL(initBeamShape()), this, SLOT(initBeamShape()));
		connect(page(pageSet(i)), SIGNAL(signalMousePressed(QPointF)), this, SLOT(mousePressedHandler(QPointF)));
		connect(page(pageSet(i)), SIGNAL(moveBeamShape(QPointF)), this, SLOT(moveBeamShapeHandler(QPointF)));
	}

	setStartId(Page_Intro);
	setOption(HaveHelpButton, true);
	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));

	setWindowTitle(message(Wizard_Title));

	disconnect(button(QWizard::BackButton), SIGNAL(clicked()), this, SLOT(back()));
	connect(button(QWizard::BackButton), SIGNAL(clicked()), this, SLOT(back()));

	setMinimumSize(600,600);

	/// Add options button to intro page
	addOptionPage(Page_Intro);

}
示例#27
0
WizardDialog::WizardDialog(const EEGeneral & settings, unsigned int modelId, QWidget *parent):
  QWizard(parent),
  mix(settings, modelId),
  settings(settings)
{
 // setWindowIcon(CompanionIcon("wizard.png"));
  setWindowTitle(tr("Model Wizard"));

  setPage(Page_Models, new ModelSelectionPage(this, "models", tr("Model Type"), tr("Enter model name and model type.")));
  setPage(Page_Throttle, new ThrottlePage(this, "throttle", tr("Throttle"), tr("Has your model got a motor or an engine?"), Page_Wingtypes));
  setPage(Page_Wingtypes, new WingtypeSelectionPage(this, "wingtype", tr("Wing Type"), tr("Is your model a flying wing/deltawing or has it a standard wing configuration?")));
  setPage(Page_Ailerons, new AileronsPage(this, "ailerons", tr("Ailerons"), tr("Has your model got ailerons?"), Page_Flaps));
  setPage(Page_Flaps, new FlapsPage(this, "flaps", tr("Flaps"), tr("Has your model got flaps?"), Page_Airbrakes));
  setPage(Page_Airbrakes, new AirbrakesPage(this, "airbrakes", tr("Airbrakes"), tr("Has your model got airbrakes?"), Page_Tails));
  setPage(Page_Elevons, new ElevonsPage(this, "elevons", tr("Flying-wing / Delta-wing"), tr("Select the elevons channels"), Page_Rudder));
  setPage(Page_Rudder, new RudderPage(this, "rudder", tr("Rudder"), tr("Does your model have a rudder?"), Page_Options));
  setPage(Page_Tails, new TailSelectionPage(this, "tails", tr("Tail Type"), tr("Select which type of tail your model is equiped with.")));
  setPage(Page_Tail, new TailPage(this, "tail", tr("Tail"), tr("Select channels for tail control."), Page_Options));
  setPage(Page_Vtail, new VTailPage(this, "vtail", tr("V-Tail"), tr("Select channels for tail control."), Page_Options));
  setPage(Page_Simpletail, new SimpleTailPage(this, "simpletail", tr("Tail"), tr("Select elevator channel."), Page_Options));
  setPage(Page_Cyclic, new CyclicPage(this, "cyclic", tr("Cyclic"), tr("Which type of swash control is installed in your helicopter?"), Page_Gyro));
  setPage(Page_Gyro, new GyroPage(this, "gyro", tr("Tail Gyro"), tr("Has your helicopter got an adjustable gyro for the tail?"), Page_Flybar));
  setPage(Page_Flybar, new FlybarSelectionPage(this, "flybar", tr("Rotor Type"), tr("Has your helicopter got a flybar?")));
  setPage(Page_Fblheli, new FblPage(this, "fblheli", tr("Helicopter"), tr("Select the controls for your helicopter"), Page_Options));
  setPage(Page_Helictrl, new HeliPage(this, "helictrl", tr("Helicopter"), tr("Select the controls for your helicopter"), Page_Options));
  setPage(Page_Multirotor, new MultirotorPage(this, "multirotor", tr("Multirotor"), tr("Select the control channels for your multirotor"), Page_Options));
  setPage(Page_Options, new OptionsPage(this, "options", tr("Model Options"), tr("Select additional options"), Page_Conclusion));
  setPage(Page_Conclusion, new ConclusionPage(this, "conclusion", tr("Save Changes"), tr(
    "Manually check the direction of each control surface and reverse any channels that make controls move in the wrong direction. "
    "Remove the propeller/propellers before you try to control your model for the first time.<br>"
    "Please note that continuing removes all old model settings!"), -1));
  setStartId(Page_Models);

  // Workaround for Qt radio button rendering issue on Mac
  Q_FOREACH(QAbstractButton * rb, findChildren<QAbstractButton *>()) {
    rb->setAttribute(Qt::WA_LayoutUsesWidgetRect);
  }
示例#28
0
BtBookshelfWizard::BtBookshelfWizard(QWidget * parent, Qt::WindowFlags flags)
    : QWizard(parent, flags)
    , m_downloadInProgress(false)
    , m_closeRequested(false)
    , m_closeMessageBox(new QMessageBox(this))
    , m_taskPage(new BtBookshelfTaskPage(this))
    , m_sourcesPage(new BtBookshelfSourcesPage(this))
    , m_sourcesProgressPage(new BtBookshelfSourcesProgressPage(this))
    , m_languagesPage(new BtBookshelfLanguagesPage(this))
    , m_installWorksPage(new BtBookshelfWorksPage(WizardTaskType::installWorks, this))
    , m_updateWorksPage(new BtBookshelfWorksPage(WizardTaskType::updateWorks, this))
    , m_removeWorksPage(new BtBookshelfWorksPage(WizardTaskType::removeWorks, this))
    , m_installFinalPage(new BtBookshelfInstallFinalPage(this))  // For install and update
{
    setPage(WizardPage::taskPage, m_taskPage);
    setPage(WizardPage::sourcesProgressPage,m_sourcesProgressPage);
    setPage(WizardPage::sourcesPage, m_sourcesPage);
    setPage(WizardPage::languagesPage, m_languagesPage);
    setPage(WizardPage::installWorksPage, m_installWorksPage);
    setPage(WizardPage::updateWorksPage, m_updateWorksPage);
    setPage(WizardPage::removeWorksPage, m_removeWorksPage);
    setPage(WizardPage::removeFinalPage, new BtBookshelfRemoveFinalPage(this));
    setPage(WizardPage::installFinalPage, m_installFinalPage);
    setStartId(WizardPage::taskPage);

    QRect rect = geometry();
    rect.setWidth(780);
    rect.setHeight(600);
    setGeometry(rect);
    setOption(QWizard::NoBackButtonOnLastPage);

    retranslateUi();

    // Load wizard geometry:
    restoreGeometry(btConfig().value<QByteArray>(GeometryKey, QByteArray()));
}
void OtrPeerIdentityVerificationWindow::showRespondSharedSecret()
{
	setStartId(RespondSharedSecretPage);
	show();
}
示例#30
0
void NewElementWizard::setNewElementType(
    NewElementWizardContext::ElementType type) noexcept {
  mContext->reset(type);
  setStartId(NewElementWizardContext::ID_EnterMetadata);
}