File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
 |
Isis 3 Programmer Reference
|
9 #include "CloseProjectWorkOrder.h"
11 #include <QCoreApplication>
13 #include <QFileDialog>
14 #include <QMessageBox>
15 #include <QtConcurrentMap>
30 QAction::setText(tr(
"&Close Project"));
31 QUndoCommand::setText(tr(
"Close Project"));
77 if (success && !
project()->isClean()) {
78 QMessageBox *box =
new QMessageBox(QMessageBox::NoIcon,
79 QString(
"Current Project Has Unsaved Changes"),
80 QString(
"Would you like to save your current project?"),
81 NULL, qobject_cast<QWidget *>(parent()), Qt::Dialog);
82 QPushButton *
save = box->addButton(
"Save", QMessageBox::AcceptRole);
83 QPushButton *dontsave = box->addButton(
"Don't Save", QMessageBox::RejectRole);
84 QPushButton *cancel = box->addButton(
"Cancel", QMessageBox::NoRole);
87 if (box->clickedButton() == (QAbstractButton*)cancel) {
91 else if (box->clickedButton() == (QAbstractButton*)dontsave) {
95 else if (box->clickedButton() == (QAbstractButton*)
save) {
Saves a project to disk (File->Save Project...)
~CloseProjectWorkOrder()
Destructor.
virtual bool setupExecution()
This sets up the state for the work order.
virtual CloseProjectWorkOrder * clone() const
This method clones the CloseProjectWorkOrder.
Provide Undo/redo abilities, serialization, and history for an operation.
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
void execute()
@description Clear the current Project
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
void clear()
Function to clear out all values in a project essentially making it a new project object.
This opens a project that's saved on disk.
The main project for ipce.
void addToProject(WorkOrder *)
This executes the WorkOrder and stores it in the project.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
virtual bool isExecutable()
This method will always return true.
Project * project() const
Returns the Project this WorkOrder is attached to.
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
CloseProjectWorkOrder(Project *project)
This method sets the text of the work order to Close Project and sets setCreatesCleanState to true.
void setClean(bool value)
Function to change the clean state of the project.
This is free and unencumbered software released into the public domain.
bool setupExecution()
If WorkOrder::execute() returns true, then this method returns true.