Isis 3.0 Programmer Reference
Back | Home
CloseProjectWorkOrder.cpp
Go to the documentation of this file.
1 
23 #include "CloseProjectWorkOrder.h"
24 
25 #include <QCoreApplication>
26 #include <QDebug>
27 #include <QMessageBox>
28 #include <QtConcurrentMap>
29 
30 #include "Project.h"
31 
32 namespace Isis {
33 
41  WorkOrder(project) {
42  QAction::setText(tr("&Close Project"));
43 
45  }
46 
51  WorkOrder(other) {
52  }
53 
58 
59  }
60 
67  return new CloseProjectWorkOrder(*this);
68  }
69 
76 // return (project());
77  return true;
78  }
79 
86  bool success = WorkOrder::execute();
87 
88 // // If more than this work order is in the history, don't allow this operation
89 // if (success && project()->workOrderHistory().count()) {
90 // QMessageBox::critical(NULL, tr("Unable To Open a Project"),
91 // tr("If you have modified your current project, you cannot open a new"
92 // " project because this is not yet implemented"));
93 // success = false;
94 // }
95 // else if (success) {
96 // QString projectName = QFileDialog::getExistingDirectory(qobject_cast<QWidget *>(parent()),
97 // tr("Open Project"));
98 
99 // if (!projectName.isEmpty()) {
100 // project()->open(projectName);
101 // }
102 // else {
103 // success = false;
104 // }
105 // }
106 
107  return success;
108  }
109 }
The main project for cnetsuite.
Definition: Project.h:105
bool execute()
If WorkOrder::execute() returns true, then this method returns true.
virtual bool isExecutable()
This method will always return true.
virtual CloseProjectWorkOrder * clone() const
This method clones the CloseProjectWorkOrder.
This opens a project that&#39;s saved on disk.
CloseProjectWorkOrder(Project *project)
This method sets the text of the work order to Close Project and sets setCreatesCleanState to true...
Parent class for anything that performs an action in Project.
Definition: WorkOrder.h:104
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
Definition: WorkOrder.cpp:1078
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
Definition: WorkOrder.cpp:1520

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:15:59