Isis 3 Programmer Reference
SaveProjectWorkOrder.cpp
Go to the documentation of this file.
1
24
25#include <QDebug>
26#include <QFileDialog>
27#include <QMessageBox>
28#include <QtConcurrentMap>
29
30#include "Cube.h"
31#include "CubeAttribute.h"
32#include "FileName.h"
33#include "Project.h"
34
35namespace Isis {
36
45 WorkOrder(project) {
46 QAction::setText(tr("&Save Project"));
47 QUndoCommand::setText(tr("Save Project"));
48
50 }
51
52
63
64
70
71
80
81
96 bool success = WorkOrder::setupExecution();
97
98 if (success) {
99 // Check to save if the save dialog (for a temp project) completed
100 // (i.e. it was not cancelled)
101 success = project()->save();
102 if (success) {
103 project()->setClean(true);
104 }
105 }
106
107 return success;
108 }
109}
The main project for ipce.
Definition Project.h:289
void setClean(bool value)
Function to change the clean state of the project.
Definition Project.cpp:1594
bool save()
Generic save method to save the state of the project.
Definition Project.cpp:2323
Saves a project to disk (File->Save Project...)
SaveProjectWorkOrder(Project *project)
Constructor.
virtual SaveProjectWorkOrder * clone() const
Clones an existing SaveProjectWorkder and gives back a newly allocated copy of the work order.
bool setupExecution()
Sets up the work order.
Provide Undo/redo abilities, serialization, and history for an operation.
Definition WorkOrder.h:311
virtual bool setupExecution()
This sets up the state for the work order.
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
Project * project() const
Returns the Project this WorkOrder is attached to.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16