void OwncloudSetupPage::initializePage()
{
    WizardCommon::initErrorLabel(_ui.errorLabel);

    _authTypeKnown = false;
    _checking  = false;

    QAbstractButton *nextButton = wizard()->button(QWizard::NextButton);
    QPushButton *pushButton = qobject_cast<QPushButton*>(nextButton);
    if (pushButton)
        pushButton->setDefault(true);

    // If url is overriden by theme, it's already set and
    // we just check the server type and switch to second page
    // immediately.
    if (Theme::instance()->overrideServerUrl().isEmpty()) {
        _ui.leUrl->setFocus();
    } else {
        setCommitPage(true);
        validatePage();
        setVisible(false);
        // because the wizard will call show on us right after this call, we need to hide in the
        // next event loop iteration.
        QTimer::singleShot(0, this, SLOT(hide()));
    }
}
void OwncloudSetupPage::initializePage()
{
    WizardCommon::initErrorLabel(_ui.errorLabel);

    _authTypeKnown = false;
    _checking  = false;

    QAbstractButton *nextButton = wizard()->button(QWizard::NextButton);
    QPushButton *pushButton = qobject_cast<QPushButton*>(nextButton);
    if (pushButton)
        pushButton->setDefault(true);

    // If url is overriden by theme, it's already set and
    // we just check the server type and switch to second page
    // immediately.
    if (Theme::instance()->overrideServerUrl().isEmpty()) {
        _ui.leUrl->setFocus();
    } else {
        setCommitPage(true);
        // Hack: setCommitPage() changes caption, but after an error this page could still be visible
        setButtonText(QWizard::CommitButton, tr("&Next >"));
        validatePage();
        setVisible(false);
    }
}
/**
 * Slot for the generate button. Starts the code generation.
 */
void CodeGenStatusPage::generateCode()
{
    ui_pushButtonGenerate->setEnabled(false);
    setCommitPage(true);  //:TODO: disable back and cancel button ?

    CodeGenerator* codeGenerator = UMLApp::app()->generator();
    UMLDoc* doc = UMLApp::app()->document();

    if (codeGenerator) {
        connect(codeGenerator, SIGNAL(codeGenerated(UMLClassifier*,bool)),
                this, SLOT(classGenerated(UMLClassifier*,bool)));
        connect(codeGenerator, SIGNAL(showGeneratedFile(QString)),
                this, SLOT(showFileGenerated(QString)));

        UMLClassifierList cList;

        for (int row = 0; row < ui_tableWidgetStatus->rowCount(); ++row) {
            QTableWidgetItem* item = ui_tableWidgetStatus->item(row, 0);
            UMLClassifier *concept = doc->findUMLClassifier(item->text());
            if (concept == NULL) {
                uError() << "Could not find classifier " << item->text()
                         << " - not included in generated code.";
                continue;
            }
            cList.append(concept);
        }
        codeGenerator->writeCodeToFile(cList);

        m_generationDone = true;
        setFinalPage(true);
        emit completeChanged();
    }
}
Beispiel #4
0
PHIWizardCommit::PHIWizardCommit( QWidget *parent )
    : QWizardPage( parent )
{
    qDebug( "PHIWizardCommit::PHIWizardCommit()" );
    setupUi( this );
    setCommitPage( true );
    setButtonText( QWizard::CommitButton, tr( "Install" ) );
}
ImportHistoryPage::ImportHistoryPage(HistoryManagerWindow *parent) :
    QWizardPage(parent),
    m_ui(new Ui::ImportHistoryPage)
{
	m_parent = parent;
    m_ui->setupUi(this);
	setTitle(tr("Loading"));
	connect(m_parent, SIGNAL(maxValueChanged(int)), m_ui->progressBar, SLOT(setMaximum(int)));
	connect(m_parent, SIGNAL(valueChanged(int)), m_ui->progressBar, SLOT(setValue(int)));
	m_helper = new ImportHistoryPageHepler(this);
	connect(m_helper, SIGNAL(finished()), this, SLOT(completed()));
	setCommitPage(true);
	setButtonText(QWizard::CommitButton, m_parent->nextStr());
}
void OtrPeerIdentityVerificationSharedSecretPage::createGui()
{
	setButtonText(QWizard::CommitButton, tr("Ask for Shared Secret"));
	setCommitPage(true);
	setTitle(tr("Shared Secret"));

	QVBoxLayout *layout = new QVBoxLayout(this);

	QLineEdit *sharedSecretEdit = new QLineEdit();

	layout->addWidget(new QLabel(tr("Shared Secret that is known only for you and %1:").arg(MyContact.display(true))));
	layout->addWidget(sharedSecretEdit);

	registerField("sharedSecret*", sharedSecretEdit);
}
Beispiel #7
0
OAuthFirstPage::OAuthFirstPage(QWidget* parent) :
  QWizardPage(parent)
{
  setTitle(tr("Welcome to Pumpa!"));

  QVBoxLayout* layout = new QVBoxLayout(this);

  QLabel* infoLabel = 
    new QLabel(tr("<p>In order to use pump.io you need to first register an "
                  "account with a pump.io server. If you haven't done this yet "
                  "you can do it now by trying out one of the existing public "
                  "servers: <br /><a href=\"http://pump.io/tryit.html\">"
                  "http://pump.io/tryit.html</a>.</p>"
                  "<p>When you are done enter your new pump.io account id "
                  "below in the form of <b>username@servername</b>.</p>"),
               this);
  infoLabel->setOpenExternalLinks(true);
  infoLabel->setTextInteractionFlags(Qt::TextSelectableByMouse |
                                     Qt::LinksAccessibleByMouse);
  infoLabel->setWordWrap(true);
  layout->addWidget(infoLabel);
  layout->addStretch();

  m_messageLabel = new QLabel(this);
  layout->addWidget(m_messageLabel);

  QLabel* accountIdLabel =
    new QLabel(tr("<b>Your pump.io account id:</b>"), this);
  QLineEdit* accountIdEdit = new QLineEdit(EXAMPLE_ACCOUNT_ID, this);
  accountIdLabel->setBuddy(accountIdEdit);
  connect(accountIdEdit, SIGNAL(textEdited(const QString&)),
          this, SIGNAL(completeChanged()));

  QCheckBox* sslCheckBox =
    new QCheckBox(tr("Use secure connection (recommended)"), this);
  sslCheckBox->setChecked(true);

  layout->addWidget(accountIdLabel);
  layout->addWidget(accountIdEdit);
  layout->addWidget(sslCheckBox);

  registerField("accountId*", accountIdEdit);
  registerField("useSsl*", sslCheckBox);

  setButtonText(QWizard::CommitButton, tr("Next"));
  setCommitPage(true);
  setLayout(layout);
}
Beispiel #8
0
ConfigPackagePage::ConfigPackagePage(GeneratorWindow *parent) :
	QWizardPage(parent),
	m_ui(new Ui::ConfigPackagePage)
{
	m_ui->setupUi(this);
	registerField("name*", m_ui->nameLineEdit);
	registerField("type*", m_ui->typeLineEdit);
	registerField("version*", m_ui->versionLineEdit);
	registerField("category", m_ui->categoryComboBox);
	registerField("shortdesc", m_ui->shortDescLineEdit);
	registerField("url*", m_ui->urlLineEdit);
	registerField("author", m_ui->authorLineEdit);
	registerField("license", m_ui->licenseLineEdit);
	registerField("platform", m_ui->platformLineEdit);
	registerField("package", m_ui->packageNameLineEdit);
	setCommitPage(true);
	m_parent = parent;
}
AMScanDatabaseImportWizardReviewSamplesPage::AMScanDatabaseImportWizardReviewSamplesPage(AMScanDatabaseImportController *controller, QWidget *parent) : QWizardPage(parent)
{
	controller_ = controller;

	progressBar_ = new QProgressBar();
	progressBar_->setRange(0, 100);
	progressBar_->setOrientation(Qt::Horizontal);
	progressLabel_ = new QLabel();

	setTitle("Review Samples");

	itemsFoundList_ = new QListWidget();
	itemsToMergeList_ = new QListWidget();
	QGroupBox* gb1 = new QGroupBox("Samples found");
	QGroupBox* gb2 = new QGroupBox("Already in your library\n(Check to keep separate)");
	gb1->setLayout(new QVBoxLayout());
	gb1->layout()->addWidget(itemsFoundList_);
	gb2->setLayout(new QVBoxLayout());
	gb2->layout()->addWidget(itemsToMergeList_);

	QHBoxLayout* hl = new QHBoxLayout();
	hl->addWidget(gb1);
	hl->addWidget(gb2);

	QHBoxLayout* hl2 = new QHBoxLayout();
	hl2->addWidget(progressLabel_);
	hl2->addWidget(progressBar_);


	QVBoxLayout* vl = new QVBoxLayout();
	vl->addWidget(new QLabel("These are the samples we found in the bundle.\n\nAny samples that are already in your library are shown on the right and will be merged automatically. \nIf you want to keep these separate instead, check the 'Keep Separate' box and a new sample will be added.\n"));
	vl->addLayout(hl);
	vl->addStretch();
	vl->addLayout(hl2);

	setLayout(vl);
	setMinimumHeight(400);

	connect(controller_, SIGNAL(stepProgress(int)), progressBar_, SLOT(setValue(int)));
	connect(controller_, SIGNAL(progressDescription(QString)), progressLabel_, SLOT(setText(QString)));

	setCommitPage(true);
}
void OtrPeerIdentityVerificationQuestionAndAnswerPage::createGui()
{
	setButtonText(QWizard::CommitButton, tr("Ask Question"));
	setCommitPage(true);
	setTitle(tr("Question and Answer"));

	QVBoxLayout *layout = new QVBoxLayout(this);

	QLineEdit *questionEdit = new QLineEdit();
	QLineEdit *answerEdit = new QLineEdit();

	layout->addWidget(new QLabel(tr("Question that only %1 can answer:").arg(MyContact.display(1))));
	layout->addWidget(questionEdit);
	layout->addWidget(new QLabel(tr("Answer:")));
	layout->addWidget(answerEdit);

	registerField("question*", questionEdit);
	registerField("answer*", answerEdit);
}
CandidateIndexesPage::CandidateIndexesPage(QWidget *parent) :
    QWizardPage(parent), generator(nullptr)
{
    setupUi(this);
    setCommitPage(true);
}