ProjectIntroPage::ProjectIntroPage(QWidget *parent) : WizardPage(parent), d(new ProjectIntroPagePrivate) { d->m_ui.setupUi(this); hideStatusLabel(); d->m_ui.nameLineEdit->setInitialText(tr("<Enter_Name>")); d->m_ui.nameLineEdit->setFocus(); d->m_ui.nameLineEdit->setValidationFunction([this](FancyLineEdit *edit, QString *errorString) { return validateProjectName(edit->text(), errorString); }); d->m_ui.projectLabel->setVisible(d->m_forceSubProject); d->m_ui.projectComboBox->setVisible(d->m_forceSubProject); d->m_ui.pathChooser->setDisabled(d->m_forceSubProject); d->m_ui.projectsDirectoryCheckBox->setDisabled(d->m_forceSubProject); connect(d->m_ui.pathChooser, &PathChooser::pathChanged, this, &ProjectIntroPage::slotChanged); connect(d->m_ui.nameLineEdit, &QLineEdit::textChanged, this, &ProjectIntroPage::slotChanged); connect(d->m_ui.pathChooser, &PathChooser::validChanged, this, &ProjectIntroPage::slotChanged); connect(d->m_ui.pathChooser, &PathChooser::returnPressed, this, &ProjectIntroPage::slotActivated); connect(d->m_ui.nameLineEdit, &FancyLineEdit::validReturnPressed, this, &ProjectIntroPage::slotActivated); connect(d->m_ui.projectComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &ProjectIntroPage::slotChanged); setProperty(SHORT_TITLE_PROPERTY, tr("Location")); registerFieldWithName(QLatin1String("Path"), d->m_ui.pathChooser, "path", SIGNAL(pathChanged(QString))); registerFieldWithName(QLatin1String("ProjectName"), d->m_ui.nameLineEdit); }
FileWizardPage::FileWizardPage(QWidget *parent) : WizardPage(parent), d(new FileWizardPagePrivate) { d->m_ui.setupUi(this); connect(d->m_ui.pathChooser, SIGNAL(validChanged()), this, SLOT(slotValidChanged())); connect(d->m_ui.nameLineEdit, SIGNAL(validChanged()), this, SLOT(slotValidChanged())); connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated())); connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated())); setProperty(SHORT_TITLE_PROPERTY, tr("Location")); registerFieldWithName(QLatin1String("Path"), d->m_ui.pathChooser, "path", SIGNAL(pathChanged(QString))); registerFieldWithName(QLatin1String("FileName"), d->m_ui.nameLineEdit); }