OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage() : QWizardPage(), _ui(), _checking(false), _created(false), _localFolderValid(false), _progressIndi(new QProgressIndicator (this)), _oldLocalFolder(), _remoteFolder() { _ui.setupUi(this); Theme *theme = Theme::instance(); setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(theme->appNameGUI()))); setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Setup local folder options"))); registerField( QLatin1String("OCSyncFromScratch"), _ui.cbSyncFromScratch); _ui.resultLayout->addWidget( _progressIndi ); stopSpinner(); setupCustomization(); connect( _ui.pbSelectLocalFolder, SIGNAL(clicked()), SLOT(slotSelectFolder())); setButtonText(QWizard::NextButton, tr("Connect...")); connect( _ui.rSyncEverything, SIGNAL(clicked()), SLOT(slotSyncEverythingClicked())); connect( _ui.rSelectiveSync, SIGNAL(clicked()), SLOT(slotSelectiveSyncClicked())); connect( _ui.bSelectiveSync, SIGNAL(clicked()), SLOT(slotSelectiveSyncClicked())); QIcon appIcon = theme->applicationIcon(); _ui.lServerIcon->setText(QString()); _ui.lServerIcon->setPixmap(appIcon.pixmap(48)); _ui.lLocalIcon->setText(QString()); _ui.lLocalIcon->setPixmap(QPixmap(Theme::hidpiFileName(":/client/resources/folder-sync.png"))); }
OwncloudWizardResultPage::OwncloudWizardResultPage() : QWizardPage(), _localFolder(), _remoteFolder(), _complete(false), _ui() { _ui.setupUi(this); // no fields to register. setTitle(WizardCommon::subTitleTemplate().arg(tr("Everything set up!"))); // required to show header in QWizard's modern style setSubTitle( QLatin1String(" ") ); /* _ui.pbOpenLocal->setText(tr("Open Local Folder")); _ui.pbOpenLocal->setIcon(QIcon(":/mirall/resources/folder-sync.png")); _ui.pbOpenLocal->setIconSize(QSize(48, 48)); _ui.pbOpenLocal->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); connect(_ui.pbOpenLocal, SIGNAL(clicked()), SLOT(slotOpenLocal())); Theme* theme = Theme::instance(); QIcon appIcon = theme->applicationIcon(); _ui.pbOpenServer->setText(tr("Open %1").arg(theme->appNameGUI())); _ui.pbOpenServer->setIcon(appIcon.pixmap(48)); _ui.pbOpenServer->setIconSize(QSize(48, 48)); _ui.pbOpenServer->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); connect(_ui.pbOpenServer, SIGNAL(clicked()), SLOT(slotOpenServer())); */ setupCustomization(); }
OwncloudSetupPage::OwncloudSetupPage() : QWizardPage(), _ui(), _oCUrl(), _ocUser(), _authTypeKnown(false), _checking(false), _authType(WizardCommon::HttpCreds), _progressIndi(new QProgressIndicator (this)) { _ui.setupUi(this); Theme *theme = Theme::instance(); setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(theme->appNameGUI()))); setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Setup %1 server").arg(theme->appNameGUI()))); registerField( QLatin1String("OCUrl*"), _ui.leUrl ); _ui.resultLayout->addWidget( _progressIndi ); stopSpinner(); setupCustomization(); connect(_ui.leUrl, SIGNAL(textChanged(QString)), SLOT(slotUrlChanged(QString))); connect(_ui.leUrl, SIGNAL(editingFinished()), SLOT(slotUrlEditFinished())); }
OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage() : QWizardPage(), _ui(), _checking(false), _created(false), _configExists(false), _multipleFoldersExist(false), _progressIndi(new QProgressIndicator (this)), _oldLocalFolder(), _remoteFolder() { _ui.setupUi(this); Theme *theme = Theme::instance(); setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(theme->appNameGUI()))); setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Setup local folder options"))); registerField( QLatin1String("OCSyncFromScratch"), _ui.cbSyncFromScratch); _ui.resultLayout->addWidget( _progressIndi ); stopSpinner(); setupCustomization(); connect( _ui.pbSelectLocalFolder, SIGNAL(clicked()), SLOT(slotSelectFolder())); }
OwncloudWizardResultPage::OwncloudWizardResultPage() { _ui.setupUi(this); // no fields to register. Theme *theme = Theme::instance(); setTitle( tr("<font color=\"%1\" size=\"5\">Everything set up!</font>") .arg(theme->wizardHeaderTitleColor().name())); // required to show header in QWizard's modern style setSubTitle( QLatin1String(" ") ); _ui.pbOpenLocal->setText("Open local folder"); _ui.pbOpenServer->setText(tr("Open %1").arg(Theme::instance()->appNameGUI())); _ui.pbOpenLocal->setIcon(QIcon(":/mirall/resources/folder-sync.png")); _ui.pbOpenLocal->setText(tr("Open Local Folder")); _ui.pbOpenLocal->setIconSize(QSize(48, 48)); connect(_ui.pbOpenLocal, SIGNAL(clicked()), SLOT(slotOpenLocal())); _ui.pbOpenLocal->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); QIcon appIcon = theme->applicationIcon(); _ui.pbOpenServer->setIcon(appIcon.pixmap(48)); _ui.pbOpenServer->setText(tr("Open %1").arg(theme->appNameGUI())); _ui.pbOpenServer->setIconSize(QSize(48, 48)); _ui.pbOpenServer->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); connect(_ui.pbOpenServer, SIGNAL(clicked()), SLOT(slotOpenServer())); setupCustomization(); }
OwncloudWizardResultPage::OwncloudWizardResultPage() { _ui.setupUi(this); // no fields to register. Theme *theme = Theme::instance(); setTitle( tr("<font color=\"%1\" size=\"5\">Everything set up!</font>") .arg(theme->wizardHeaderTitleColor().name())); setSubTitle( tr("<font color=\"%1\">Enter user credentials to access your %2</font>") .arg(theme->wizardHeaderTitleColor().name()).arg(theme->appNameGUI())); _ui.pbOpenLocal->setText("Open local folder"); _ui.pbOpenServer->setText(tr("Open %1").arg(Theme::instance()->appNameGUI())); _ui.pbOpenLocal->setIcon(QIcon(":/mirall/resources/folder-sync.png")); _ui.pbOpenLocal->setText(tr("Open Local Folder")); _ui.pbOpenLocal->setIconSize(QSize(48, 48)); connect(_ui.pbOpenLocal, SIGNAL(clicked()), SLOT(slotOpenLocal())); _ui.pbOpenLocal->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); // _ui.pbOpenServer->setIcon(QIcon(":/mirall/resources/owncloud_logo_blue.png")); _ui.pbOpenServer->setIcon(theme->applicationIcon().pixmap(48)); _ui.pbOpenServer->setText(tr("Open %1").arg(theme->appNameGUI())); _ui.pbOpenServer->setIconSize(QSize(48, 48)); _ui.pbOpenServer->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); connect(_ui.pbOpenServer, SIGNAL(clicked()), SLOT(slotOpenServer())); setupCustomization(); }
OwncloudWizardResultPage::OwncloudWizardResultPage() { _ui.setupUi(this); // no fields to register. _ui.resultTextEdit->setAcceptRichText(true); _ui.ocLinkLabel->setVisible( false ); setupCustomization(); }
OwncloudHttpCredsPage::OwncloudHttpCredsPage() : AbstractCredentialsWizardPage(), _ui(), _connected(false), _checking(false), _configExists(false), _progressIndi(new QProgressIndicator (this)) { _ui.setupUi(this); registerField( QLatin1String("OCUser*"), _ui.leUsername); registerField( QLatin1String("OCPasswd*"), _ui.lePassword); setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(Theme::instance()->appNameGUI()))); setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Enter user credentials"))); _ui.resultLayout->addWidget( _progressIndi ); stopSpinner(); setupCustomization(); }
OwncloudHttpCredsPage::OwncloudHttpCredsPage(QWidget* parent) : AbstractCredentialsWizardPage(), _ui(), _connected(false), _checking(false), _progressIndi(new QProgressIndicator (this)) { _ui.setupUi(this); if(parent) { _ocWizard = qobject_cast<OwncloudWizard *>(parent); } registerField( QLatin1String("OCUser*"), _ui.leUsername); registerField( QLatin1String("OCPasswd*"), _ui.lePassword); Theme *theme = Theme::instance(); switch(theme->userIDType()) { case Theme::UserIDUserName: // default, handled in ui file break; case Theme::UserIDEmail: _ui.usernameLabel->setText(tr("&Email")); break; case Theme::UserIDCustom: _ui.usernameLabel->setText(theme->customUserID()); break; default: break; } _ui.leUsername->setPlaceholderText(theme->userIDHint()); setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(Theme::instance()->appNameGUI()))); setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Enter user credentials"))); _ui.resultLayout->addWidget( _progressIndi ); stopSpinner(); setupCustomization(); }
OwncloudSetupPage::OwncloudSetupPage(QWidget *parent) : QWizardPage(), _ui(), _oCUrl(), _ocUser(), _authTypeKnown(false), _checking(false), _authType(WizardCommon::HttpCreds), _progressIndi(new QProgressIndicator (this)) { _ui.setupUi(this); Theme *theme = Theme::instance(); setTitle(WizardCommon::titleTemplate().arg(tr("Connect to %1").arg(theme->appNameGUI()))); setSubTitle(WizardCommon::subTitleTemplate().arg(tr("Setup %1 server").arg(theme->appNameGUI()))); if (!theme->overrideServerUrl().isEmpty()) { _ui.leUrl->setEnabled(false); } registerField( QLatin1String("OCUrl*"), _ui.leUrl ); _ui.resultLayout->addWidget( _progressIndi ); stopSpinner(); setupCustomization(); slotUrlChanged(QLatin1String("")); // don't jitter UI connect(_ui.leUrl, SIGNAL(textChanged(QString)), SLOT(slotUrlChanged(QString))); connect(_ui.leUrl, SIGNAL(editingFinished()), SLOT(slotUrlEditFinished())); addCertDial = new AddCertificateDialog(this); _ocWizard = qobject_cast<OwncloudWizard *>(parent); connect(_ocWizard,SIGNAL(needCertificate()),this,SLOT(slotAskSSLClientCertificate())); }