25 #include <QCoreApplication>
27 #include <QFileDialog>
28 #include <QMessageBox>
29 #include <QtConcurrentMap>
33 #include "ProgressBar.h"
46 QAction::setText(tr(
"&Open Project"));
52 if (args.count() == 2) {
102 if (success &&
project()->workOrderHistory().count()) {
103 QMessageBox::critical(NULL, tr(
"Unable To Open a Project"),
104 tr(
"If you have modified your current project, you cannot open a new "
105 "project because this is not yet implemented"));
109 QString projectName = QFileDialog::getExistingDirectory(qobject_cast<QWidget *>(parent()),
112 if (!projectName.isEmpty()) {
The main project for cnetsuite.
void open(QString)
Open the project at the given path.
Project * project() const
Returns the Project this WorkOrder is attached to.
virtual OpenProjectWorkOrder * clone() const
Clones the current OpenProjectWorkOrder.
bool execute()
Executes the OpenProjectWorkOrder.
Parent class for anything that performs an action in Project.
~OpenProjectWorkOrder()
Destructor.
OpenProjectWorkOrder(Project *project)
Constructs an OpenProjectWorkOrder.
This opens a project that's saved on disk.
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
ProgressBar * progressBar()
Returns the ProgressBar.
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.