data: saving for projectsettings

<description>
This commit is contained in:
Andreas Stallinger
2014-11-03 16:34:42 +01:00
parent 38d9ec07a5
commit 3441b6a8f4
7 changed files with 92 additions and 1 deletions
+19
View File
@@ -14,6 +14,7 @@
#include "utility/messaging/type/MessageLoadProject.h"
#include "utility/messaging/type/MessageLoadSource.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageSaveProject.h"
QtMainWindow::QtMainWindow()
{
@@ -71,6 +72,22 @@ void QtMainWindow::openProject(const QString &path)
}
}
void QtMainWindow::saveProject()
{
MessageSaveProject("").dispatch();
}
void QtMainWindow::saveAsProject()
{
QString filename = "";
filename = QFileDialog::getSaveFileName(this, "Save File as", "", "XML Files(*.xml)");
if(!filename.isEmpty())
{
MessageSaveProject(filename.toStdString()).dispatch();
}
}
void QtMainWindow::find()
{
MessageFind().dispatch();
@@ -184,6 +201,8 @@ void QtMainWindow::setupProjectMenu()
menu->addAction(tr("&New"), this, SLOT(newProject()), QKeySequence::New);
menu->addAction(tr("&Open..."), this, SLOT(openProject()), QKeySequence::Open);
menu->addAction(tr("&Save"), this, SLOT(saveProject()), QKeySequence::Save);
menu->addAction(tr("Save as"), this, SLOT(saveAsProject()), QKeySequence::SaveAs);
menu->addAction(tr("E&xit"), QCoreApplication::instance(), SLOT(quit()), QKeySequence::Quit);
}
+2
View File
@@ -33,6 +33,8 @@ public slots:
void find();
void closeWindow();
void refresh();
void saveProject();
void saveAsProject();
private:
void setupProjectMenu();