Isis 3.0
| Home |
Parent class for anything that performs an action in Project. More...
#include <WorkOrder.h>
Inherits QAction, and QUndoCommand.
Inherited by Isis::CloseProjectWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::CubeDnViewWorkOrder, Isis::ExportControlNetWorkOrder, Isis::ExportImagesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::ImageListActionWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ImportImagesWorkOrder, Isis::ImportShapesWorkOrder, Isis::JigsawWorkOrder, Isis::MatrixViewWorkOrder, Isis::MosaicSceneWorkOrder, Isis::OpenProjectWorkOrder, Isis::OpenRecentProjectWorkOrder, Isis::RemoveImagesWorkOrder, Isis::RenameProjectWorkOrder, Isis::SaveProjectAsWorkOrder, Isis::SaveProjectWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::SetActiveControlWorkOrder, Isis::SetActiveImageListWorkOrder, Isis::TargetGetInfoWorkOrder, and Isis::ViewControlNet3DWorkOrder.
Public Types | |
enum | WorkOrderStatus { WorkOrderUnknownStatus = 0, WorkOrderNotStarted, WorkOrderRedoing, WorkOrderRedone, WorkOrderUndoing, WorkOrderUndone, WorkOrderFinished, WorkOrderLastStatus = WorkOrderFinished } |
This enumeration is used by other functions to set and retrieve the current state of the WorkOrder. More... | |
enum | Context { NoContext, ProjectContext } |
This enumeration is for recording the context of the current Workorder (whether it is part of a project or not). More... | |
Public Slots | |
virtual bool | execute () |
The (child) implementation of this method should prompt the user/gather state by any means necessary. More... | |
virtual void | redo () |
Starts (or enqueues) a redo. More... | |
virtual void | undo () |
Starts (or enqueues) an undo. More... | |
Signals | |
void | creatingProgress (WorkOrder *) |
void | deletingProgress (WorkOrder *) |
void | finished (WorkOrder *) |
void | statusChanged (WorkOrder *) |
Public Member Functions | |
WorkOrder (Project *project) | |
Create a work order that will work with the given project. More... | |
virtual | ~WorkOrder () |
The Destructor. More... | |
virtual WorkOrder * | clone () const =0 |
virtual bool | isExecutable (Context) |
Re-implement this method if your work order utilizes controls for data in order to operate. More... | |
virtual bool | isExecutable (ImageList *images) |
Re-implement this method if your work order utilizes images for data in order to operate. More... | |
virtual bool | isExecutable (ShapeList *shapes) |
Re-implement this method if your work order utilizes shapes for data in order to operate. More... | |
virtual bool | isExecutable (ControlList *controls) |
Re-implement this method if your work order utilizes a control for data in order to operate. More... | |
virtual bool | isExecutable (CorrelationMatrix) |
virtual bool | isExecutable (TargetBodyQsp targetBody) |
Re-implement this method if your work order utilizes a control list (a list of control networks) for data in order to operate. More... | |
virtual bool | isExecutable (GuiCameraQsp guiCamera) |
Re-implement this method if your WorkOrder utilizes GuiCameraQsp (a QSharedPointer to a GuiCamera object) for data in order to operate. More... | |
virtual bool | isExecutable (ProjectItem *item) |
Determines if the WorkOrder is execuatable on the data stored in a ProjectItem. More... | |
void | read (XmlStackedHandlerReader *xmlReader) |
Read this work order's data from disk. More... | |
void | save (QXmlStreamWriter &stream) const |
: Saves a WorkOrder to a data stream. More... | |
virtual void | setData (Context) |
Sets the context data for this WorkOrder. More... | |
virtual void | setData (ImageList *images) |
Sets the ImageList data for this WorkOrder. More... | |
virtual void | setData (ShapeList *shapes) |
Sets the ShapeList data for this WorkOrder. More... | |
virtual void | setData (ControlList *controls) |
Sets the Control data for this WorkOrder. More... | |
virtual void | setData (CorrelationMatrix) |
Sets the CorrelationMatrix data for this WorkOrder. More... | |
virtual void | setData (TargetBodyQsp targetBody) |
Sets the TargetBody data for this WorkOrder. More... | |
virtual void | setData (GuiCameraQsp guiCamera) |
Sets the GuiCamera data for this WorkOrder. More... | |
virtual void | setData (ProjectItem *item) |
Sets the internal data to the data stored in a ProjectItem. More... | |
void | setNext (WorkOrder *nextWorkOrder) |
Sets the next WorkOrder in the sequence. More... | |
void | setPrevious (WorkOrder *previousWorkOrder) |
Sets the previous WorkOrder in the sequence. More... | |
QString | bestText () const |
We don't use action text anymore because Directory likes to rename our actions. More... | |
bool | createsCleanState () const |
Returns the CleanState status (whether the Project has been saved to disk or not). More... | |
QDateTime | executionTime () const |
Gets the execution time of this WorkOrder. More... | |
bool | isFinished () const |
Returns the finished state of this WorkOrder. More... | |
bool | isRedoing () const |
Returns the redoing status of this WorkOrder. More... | |
bool | isRedone () const |
Returns the WorkOrder redone status. More... | |
bool | isUndoing () const |
Returns the WorkOrderUndoing state. More... | |
bool | isUndone () const |
Returns the WorkOrder undo status. More... | |
bool | modifiesDiskState () const |
Returns the modified disk state. More... | |
WorkOrder * | next () const |
Gets the next WorkOrder. More... | |
WorkOrder * | previous () const |
Gets the previous WorkOrder. More... | |
QString | statusText () const |
WorkOrder::statusText. More... | |
ProgressBar * | progressBar () |
Returns the ProgressBar. More... | |
Static Public Member Functions | |
static WorkOrderStatus | fromStatusString (QString) |
Attempts to query the current status of the WorkOrder. More... | |
static QString | toString (WorkOrderStatus) |
Gets the current status of the WorkOrder. More... | |
Protected Slots | |
void | addCloneToProject () |
Runs a copy of the current WorkOrder and stores it in the project. More... | |
Protected Member Functions | |
WorkOrder (const WorkOrder &other) | |
Copy the work order 'other' into this (new) instance. More... | |
ImageList * | imageList () |
a pointer to the ImageList for this WorkOrder. More... | |
const ImageList * | imageList () const |
A thread-safe method for retrieving a pointer to the imageList. More... | |
ShapeList * | shapeList () |
a pointer to the ShapeList for this WorkOrder. More... | |
const ShapeList * | shapeList () const |
A thread-safe method for retrieving a pointer to the shapeList. More... | |
CorrelationMatrix | correlationMatrix () |
Returns the CorrleationMatrix for this WorkOrder. More... | |
QPointer< ControlList > | controlList () |
Returns the Control List for this WorkOrder (a list of control networks). More... | |
TargetBodyQsp | targetBody () |
WorkOrder::targetBody. More... | |
GuiCameraQsp | guiCamera () |
WorkOrder::guiCamera. More... | |
virtual bool | dependsOn (WorkOrder *other) const |
This is a virtual function whose role in child classes is to determine if this WorkOrder deppends on the WorkOrder passed in as an argument. More... | |
Directory * | directory () const |
Returns the Directory object of the Project this WorkOrder is attached to. More... | |
Project * | project () const |
Returns the Project this WorkOrder is attached to. More... | |
void | setCreatesCleanState (bool createsCleanState) |
Declare that this work order is saving the project. More... | |
void | setModifiesDiskState (bool changesProjectOnDisk) |
. More... | |
void | setInternalData (QStringList data) |
Sets the internal data for this WorkOrder. More... | |
int | progressMin () const |
Gets the minimum value of the progress range of the WorkOrder. More... | |
int | progressMax () const |
Gets the maximum value of the progress range of the WorkOrder. More... | |
int | progressValue () const |
Gets the current progress value of the WorkOrder. More... | |
void | setProgressRange (int, int) |
Sets the progress range of the WorkOrder. More... | |
void | setProgressValue (int) |
Sets the current progress value for the WorkOrder. More... | |
QStringList | internalData () const |
Gets the internal data for this WorkOrder. More... | |
virtual void | syncRedo () |
This method is designed to be implemented by children work orders. More... | |
virtual void | asyncRedo () |
This method is designed to be implemented by children work orders. More... | |
virtual void | postSyncRedo () |
This method is designed to be implemented by children work orders. More... | |
virtual void | syncUndo () |
This method is designed to be implemented by children work orders. More... | |
virtual void | asyncUndo () |
This method is designed to be implemented by children work orders. More... | |
virtual void | postSyncUndo () |
This method is designed to be implemented by children work orders. More... | |
Parent class for anything that performs an action in Project.
This class should be used for any operation that affects a Project. This provides history, undo/redo capabilities (which need to be implemented correctly), and the ability for the project to guarantee a good state on disk.
State between the end of execute() and the beginning of the redo methods must be saved via the parent (WorkOrder) class. This is to ensure serializability. State between the redo methods and undo methods should work the same way. Child implementations may only save state (have member variables) that store state between syncRedo(), asyncRedo() and postSyncRedo() OR between syncUndo(), asyncUndo() and postSyncUndo(). Other forms of state will cause the work order to not function properly when saved/restored from disk.
This enumeration is used by other functions to set and retrieve the current state of the WorkOrder.
Enumerator | |
---|---|
WorkOrderUnknownStatus | |
WorkOrderNotStarted | |
WorkOrderRedoing | |
WorkOrderRedone | |
WorkOrderUndoing | |
WorkOrderUndone | |
WorkOrderFinished |
This is used for work orders that will not undo or redo (See createsCleanState()) |
WorkOrderLastStatus |
Isis::WorkOrder::WorkOrder | ( | Project * | project | ) |
Create a work order that will work with the given project.
project | The Project that this work order should be interacting with |
parent | The Qt-relationship parent |
IException::Programmer | This exception is thrown if the WorkOrder is not attached to a Project. |
References _FILEINFO_, addCloneToProject(), finished(), NoContext, Isis::IException::Programmer, project(), and WorkOrderNotStarted.
|
virtual |
The Destructor.
|
protected |
Copy the work order 'other' into this (new) instance.
other | The work order being copied. |
IException::Unknown | This Excecption is thrown if the WorkOrder being copies is currently running. |
References _FILEINFO_, addCloneToProject(), finished(), project(), and Isis::IException::Unknown.
|
protectedslot |
Runs a copy of the current WorkOrder and stores it in the project.
References Isis::Project::addToProject(), clone(), and project().
Referenced by WorkOrder().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for redo is: syncRedo() - GUI thread asyncRedo() - Pooled thread* postSyncRedo() - GUI thread
State can be read from the parent WorkOrder class and from state set in syncRedo() while in this method. You can set state to be used in postSyncRedo() safely. Please be wary of creating QObjects inside of this method because they will associated with the pooled thread and must be moved back to the GUI thread with QObject::moveToThread(). This method is never executed in the GUI thread. You can update progress by calling setProgressRange() and setProgressValue(). Please do not manipulate any GUI objects here.
Reimplemented in Isis::ImportImagesWorkOrder, Isis::ImportShapesWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ExportImagesWorkOrder, and Isis::ExportControlNetWorkOrder.
Referenced by redo().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for undo is: syncUndo() - GUI thread asyncUndo() - Pooled thread* postSyncUndo() - GUI thread
State can be read from the parent WorkOrder class and from state set in syncUndo() while in this method. You can set state to be used in postSyncUndo() safely. Please be wary of deleting QObjects inside of this method because they will cause unpredictable crashes. This method is never executed in the GUI thread. You can update progress by calling setProgressRange() and setProgressValue(). Please do not manipulate any GUI objects here.
Reimplemented in Isis::ImportImagesWorkOrder, and Isis::ImportShapesWorkOrder.
Referenced by undo().
QString Isis::WorkOrder::bestText | ( | ) | const |
We don't use action text anymore because Directory likes to rename our actions.
It converts a set of actions that have the same text, like Zoom Fit, to be in a menu named Zoom Fit with items that name their widgets. Widget names are unhelpful as a description of the action.
|
pure virtual |
Implemented in Isis::ImageListActionWorkOrder, Isis::ImportImagesWorkOrder, Isis::ImportShapesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::OpenRecentProjectWorkOrder, Isis::CubeDnViewWorkOrder, Isis::ImportControlNetWorkOrder, Isis::SaveProjectAsWorkOrder, Isis::SaveProjectWorkOrder, Isis::TargetGetInfoWorkOrder, Isis::OpenProjectWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::SetActiveControlWorkOrder, Isis::RenameProjectWorkOrder, Isis::SetActiveImageListWorkOrder, Isis::ViewControlNet3DWorkOrder, Isis::MatrixViewWorkOrder, Isis::CloseProjectWorkOrder, Isis::JigsawWorkOrder, Isis::RemoveImagesWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::ExportImagesWorkOrder, Isis::ExportControlNetWorkOrder, Isis::MoveDownOneSceneWorkOrder, Isis::MoveToBottomSceneWorkOrder, Isis::MoveToTopSceneWorkOrder, and Isis::MoveUpOneSceneWorkOrder.
Referenced by addCloneToProject(), and Isis::Directory::supportedActions().
|
protected |
Returns the Control List for this WorkOrder (a list of control networks).
Referenced by Isis::ExportControlNetWorkOrder::asyncRedo(), Isis::ExportControlNetWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::SetActiveControlWorkOrder::execute(), isExecutable(), setData(), and Isis::CnetEditorViewWorkOrder::syncRedo().
|
protected |
Returns the CorrleationMatrix for this WorkOrder.
Referenced by Isis::MatrixViewWorkOrder::execute(), setData(), and Isis::MatrixViewWorkOrder::syncRedo().
bool Isis::WorkOrder::createsCleanState | ( | ) | const |
Returns the CleanState status (whether the Project has been saved to disk or not).
Referenced by Isis::Project::addToProject(), execute(), and setCreatesCleanState().
|
signal |
|
signal |
|
protectedvirtual |
This is a virtual function whose role in child classes is to determine if this WorkOrder deppends on the WorkOrder passed in as an argument.
Reimplemented in Isis::Footprint2DViewWorkOrder, Isis::CubeDnViewWorkOrder, Isis::RenameProjectWorkOrder, Isis::TargetGetInfoWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::ViewControlNet3DWorkOrder, Isis::MatrixViewWorkOrder, Isis::JigsawWorkOrder, and Isis::CnetEditorViewWorkOrder.
Referenced by redo().
|
protected |
Returns the Directory object of the Project this WorkOrder is attached to.
References Isis::Project::directory(), and project().
Referenced by Isis::MosaicSceneWorkOrder::scene(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::CubeDnViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), and Isis::ImageFileListViewWorkOrder::syncUndo().
|
virtualslot |
The (child) implementation of this method should prompt the user/gather state by any means necessary.
This method is designed to be implemented by children work orders, but they need to call this version inside of their execute (at the beginning).
Prompts for file names, questions, warnings, etc.. should be done here.
Once the work order has enough data to execute, this method needs to set the state in the parent (this) WorkOrder class. Call setData(ImageList), setInternalData(QStringList), etc... with all of the data/state necessary to perform the work order. This could be a list of file names, an ImageList of images you're viewing, or really anything else.
Finally, the actual work needs done in *Redo(), using only state (data) stored by the parent (this) WorkOrder class. You do not have to call *Redo() - this is done for you by WorkOrder::redo(). WorkOrder::redo() is called from Project::addToProject() when the workOrder is pushed onto the undo stack.
We do it this way to ensure saving/restoring from history can be done automatically/simply and implemented only once per data type. This also gives us full undo/redo functionality.
The order of execution for work orders is: execute() - GUI thread, can ask user for input* syncRedo() - GUI thread, should not prompt the user for input asyncRedo() - Pooled thread postSyncRedo() - GUI thread
syncUndo() - GUI thread, always called after redo finishes asyncUndo() - Pooled thread postSyncUndo() - GUI thread
syncRedo() - GUI thread asyncRedo() - Pooled thread postSyncRedo() - GUI thread
and so on...
State should only be set in the parent WorkOrder class in this method. You can set arbitrary state using setInternalData(). This method is always executed in the GUI thread and is the only place to ask the user questions.
Reimplemented in Isis::ImageListActionWorkOrder, Isis::ImportImagesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImportShapesWorkOrder, Isis::CubeDnViewWorkOrder, Isis::OpenRecentProjectWorkOrder, Isis::ImportControlNetWorkOrder, Isis::TargetGetInfoWorkOrder, Isis::SaveProjectAsWorkOrder, Isis::SaveProjectWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::OpenProjectWorkOrder, Isis::RenameProjectWorkOrder, Isis::SetActiveControlWorkOrder, Isis::ViewControlNet3DWorkOrder, Isis::SetActiveImageListWorkOrder, Isis::MatrixViewWorkOrder, Isis::RemoveImagesWorkOrder, Isis::CloseProjectWorkOrder, Isis::JigsawWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::ExportImagesWorkOrder, and Isis::ExportControlNetWorkOrder.
References createsCleanState(), statusChanged(), and WorkOrderFinished.
Referenced by Isis::Project::addToProject(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::CloseProjectWorkOrder::execute(), Isis::JigsawWorkOrder::execute(), Isis::RemoveImagesWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::SetActiveImageListWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SetActiveControlWorkOrder::execute(), Isis::ViewControlNet3DWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::OpenProjectWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::SaveProjectWorkOrder::execute(), Isis::TargetGetInfoWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::OpenRecentProjectWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::ImportShapesWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), and Isis::ImageListActionWorkOrder::execute().
QDateTime Isis::WorkOrder::executionTime | ( | ) | const |
Gets the execution time of this WorkOrder.
|
signal |
Referenced by redo(), undo(), and WorkOrder().
|
static |
Attempts to query the current status of the WorkOrder.
statusString | The status we want information about. |
References toString(), WorkOrderLastStatus, and WorkOrderUnknownStatus.
|
protected |
Referenced by Isis::SensorGetInfoWorkOrder::execute(), setData(), and Isis::SensorGetInfoWorkOrder::syncRedo().
|
protected |
a pointer to the ImageList for this WorkOrder.
References Isis::Project::image(), and project().
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), Isis::ExportImagesWorkOrder::execute(), Isis::SetActiveImageListWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), imageList(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), isExecutable(), redo(), Isis::MosaicSceneWorkOrder::restoreZPositions(), Isis::ImageListActionWorkOrder::setData(), setData(), Isis::MoveDownOneSceneWorkOrder::syncRedo(), Isis::MoveToBottomSceneWorkOrder::syncRedo(), Isis::MoveUpOneSceneWorkOrder::syncRedo(), Isis::MoveToTopSceneWorkOrder::syncRedo(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::ImageListActionWorkOrder::syncRedo(), and Isis::ImageListActionWorkOrder::syncUndo().
|
protected |
A thread-safe method for retrieving a pointer to the imageList.
References imageList().
|
protected |
Gets the internal data for this WorkOrder.
Referenced by Isis::ExportControlNetWorkOrder::asyncRedo(), Isis::ExportImagesWorkOrder::asyncRedo(), Isis::ImportShapesWorkOrder::asyncRedo(), Isis::ImportImagesWorkOrder::asyncRedo(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::execute(), Isis::TargetGetInfoWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::MosaicSceneWorkOrder::restoreZPositions(), Isis::MosaicSceneWorkOrder::scene(), Isis::ImageListActionWorkOrder::setData(), Isis::MosaicSceneWorkOrder::storeZPositions(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::RenameProjectWorkOrder::syncRedo(), Isis::ImportControlNetWorkOrder::syncRedo(), Isis::CubeDnViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), Isis::ImageListActionWorkOrder::syncRedo(), Isis::MatrixViewWorkOrder::syncUndo(), Isis::ImageFileListViewWorkOrder::syncUndo(), Isis::RenameProjectWorkOrder::syncUndo(), and Isis::ImageListActionWorkOrder::syncUndo().
|
virtual |
Re-implement this method if your work order utilizes controls for data in order to operate.
For example, "CnetEditorViewWorkOrder" works sometimes on controls
context | This is an enum variable with two values: NoContext,ProjectContext. |
Reimplemented in Isis::RenameProjectWorkOrder.
Referenced by isExecutable(), and Isis::Directory::supportedActions().
|
virtual |
Re-implement this method if your work order utilizes images for data in order to operate.
For example, "Footprint2DViewWorkOrder" works sometimes on images - the logic in side of Footprint2DViewWorkOrder::isExecutable(ImageList) determines whethere or not a user is prompted with this work order as a possibility.
images | An image list that this work order should execute on |
Reimplemented in Isis::ImageListActionWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::CubeDnViewWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::SetActiveImageListWorkOrder, Isis::RemoveImagesWorkOrder, and Isis::ExportImagesWorkOrder.
|
virtual |
Re-implement this method if your work order utilizes shapes for data in order to operate.
For example, "ImportShapeWorkOrder" works on shapes - the logic in side of ImportShapeWorkOrder::isExecutable(ShapeList) determines whethere or not a user is prompted with this work order as a possibility.
shapes | A shape list that this work order should execute on |
Reimplemented in Isis::Footprint2DViewWorkOrder, and Isis::CubeDnViewWorkOrder.
|
virtual |
Re-implement this method if your work order utilizes a control for data in order to operate.
control | A control networks. |
controls | A list of control networks. |
Reimplemented in Isis::SetActiveControlWorkOrder, Isis::ViewControlNet3DWorkOrder, Isis::CnetEditorViewWorkOrder, and Isis::ExportControlNetWorkOrder.
|
virtual |
Reimplemented in Isis::MatrixViewWorkOrder.
|
virtual |
Re-implement this method if your work order utilizes a control list (a list of control networks) for data in order to operate.
controls | A list of control networks. |
Reimplemented in Isis::TargetGetInfoWorkOrder.
|
virtual |
Re-implement this method if your WorkOrder utilizes GuiCameraQsp (a QSharedPointer to a GuiCamera object) for data in order to operate.
GuiCameraQsp |
Reimplemented in Isis::SensorGetInfoWorkOrder.
|
virtual |
Determines if the WorkOrder is execuatable on the data stored in a ProjectItem.
item | (ProjectItem *) The item containing the data. |
References Isis::ShapeList::append(), Isis::ControlList::append(), Isis::ImageList::append(), Isis::ProjectItem::control(), controlList(), Isis::ProjectItem::correlationMatrix(), Isis::ProjectItem::guiCamera(), Isis::ProjectItem::image(), Isis::ProjectItem::imageList(), imageList(), Isis::ProjectItem::isControl(), Isis::ProjectItem::isControlList(), Isis::ProjectItem::isCorrelationMatrix(), isExecutable(), Isis::ProjectItem::isGuiCamera(), Isis::ProjectItem::isImage(), Isis::ProjectItem::isImageList(), Isis::ProjectItem::isProject(), Isis::ProjectItem::isShape(), Isis::ProjectItem::isShapeList(), Isis::ProjectItem::isTargetBody(), ProjectContext, Isis::ProjectItem::shape(), Isis::ProjectItem::shapeList(), shapeList(), and Isis::ProjectItem::targetBody().
bool Isis::WorkOrder::isFinished | ( | ) | const |
Returns the finished state of this WorkOrder.
References WorkOrderFinished.
bool Isis::WorkOrder::isRedoing | ( | ) | const |
Returns the redoing status of this WorkOrder.
References WorkOrderRedoing.
bool Isis::WorkOrder::isRedone | ( | ) | const |
Returns the WorkOrder redone status.
References WorkOrderRedone.
Referenced by redo().
bool Isis::WorkOrder::isUndoing | ( | ) | const |
Returns the WorkOrderUndoing state.
References WorkOrderUndoing.
Referenced by Isis::Project::lastNotUndoneWorkOrder(), redo(), and undo().
bool Isis::WorkOrder::isUndone | ( | ) | const |
Returns the WorkOrder undo status.
References WorkOrderUndone.
Referenced by Isis::Project::lastNotUndoneWorkOrder(), and undo().
bool Isis::WorkOrder::modifiesDiskState | ( | ) | const |
Returns the modified disk state.
Referenced by Isis::Project::~Project().
WorkOrder * Isis::WorkOrder::next | ( | ) | const |
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for redo is: syncRedo() - GUI thread asyncRedo() - Pooled thread postSyncRedo() - GUI thread*
State can be read from the parent WorkOrder class and from state set in either syncRedo() or asyncRedo() while in this method. You can not set state to be used in any of the undo code safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImportImagesWorkOrder, Isis::ImportShapesWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ExportImagesWorkOrder, and Isis::ExportControlNetWorkOrder.
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for undo is: syncUndo() - GUI thread asyncUndo() - Pooled thread postSyncUndo() - GUI thread*
State can be read from the parent WorkOrder class and from state set in either syncUndo() or asyncUndo() while in this method. You can not set state to be used in any of the redo code safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImportImagesWorkOrder, and Isis::ImportShapesWorkOrder.
WorkOrder * Isis::WorkOrder::previous | ( | ) | const |
Gets the previous WorkOrder.
Referenced by Isis::Project::addToProject(), Isis::Project::lastNotUndoneWorkOrder(), and redo().
ProgressBar * Isis::WorkOrder::progressBar | ( | ) |
Returns the ProgressBar.
Referenced by Isis::OpenProjectWorkOrder::execute().
|
protected |
Gets the maximum value of the progress range of the WorkOrder.
|
protected |
Gets the minimum value of the progress range of the WorkOrder.
|
protected |
Gets the current progress value of the WorkOrder.
|
protected |
Returns the Project this WorkOrder is attached to.
IException::Programmer | "This work order no longer has a project." |
References _FILEINFO_, and Isis::IException::Programmer.
Referenced by addCloneToProject(), Isis::ExportControlNetWorkOrder::asyncRedo(), Isis::ExportImagesWorkOrder::asyncRedo(), Isis::ImportShapesWorkOrder::asyncUndo(), Isis::ImportImagesWorkOrder::asyncUndo(), directory(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::JigsawWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::SetActiveImageListWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SetActiveControlWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::OpenProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::SaveProjectWorkOrder::execute(), Isis::OpenRecentProjectWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), imageList(), Isis::JigsawWorkOrder::isExecutable(), Isis::SetActiveImageListWorkOrder::isExecutable(), Isis::SetActiveControlWorkOrder::isExecutable(), Isis::SensorGetInfoWorkOrder::isExecutable(), Isis::TargetGetInfoWorkOrder::isExecutable(), Isis::ExportControlNetWorkOrder::postSyncRedo(), Isis::ExportImagesWorkOrder::postSyncRedo(), Isis::ImportShapesWorkOrder::postSyncRedo(), Isis::ImportImagesWorkOrder::postSyncRedo(), Isis::ImportShapesWorkOrder::postSyncUndo(), Isis::ImportImagesWorkOrder::postSyncUndo(), redo(), shapeList(), Isis::CnetEditorViewWorkOrder::syncRedo(), Isis::RemoveImagesWorkOrder::syncRedo(), Isis::MatrixViewWorkOrder::syncRedo(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::SensorGetInfoWorkOrder::syncRedo(), Isis::RenameProjectWorkOrder::syncRedo(), Isis::TargetGetInfoWorkOrder::syncRedo(), Isis::ImportControlNetWorkOrder::syncRedo(), Isis::CubeDnViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), Isis::CnetEditorViewWorkOrder::syncUndo(), Isis::MatrixViewWorkOrder::syncUndo(), Isis::ImageFileListViewWorkOrder::syncUndo(), Isis::RenameProjectWorkOrder::syncUndo(), Isis::ImportControlNetWorkOrder::syncUndo(), Isis::Footprint2DViewWorkOrder::syncUndo(), and WorkOrder().
void Isis::WorkOrder::read | ( | XmlStackedHandlerReader * | xmlReader | ) |
Read this work order's data from disk.
References Isis::XmlStackedHandlerReader::pushContentHandler().
|
virtualslot |
Starts (or enqueues) a redo.
This should not be re-implemented by children. TODO: (Then why is it declared virtual?)
References asyncRedo(), bestText(), dependsOn(), finished(), imageList(), isFinished(), isRedoing(), isRedone(), isUndoing(), previous(), project(), shapeList(), statusChanged(), syncRedo(), and WorkOrderRedoing.
void Isis::WorkOrder::save | ( | QXmlStreamWriter & | stream | ) | const |
: Saves a WorkOrder to a data stream.
The XML output format looks like this:
<workOrder actiontext="..." undotext="..." type="..." status="..."> <images> <image id="..."> </images>
<internalDataValues> <dataValue value="..."> </internalDataValues> </workOrder>
@b | QXmlStreamWriter stream The data stream we are saving the WorkOrder to. |
IException::Unknown | This exception is thrown if save is called while the WorkOrder is currently running. |
References _FILEINFO_, bestText(), NoContext, Isis::IException::Programmer, and toString().
|
protected |
Declare that this work order is saving the project.
This makes the work order not appear in the undo stack (cannot undo/redo), and instead it is marked as a 'clean' state of the project. The QUndoCommand undo/redo will never be called. The default for createsCleanState is false.
createsCleanState | True if this work order is going to save the project to disk, False otherwise. |
References createsCleanState().
Referenced by Isis::CloseProjectWorkOrder::CloseProjectWorkOrder(), Isis::OpenProjectWorkOrder::OpenProjectWorkOrder(), Isis::OpenRecentProjectWorkOrder::OpenRecentProjectWorkOrder(), Isis::SaveProjectAsWorkOrder::SaveProjectAsWorkOrder(), and Isis::SaveProjectWorkOrder::SaveProjectWorkOrder().
|
virtual |
Sets the context data for this WorkOrder.
context | This is an enum variable with two values: NoContext,ProjectContext. |
Referenced by Isis::ImageListActionWorkOrder::setData(), setData(), Isis::Directory::supportedActions(), and Isis::MosaicSceneWidget::supportedActions().
|
virtual |
Sets the ImageList data for this WorkOrder.
images | A pointer to the updated ImageList. |
Reimplemented in Isis::ImageListActionWorkOrder.
|
virtual |
|
virtual |
Sets the Control data for this WorkOrder.
controls. | A pointer to the Control Sets the ControlList data for this WorkOrder. |
controls. | A pointer to the ControlList (which is a list of control networks). |
|
virtual |
Sets the CorrelationMatrix data for this WorkOrder.
correlationMatrix | The matrix data. |
References correlationMatrix().
|
virtual |
Sets the TargetBody data for this WorkOrder.
targetBody | A QSharedPointer to the TargetBody. |
References targetBody().
|
virtual |
Sets the GuiCamera data for this WorkOrder.
guiCamera | A QSharedPointer to the GuiCamera. |
References guiCamera().
|
virtual |
Sets the internal data to the data stored in a ProjectItem.
item | The item containing the data. |
References Isis::ShapeList::append(), Isis::ControlList::append(), Isis::ImageList::append(), Isis::ProjectItem::control(), Isis::ProjectItem::controlList(), controlList(), Isis::ProjectItem::correlationMatrix(), Isis::ProjectItem::guiCamera(), Isis::ProjectItem::image(), Isis::ProjectItem::imageList(), imageList(), Isis::ProjectItem::isControl(), Isis::ProjectItem::isControlList(), Isis::ProjectItem::isCorrelationMatrix(), Isis::ProjectItem::isGuiCamera(), Isis::ProjectItem::isImage(), Isis::ProjectItem::isImageList(), Isis::ProjectItem::isProject(), Isis::ProjectItem::isShape(), Isis::ProjectItem::isShapeList(), Isis::ProjectItem::isTargetBody(), ProjectContext, setData(), Isis::ProjectItem::shape(), Isis::ProjectItem::shapeList(), shapeList(), and Isis::ProjectItem::targetBody().
|
protected |
Sets the internal data for this WorkOrder.
data | The data to set the internal data to. |
Referenced by Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::execute(), Isis::TargetGetInfoWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::ImportShapesWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), Isis::MosaicSceneWorkOrder::MosaicSceneWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::MosaicSceneWorkOrder::storeZPositions(), Isis::ImageListActionWorkOrder::syncRedo(), and Isis::ImageListActionWorkOrder::syncUndo().
|
protected |
.
By default, m_modifiesDiskState is False. If a WorkOrder modifies the Project on disk as a result of it's action, this should be set to true.
changesProjectOnDisk | True if this WorkOrder modifies the Project on disk. False if it does not. |
Referenced by Isis::ImportControlNetWorkOrder::ImportControlNetWorkOrder(), Isis::ImportImagesWorkOrder::ImportImagesWorkOrder(), Isis::ImportShapesWorkOrder::ImportShapesWorkOrder(), and Isis::RemoveImagesWorkOrder::RemoveImagesWorkOrder().
void Isis::WorkOrder::setNext | ( | WorkOrder * | nextWorkOrder | ) |
Sets the next WorkOrder in the sequence.
nextWorkOrder | The next WorkOrder. |
Referenced by Isis::Project::addToProject().
void Isis::WorkOrder::setPrevious | ( | WorkOrder * | previousWorkOrder | ) |
Sets the previous WorkOrder in the sequence.
previousWorkOrder | The previous WorkOrder. |
Referenced by Isis::Project::addToProject().
|
protected |
Sets the progress range of the WorkOrder.
minValue | The progress range minimum value. |
maxValue | The progress range maximum value. |
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), and Isis::ImportControlNetWorkOrder::asyncRedo().
|
protected |
Sets the current progress value for the WorkOrder.
int | value The value to set the current progress to. |
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), and Isis::ImportControlNetWorkOrder::asyncRedo().
|
protected |
a pointer to the ShapeList for this WorkOrder.
References project(), and Isis::Project::shape().
Referenced by isExecutable(), redo(), setData(), and shapeList().
|
protected |
A thread-safe method for retrieving a pointer to the shapeList.
References shapeList().
|
signal |
QString Isis::WorkOrder::statusText | ( | ) | const |
References toString().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for redo is: syncRedo() - GUI thread* asyncRedo() - Pooled thread postSyncRedo() - GUI thread
State should only be read from the parent WorkOrder class in this method. You can set state to be used in asyncRedo() and postSyncRedo() safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImageListActionWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::CubeDnViewWorkOrder, Isis::ImportControlNetWorkOrder, Isis::RenameProjectWorkOrder, Isis::TargetGetInfoWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::ViewControlNet3DWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::MatrixViewWorkOrder, Isis::JigsawWorkOrder, Isis::RemoveImagesWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::MoveDownOneSceneWorkOrder, Isis::MoveToBottomSceneWorkOrder, Isis::MoveToTopSceneWorkOrder, and Isis::MoveUpOneSceneWorkOrder.
Referenced by redo().
|
protectedvirtual |
This method is designed to be implemented by children work orders.
The order of execution for undo is: syncUndo() - GUI thread* asyncUndo() - Pooled thread postSyncUndo() - GUI thread
State should only be read from the parent WorkOrder class in this method. You can set state to be used in asyncUndo() and postSyncUndo() safely. This method is always executed in the GUI thread and has no progress.
Reimplemented in Isis::ImageListActionWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImportControlNetWorkOrder, Isis::RenameProjectWorkOrder, Isis::TargetGetInfoWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::ViewControlNet3DWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::MatrixViewWorkOrder, Isis::JigsawWorkOrder, Isis::CnetEditorViewWorkOrder, Isis::MoveDownOneSceneWorkOrder, Isis::MoveToBottomSceneWorkOrder, Isis::MoveToTopSceneWorkOrder, and Isis::MoveUpOneSceneWorkOrder.
Referenced by undo().
|
protected |
Referenced by Isis::TargetGetInfoWorkOrder::execute(), setData(), and Isis::TargetGetInfoWorkOrder::syncRedo().
|
static |
Gets the current status of the WorkOrder.
status | An enumeration of all possible WorkOrder states. |
References WorkOrderFinished, WorkOrderNotStarted, WorkOrderRedoing, WorkOrderRedone, WorkOrderUndoing, WorkOrderUndone, and WorkOrderUnknownStatus.
Referenced by fromStatusString(), save(), and statusText().
|
virtualslot |
Starts (or enqueues) an undo.
This should not be re-implemented by children. (Why virtual then?)
References asyncUndo(), bestText(), finished(), isFinished(), isRedoing(), isUndoing(), isUndone(), next(), statusChanged(), syncUndo(), WorkOrderNotStarted, and WorkOrderUndoing.