|
Isis 3 Programmer Reference
|
Go to the documentation of this file.
25 #include <QCoreApplication>
27 #include <QFileDialog>
28 #include <QMessageBox>
29 #include <QStringList>
30 #include <QtConcurrentMap>
33 #include "CubeAttribute.h"
36 #include "ProgressBar.h"
52 QAction::setText(tr(
"&Open Project"));
54 QUndoCommand::setText(tr(
"Open Project"));
105 m_recentProject = recentProject;
128 QMessageBox *box =
new QMessageBox(QMessageBox::NoIcon, QString(
"Current Project Has Unsaved Changes"),
129 QString(
"Would you like to save your current project?"),
130 NULL, qobject_cast<QWidget *>(parent()), Qt::Dialog);
131 QPushButton *
save = box->addButton(
"Save", QMessageBox::AcceptRole);
132 QPushButton *dontsave = box->addButton(
"Don't Save", QMessageBox::RejectRole);
133 QPushButton *cancel = box->addButton(
"Cancel", QMessageBox::NoRole);
136 if (box->clickedButton() == (QAbstractButton*)cancel) {
139 else if (box->clickedButton() == (QAbstractButton*)dontsave) {
142 else if (box->clickedButton() == (QAbstractButton*)
save) {
149 if (
"Open Project" == toolTip()) {
150 m_projectPath = QFileDialog::getExistingDirectory(qobject_cast<QWidget *>(parent()),
151 tr(
"Select Project Directory"));
152 if (!m_projectPath.isEmpty()) {
153 QUndoCommand::setText(tr(
"Open Project [%1]").arg(m_projectPath));
160 m_projectPath = toolTip();
177 if (args.count() == 2) {
Saves a project to disk (File->Save Project...)
virtual bool setupExecution()
This sets up the state for the work order.
Provide Undo/redo abilities, serialization, and history for an operation.
void open(QString)
Open the project at the given path.
bool setupExecution()
Setup this WorkOrder for execution, deleting the progress bar, determine if there is a current projec...
File name manipulation and expansion.
bool fileExists() const
Returns true if the file exists; false otherwise.
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
bool isExecutable(QString projectFileName, bool recentProject=false)
This function determines if the given project file name can be opened.
OpenProjectWorkOrder(Project *project)
Constructs an OpenProjectWorkOrder.
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...
This opens a project that's saved on disk.
Project * project() const
Returns the Project this WorkOrder is attached to.
~OpenProjectWorkOrder()
Destructor.
void execute()
Open the chosen project folder.
ProgressBar * progressBar()
Returns the ProgressBar.
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
virtual OpenProjectWorkOrder * clone() const
Clones the current OpenProjectWorkOrder.
void setClean(bool value)
Function to change the clean state of the project.
This is free and unencumbered software released into the public domain.