|
Isis 3 Programmer Reference
|
Go to the documentation of this file.
23 #include "ExportControlNetWorkOrder.h"
26 #include <QFileDialog>
27 #include <QInputDialog>
30 #include "ControlList.h"
31 #include "ControlNet.h"
33 #include "IException.h"
50 QAction::setText(tr(
"&Export Control Network..."));
51 QUndoCommand::setText(tr(
"Export Control Network..."));
103 return (controls->count() == 1);
134 if (controls.count() > 0) {
143 foreach (
Control *control, *list) {
144 cnetChoices[control] = tr(
"%1/%2").arg(list->
name())
152 QString choice = QInputDialog::getItem(NULL, tr(
"Select Control"),
153 tr(
"Please choose a control to export."), cnetNames, 0,
false, &success);
155 control = cnetChoices.key(choice);
161 QString destination =
162 QFileDialog::getSaveFileName(NULL, QString(
"Export Control Network"),
165 if (destination.isEmpty()) {
200 QString currentLocation = control->
fileName();
201 if (!QFile::copy(currentLocation, destination) ) {
bool isExecutable(ControlList *controls)
Determines if we can export a control net.
virtual void postExecution()
Display any warnings that occurred during the asynchronous computations.
virtual bool setupExecution()
This sets up the state for the work order.
This is free and unencumbered software released into the public domain.
Provide Undo/redo abilities, serialization, and history for an operation.
QString m_warning
Stores any errors that may have occurred during export.
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
File name manipulation and expansion.
Control * control(QString id)
Accessor for if the project is clearing or not.
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
virtual void execute()
Executes the work order.
This represents an ISIS control net in a project-based GUI interface.
bool m_isSynchronous
This is defaulted to true.
Write a project control network to a user-specified location.
The main project for ipce.
ExportControlNetWorkOrder(Project *project)
Creates a work order for exporting a control network from the project.
~ExportControlNetWorkOrder()
Destructor.
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
virtual void setData(Context)
Sets the context data for this WorkOrder.
virtual ExportControlNetWorkOrder * clone() const
Clones this work order.
QString displayName() const
Returns the display name.
Project * project() const
Returns the Project this WorkOrder is attached to.
QList< ControlList * > controls()
Return controls in project.
virtual bool setupExecution()
Prepares for exporting a control net by soliciting information from the user.
QString name() const
Get the human-readable name of this control list.
QStringList internalData() const
Gets the internal data for this WorkOrder.
This is free and unencumbered software released into the public domain.
ControlDisplayProperties * displayProperties()
Access a pointer to the display properties for the control network.
QString id() const
Access the unique ID associated with this Control.
This is free and unencumbered software released into the public domain.
QString fileName() const
Access the name of the control network file associated with this Control.