data: saving for projectsettings
<description>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ public slots:
|
||||
void find();
|
||||
void closeWindow();
|
||||
void refresh();
|
||||
void saveProject();
|
||||
void saveAsProject();
|
||||
|
||||
private:
|
||||
void setupProjectMenu();
|
||||
|
||||
Reference in New Issue
Block a user