diff --git a/src/main.cpp b/src/main.cpp
index 8d2a7902..05f46d4f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,7 +17,7 @@
along with Bipolar. If not, see .
*/
-#include "mainwindow.h"
+#include "mainwizard.h"
#include "os/versioninfo.h"
#ifdef Q_OS_WIN
@@ -36,15 +36,6 @@
#define ORGANISATION_NAME QLatin1String("Paul Colby")
#define ORGANISATION_DOMAIN QLatin1String("bipolar.colby.id.au")
-MainWindow * mainWindow = NULL;
-
-void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
-{
- if (mainWindow) {
- mainWindow->logMessage(type, context, msg);
- }
-}
-
int main(int argc, char *argv[]) {
// Setup the primary Qt application object.
QApplication app(argc, argv);
@@ -57,8 +48,8 @@ int main(int argc, char *argv[]) {
}
// Install the QErrorMessage class' Qt message handler.
- //QErrorMessage::qtHandler();
- qInstallMessageHandler(messageHandler);
+ QErrorMessage::qtHandler();
+ //qInstallMessageHandler(messageHandler);
// Try to load a localised translator.
QTranslator translator;
@@ -94,9 +85,7 @@ int main(int argc, char *argv[]) {
#endif
// Instantiate the main window.
- mainWindow = new MainWindow;
- qDebug() << QApplication::applicationName() << QApplication::applicationVersion()
- << versionInfo.fileInfo(QLatin1String("SpecialBuild"));
- mainWindow->show();
+ MainWizard mainWizard;
+ mainWizard.show();
return app.exec();
}
diff --git a/src/widgets/inputspage.cpp b/src/widgets/inputspage.cpp
new file mode 100644
index 00000000..da0d6b5b
--- /dev/null
+++ b/src/widgets/inputspage.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright 2014 Paul Colby
+
+ This file is part of Bipolar.
+
+ Bipolar is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Biplar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bipolar. If not, see .
+*/
+
+#include "inputspage.h"
+#include
+
+InputsPage::InputsPage(QWidget *parent) : QWizardPage(parent) {
+ setTitle(tr("Select Input Paths"));
+ setSubTitle(tr("Select the path(s) containing training sessions to convert."));
+
+ setLayout(new QVBoxLayout());
+}
+
+//bool InputPage::isComplete() const {
+//}
diff --git a/src/widgets/inputspage.h b/src/widgets/inputspage.h
new file mode 100644
index 00000000..e316cbe6
--- /dev/null
+++ b/src/widgets/inputspage.h
@@ -0,0 +1,34 @@
+/*
+ Copyright 2014 Paul Colby
+
+ This file is part of Bipolar.
+
+ Bipolar is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Biplar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bipolar. If not, see .
+*/
+
+#ifndef __INPUTS_PAGE__
+#define __INPUTS_PAGE__
+
+#include
+
+class InputsPage : public QWizardPage {
+ Q_OBJECT
+
+public:
+ InputsPage(QWidget *parent=0);
+ //virtual bool isComplete() const;
+
+};
+
+#endif // __INPUTS_PAGE__
diff --git a/src/widgets/mainwizard.cpp b/src/widgets/mainwizard.cpp
new file mode 100644
index 00000000..de1097c1
--- /dev/null
+++ b/src/widgets/mainwizard.cpp
@@ -0,0 +1,34 @@
+/*
+ Copyright 2014 Paul Colby
+
+ This file is part of Bipolar.
+
+ Bipolar is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Biplar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bipolar. If not, see .
+*/
+
+#include "mainwizard.h"
+#include "inputspage.h"
+#include "outputspage.h"
+#include
+
+MainWizard::MainWizard(QWidget *parent, Qt::WindowFlags flags): QWizard(parent,flags) {
+ setWindowTitle(tr("%1 %2")
+ .arg(QApplication::applicationName())
+ .arg(QStringList(QApplication::applicationVersion().split(QLatin1Char('.')).mid(0, 3)).join(QLatin1Char('.'))));
+
+ addPage(new InputsPage());
+ addPage(new OutputsPage());
+
+ setButtonText(FinishButton, tr("Convert"));
+}
diff --git a/src/widgets/mainwizard.h b/src/widgets/mainwizard.h
new file mode 100644
index 00000000..c574b2bb
--- /dev/null
+++ b/src/widgets/mainwizard.h
@@ -0,0 +1,33 @@
+/*
+ Copyright 2014 Paul Colby
+
+ This file is part of Bipolar.
+
+ Bipolar is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Biplar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bipolar. If not, see .
+*/
+
+#ifndef __MAIN_WIZARD__
+#define __MAIN_WIZARD__
+
+#include
+
+class MainWizard : public QWizard {
+ Q_OBJECT
+
+public:
+ MainWizard(QWidget *parent=0, Qt::WindowFlags flags=0);
+
+};
+
+#endif // __MAIN_WIZARD__
diff --git a/src/widgets/outputspage.cpp b/src/widgets/outputspage.cpp
new file mode 100644
index 00000000..f85afe9f
--- /dev/null
+++ b/src/widgets/outputspage.cpp
@@ -0,0 +1,31 @@
+/*
+ Copyright 2014 Paul Colby
+
+ This file is part of Bipolar.
+
+ Bipolar is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Biplar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bipolar. If not, see .
+*/
+
+#include "outputspage.h"
+#include
+
+OutputsPage::OutputsPage(QWidget *parent) : QWizardPage(parent) {
+ setTitle(tr("Select Output Paths"));
+ setSubTitle(tr("Select the blah blah blah."));
+
+ setLayout(new QVBoxLayout());
+}
+
+//bool InputPage::isComplete() const {
+//}
diff --git a/src/widgets/outputspage.h b/src/widgets/outputspage.h
new file mode 100644
index 00000000..6cb1745c
--- /dev/null
+++ b/src/widgets/outputspage.h
@@ -0,0 +1,34 @@
+/*
+ Copyright 2014 Paul Colby
+
+ This file is part of Bipolar.
+
+ Bipolar is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Biplar is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bipolar. If not, see .
+*/
+
+#ifndef __OUTPUTS_PAGE__
+#define __OUTPUTS_PAGE__
+
+#include
+
+class OutputsPage : public QWizardPage {
+ Q_OBJECT
+
+public:
+ OutputsPage(QWidget *parent=0);
+ //virtual bool isComplete() const;
+
+};
+
+#endif // __OUTPUTS_PAGE__
diff --git a/src/widgets/widgets.pri b/src/widgets/widgets.pri
index c03f3249..2b8b063f 100644
--- a/src/widgets/widgets.pri
+++ b/src/widgets/widgets.pri
@@ -1,4 +1,4 @@
INCLUDEPATH += $$PWD
VPATH += $$PWD
-HEADERS += mainwindow.h
-SOURCES += mainwindow.cpp
+HEADERS += inputspage.h mainwizard.h outputspage.h
+SOURCES += inputspage.cpp mainwizard.cpp outputspage.cpp