| 18 | #include "projectvcspage.h" |
| 19 | |
| 20 | AppWizardDialog::AppWizardDialog(KDevelop::IPluginController* pluginController, ProjectTemplatesModel* templatesModel, QWidget *parent) |
| 21 | : KAssistantDialog(parent) |
| 22 | { |
| 23 | setWindowTitle(i18nc("@title:window", "Create New Project")); |
| 24 | |
| 25 | // KAssistantDialog creates a help button by default, no option to prevent that |
| 26 | QPushButton *helpButton = button(QDialogButtonBox::Help); |
| 27 | if (helpButton) { |
| 28 | buttonBox()->removeButton(helpButton); |
| 29 | delete helpButton; |
| 30 | } |
| 31 | |
| 32 | m_selectionPage = new ProjectSelectionPage(templatesModel, this); |
| 33 | m_vcsPage = new ProjectVcsPage( pluginController, this ); |
| 34 | m_vcsPage->setSourceLocation( m_selectionPage->location() ); |
| 35 | connect( m_selectionPage, &ProjectSelectionPage::locationChanged, |
| 36 | m_vcsPage, &ProjectVcsPage::setSourceLocation ); |
| 37 | m_pageItems[m_selectionPage] = addPage(m_selectionPage, i18nc("@title:tab Page for general configuration options", "General")); |
| 38 | |
| 39 | m_pageItems[m_vcsPage] = addPage(m_vcsPage, i18nc("@title:tab Page for version control options", "Version Control") ); |
| 40 | |
| 41 | setValid( m_pageItems[m_selectionPage], false ); |
| 42 | |
| 43 | connect(m_selectionPage, &ProjectSelectionPage::invalid, this, [this]() { pageInValid(m_selectionPage); }); |
| 44 | connect(m_vcsPage, &ProjectVcsPage::invalid, this, [this]() { pageInValid(m_vcsPage); }); |
| 45 | connect(m_selectionPage, &ProjectSelectionPage::valid, this, [this]() { pageValid(m_selectionPage); }); |
| 46 | connect(m_vcsPage, &ProjectVcsPage::valid, this, [this]() { pageValid(m_vcsPage); }); |
| 47 | } |
| 48 | |
| 49 | ApplicationInfo AppWizardDialog::appInfo() const |
| 50 | { |
nothing calls this directly
no test coverage detected