Isis 3 Programmer Reference
SaveProjectWorkOrder.cpp
Go to the documentation of this file.
1 
23 #include "SaveProjectWorkOrder.h"
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 
35 namespace Isis {
36 
45  WorkOrder(project) {
46  QAction::setText(tr("&Save Project"));
47  QUndoCommand::setText(tr("Save Project"));
48 
50  }
51 
52 
61  WorkOrder(other) {
62  }
63 
64 
69  }
70 
71 
78  return new SaveProjectWorkOrder(*this);
79  }
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
virtual bool setupExecution()
This sets up the state for the work order.
Definition: WorkOrder.cpp:1275
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:322
bool save()
Generic save method to save the state of the project.
Definition: Project.cpp:2324
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
SaveProjectWorkOrder(Project *project)
Constructor.
bool setupExecution()
Sets up the work order.
Saves a project to disk (File->Save Project...)
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1314
virtual SaveProjectWorkOrder * clone() const
Clones an existing SaveProjectWorkder and gives back a newly allocated copy of the work order...
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
Definition: WorkOrder.cpp:1677
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595