61 lines
1.0 KiB
C++
61 lines
1.0 KiB
C++
#include <QTimer>
|
|
#include <ui/welcome/welcomedialog.h>
|
|
|
|
#include "mainwindow.h"
|
|
#include "ui_mainwindow.h"
|
|
|
|
namespace Ember
|
|
{
|
|
|
|
MainWindow::MainWindow(ProjectManager* projectManager, QWidget *parent) :
|
|
QMainWindow(parent),
|
|
m_projectManager(projectManager)
|
|
{
|
|
setupUi();
|
|
setupActions();
|
|
QTimer::singleShot(0, this, &MainWindow::showWelcomeDialog);
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
}
|
|
|
|
void MainWindow::setupUi()
|
|
{
|
|
QWidget* central = new QWidget();
|
|
setCentralWidget(central);
|
|
}
|
|
|
|
void MainWindow::setupActions()
|
|
{
|
|
}
|
|
|
|
void MainWindow::showWelcomeDialog()
|
|
{
|
|
WelcomeDialog dialog(m_projectManager, this);
|
|
if (dialog.exec() == QDialog::Accepted)
|
|
{
|
|
switch(dialog.resultAction())
|
|
{
|
|
case WelcomeDialog::NEW_PROJECT:
|
|
newProject();
|
|
break;
|
|
|
|
case WelcomeDialog::OPEN_PROJECT:
|
|
openProject(dialog.openPath());
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
void MainWindow::newProject()
|
|
{
|
|
}
|
|
|
|
void MainWindow::openProject(boost::filesystem::path path)
|
|
{
|
|
}
|
|
|
|
|
|
}
|