Commit d4c18621 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Wizards: Remove settings buttons.

As they do not look nice in the layouts and several
options pages are involved in the case of the form
class wizard.

Reviewed-by: con
Task-number: QTCREATORBUG-2778
parent 872f7eb4
......@@ -83,14 +83,7 @@ ClassNamePage::ClassNamePage(QWidget *parent) :
pageLayout->addWidget(m_newClassWidget);
QSpacerItem *vSpacer = new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::Expanding);
pageLayout->addItem(vSpacer);
QHBoxLayout *buttonLayout = new QHBoxLayout;
pageLayout->addLayout(buttonLayout);
QSpacerItem *hSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored);
buttonLayout->addItem(hSpacer);
QToolButton *settingsButton = new QToolButton;
settingsButton->setText(tr("Configure..."));
connect(settingsButton, SIGNAL(clicked()), this, SLOT(slotSettings()));
buttonLayout->addWidget(settingsButton);
initParameters();
}
......@@ -114,16 +107,6 @@ void ClassNamePage::initParameters()
m_newClassWidget->setLowerCaseFiles(lowerCaseFiles(core));
}
void ClassNamePage::slotSettings()
{
const QString id = QLatin1String(CppTools::Constants::CPP_SETTINGS_ID);
const QString cat = QLatin1String(CppTools::Constants::CPP_SETTINGS_CATEGORY);
if (Core::ICore::instance()->showOptionsDialog(cat, id, this)) {
initParameters();
m_newClassWidget->triggerUpdateFileNames();
}
}
void ClassNamePage::slotValidChanged()
{
const bool validNow = m_newClassWidget->isValid();
......
......@@ -57,7 +57,6 @@ public:
private slots:
void slotValidChanged();
void slotSettings();
private:
void initParameters();
......
......@@ -60,7 +60,6 @@ FormClassWizardPage::FormClassWizardPage(QWidget * parent) :
m_ui->newClassWidget->setClassTypeComboVisible(false);
connect(m_ui->newClassWidget, SIGNAL(validChanged()), this, SLOT(slotValidChanged()));
connect(m_ui->settingsToolButton, SIGNAL(clicked()), this, SLOT(slotSettings()));
initFileGenerationSettings();
}
......@@ -90,17 +89,6 @@ void FormClassWizardPage::initFileGenerationSettings()
m_ui->newClassWidget->setLowerCaseFiles(lowercaseHeaderFiles());
}
// Pop up settings dialog for generation settings
void FormClassWizardPage::slotSettings()
{
const QString id = QLatin1String(CppTools::Constants::CPP_SETTINGS_ID);
const QString cat = QLatin1String(CppTools::Constants::CPP_SETTINGS_CATEGORY);
if (Core::ICore::instance()->showOptionsDialog(cat, id, this)) {
initFileGenerationSettings();
m_ui->newClassWidget->triggerUpdateFileNames();
}
}
void FormClassWizardPage::setClassName(const QString &suggestedClassName)
{
// Is it valid, now?
......
......@@ -68,7 +68,6 @@ public:
public slots:
void setClassName(const QString &suggestedClassName);
void setPath(const QString &);
void slotSettings();
private slots:
void slotValidChanged();
......
......@@ -2,14 +2,6 @@
<ui version="4.0">
<class>Designer::Internal::FormClassWizardPage</class>
<widget class="QWizardPage" name="Designer::Internal::FormClassWizardPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>542</width>
<height>267</height>
</rect>
</property>
<property name="title">
<string>Choose a Class Name</string>
</property>
......@@ -21,35 +13,11 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="Utils::NewClassWidget" name="newClassWidget" native="true"/>
<widget class="Utils::NewClassWidget" name="newClassWidget"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="settingsToolButton">
<property name="text">
<string>Configure...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment