Add validation to the new project wizard

This commit is contained in:
2017-04-20 18:35:14 -05:00
parent 681eb55db3
commit 9730ef773e
6 changed files with 237 additions and 63 deletions
+3 -6
View File
@@ -6,7 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <iostream>
#include <QApplication>
#include <QDesktopWidget>
#include <QDialog>
@@ -20,8 +19,6 @@
namespace nostalgia {
namespace studio {
using namespace std;
MainWindow::MainWindow(NostalgiaStudioProfile config, QWidget *parent) {
auto screenSize = QApplication::desktop()->screenGeometry();
@@ -93,9 +90,9 @@ void MainWindow::showNewWizard() {
auto ws = new WizardSelect();
wizard.addPage(ws);
ws->addOption(tr("Project"), []() {
auto pg = new Wizard::FormPage();
pg->addLineEdit(tr("Project &Name"), "projectName");
pg->addFileBrowse(tr("Project &Path"), "projectPath");
auto pg = new WizardFormPage();
pg->addLineEdit(tr("Project &Name:"), "projectName*");
pg->addDirBrowse(tr("Project &Path:"), "projectPath*");
return pg;
}
);