25 #include <QCoreApplication> 27 #include <QFileDialog> 28 #include <QMessageBox> 29 #include <QtConcurrentMap> 44 QAction::setText(tr(
"&Close Project"));
45 QUndoCommand::setText(tr(
"Close Project"));
91 if (success && !
project()->isClean()) {
92 QMessageBox *box =
new QMessageBox(QMessageBox::NoIcon,
93 QString(
"Current Project Has Unsaved Changes"),
94 QString(
"Would you like to save your current project?"),
95 NULL, qobject_cast<QWidget *>(parent()), Qt::Dialog);
96 QPushButton *
save = box->addButton(
"Save", QMessageBox::AcceptRole);
97 QPushButton *dontsave = box->addButton(
"Don't Save", QMessageBox::RejectRole);
98 QPushButton *cancel = box->addButton(
"Cancel", QMessageBox::NoRole);
101 if (box->clickedButton() == (QAbstractButton*)cancel) {
105 else if (box->clickedButton() == (QAbstractButton*)dontsave) {
109 else if (box->clickedButton() == (QAbstractButton*)
save) {
The main project for ipce.
virtual bool isExecutable()
This method will always return true.
virtual bool setupExecution()
This sets up the state for the work order.
This opens a project that's saved on disk.
CloseProjectWorkOrder(Project *project)
This method sets the text of the work order to Close Project and sets setCreatesCleanState to true...
void clear()
Function to clear out all values in a project essentially making it a new project object...
void addToProject(WorkOrder *)
This executes the WorkOrder and stores it in the project.
Provide Undo/redo abilities, serialization, and history for an operation.
virtual CloseProjectWorkOrder * clone() const
This method clones the CloseProjectWorkOrder.
bool setupExecution()
If WorkOrder::execute() returns true, then this method returns true.
void execute()
Clear the current Project
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
~CloseProjectWorkOrder()
Destructor.
Namespace for ISIS/Bullet specific routines.
Saves a project to disk (File->Save Project...)
Project * project() const
Returns the Project this WorkOrder is attached to.
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
void setClean(bool value)
Function to change the clean state of the project.