Isis Developer Reference
Isis::ImportShapesWorkOrder Class Reference

Add shape model cubes to a project. More...

#include <ImportShapesWorkOrder.h>

Inheritance diagram for Isis::ImportShapesWorkOrder:
Inheritance graph
Collaboration diagram for Isis::ImportShapesWorkOrder:
Collaboration graph

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

void enableWorkOrder ()
 Enables the work order.
 
void disableWorkOrder ()
 Disables the work order.
 
virtual void redo ()
 Starts (or enqueues) a redo.
 
virtual void undo ()
 Starts (or enqueues) an undo.
 

Signals

void creatingProgress (WorkOrder *)
 
void deletingProgress (WorkOrder *)
 
void finished (WorkOrder *)
 
void statusChanged (WorkOrder *)
 

Public Member Functions

 ImportShapesWorkOrder (Project *project)
 Creates a work order to import a shape model.
 
 ImportShapesWorkOrder (const ImportShapesWorkOrder &other)
 Creates a copy of the other ImportShapesWorkOrder.
 
 ~ImportShapesWorkOrder ()
 Destructor.
 
virtual ImportShapesWorkOrderclone () const
 This method clones the current ImportShapesWorkOrder and returns it.
 
virtual bool isExecutable (ProjectItem *item)
 This method returns true if the user clicked on a project tree node with the text "Shapes".
 
bool setupExecution ()
 Prompt the user for shape files to import and whether to copy DN data in to project.
 
void execute ()
 Creates a project shape folder and copies the shape cubes into it.
 
void postExecution ()
 Add the imported shapes into the project.
 
void undoExecution ()
 delete the imported shapes from the disk.
 
void postUndoExecution ()
 delete the imported shapes from the project.
 
virtual bool isExecutable (Context)
 Re-implement this method if your work order utilizes controls for data in order to operate.
 
virtual bool isExecutable (ImageList *images)
 Re-implement this method if your work order utilizes images for data in order to operate.
 
virtual bool isExecutable (ShapeList *shapes)
 Re-implement this method if your work order utilizes shapes for data in order to operate.
 
virtual bool isExecutable (ControlList *controls)
 Re-implement this method if your work order utilizes a control for data in order to operate.
 
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.
 
virtual bool isExecutable (Template *currentTemplate)
 Re-implement this method if your work order utilizes a control list (a list of control networks) for data in order to operate.
 
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.
 
virtual bool isExecutable (FileItemQsp fileItem)
 Re-implement this method if your WorkOrder utilizes FileItemQsp (a QSharedPointer to a FileItem object) for data in order to operate.
 
void save (QXmlStreamWriter &stream) const
 : Saves a WorkOrder to a data stream.
 
virtual void setData (Context)
 Sets the context data for this WorkOrder.
 
virtual void setData (QString data)
 
virtual void setData (ImageList *images)
 Sets the ImageList data for this WorkOrder.
 
virtual void setData (ShapeList *shapes)
 Sets the ShapeList data for this WorkOrder.
 
virtual void setData (ControlList *controls)
 Sets the Control data for this WorkOrder.
 
virtual void setData (Template *currentTemplate)
 Sets the TargetBody data for this WorkOrder.
 
virtual void setData (CorrelationMatrix)
 Sets the CorrelationMatrix data for this WorkOrder.
 
virtual void setData (TargetBodyQsp targetBody)
 Sets the TargetBody data for this WorkOrder.
 
virtual void setData (GuiCameraQsp guiCamera)
 Sets the GuiCamera data for this WorkOrder.
 
virtual void setData (FileItemQsp fileItem)
 Sets the FileItem data for this WorkOrder.
 
virtual void setData (ProjectItem *item)
 Sets the internal data to the data stored in a ProjectItem.
 
void setNext (WorkOrder *nextWorkOrder)
 Sets the next WorkOrder in the sequence.
 
void setPrevious (WorkOrder *previousWorkOrder)
 Sets the previous WorkOrder in the sequence.
 
QString bestText () const
 Generate unique action names We don't use action text anymore because Directory likes to rename our actions.
 
bool isUndoable () const
 Returns true if this work order is undoable, otherwise false.
 
bool isSavedToHistory () const
 Returns true if this work order is to be shown in History, otherwise false.
 
bool isSynchronous () const
 Returns true if this work order is run synchronously, otherwise false.
 
bool createsCleanState () const
 Returns the CleanState status (whether the Project has been saved to disk or not).
 
QDateTime executionTime () const
 Gets the execution time of this WorkOrder.
 
bool isFinished () const
 Returns the finished state of this WorkOrder.
 
bool isRedoing () const
 Returns the redoing status of this WorkOrder.
 
bool isRedone () const
 Returns the WorkOrder redone status.
 
bool isUndoing () const
 Returns the WorkOrderUndoing state.
 
bool isUndone () const
 Returns the WorkOrder undo status.
 
bool modifiesDiskState () const
 Returns the modified disk state.
 
WorkOrdernext () const
 Gets the next WorkOrder.
 
WorkOrderprevious () const
 Gets the previous WorkOrder.
 
QString statusText () const
 WorkOrder::statusText.
 
ProgressBarprogressBar ()
 Returns the ProgressBar.
 

Static Public Member Functions

static WorkOrderStatus fromStatusString (QString)
 Attempts to query the current status of the WorkOrder.
 
static QString toString (WorkOrderStatus)
 Gets the current status of the WorkOrder.
 

Protected Slots

void addCloneToProject ()
 Runs a copy of the current WorkOrder and stores it in the project.
 

Protected Member Functions

ImageListimageList ()
 Returns a pointer to the ImageList for this WorkOrder.
 
const ImageListimageList () const
 A thread-safe method for retrieving a pointer to the imageList.
 
ShapeListshapeList ()
 @briefReturns a pointer to the ShapeList for this WorkOrder.
 
const ShapeListshapeList () const
 A thread-safe method for retrieving a pointer to the shapeList.
 
CorrelationMatrix correlationMatrix ()
 Returns the CorrleationMatrix for this WorkOrder.
 
QPointer< ControlListcontrolList ()
 Returns the Control List for this WorkOrder (a list of control networks).
 
TemplategetTemplate ()
 WorkOrder::getTemplate.
 
TargetBodyQsp targetBody ()
 WorkOrder::targetBody.
 
GuiCameraQsp guiCamera ()
 WorkOrder::guiCamera.
 
FileItemQsp fileItem ()
 WorkOrder::fileItem.
 
virtual bool dependsOn (WorkOrder *other) const
 Indicate workorder dependency This is a virtual function whose role in child classes is to determine if this WorkOrder depends on the WorkOrder passed in as an argument.
 
Directorydirectory () const
 return the workorder project directory Returns the Directory object of the Project this WorkOrder is attached to.
 
Projectproject () const
 Returns the Project this WorkOrder is attached to.
 
void setCreatesCleanState (bool createsCleanState)
 Declare that this work order is saving the project.
 
void setModifiesDiskState (bool changesProjectOnDisk)
 
void setInternalData (QStringList data)
 Sets the internal data for this WorkOrder.
 
int progressMin () const
 Gets the minimum value of the progress range of the WorkOrder.
 
int progressMax () const
 Gets the maximum value of the progress range of the WorkOrder.
 
int progressValue () const
 Gets the current progress value of the WorkOrder.
 
void setProgressRange (int, int)
 Sets the progress range of the WorkOrder.
 
void setProgressValue (int)
 Sets the current progress value for the WorkOrder.
 
QStringList internalData () const
 Gets the internal data for this WorkOrder.
 

Protected Attributes

bool m_isUndoable
 Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to be redone.
 
bool m_isSynchronous
 This is defaulted to true.
 
bool m_isSavedToHistory
 Set the work order to be shown in the HistoryTreeWidget.
 
WorkOrderStatus m_status
 

Detailed Description

Add shape model cubes to a project.

Asks the user for a list of cube file names. The cubes are then converted to external cube label files inside the project. These files are then handed off to the project.

Author
2016-07-06 Tracie Sucharski

Member Enumeration Documentation

◆ Context

enum Isis::WorkOrder::Context
inherited

This enumeration is for recording the context of the current Workorder (whether it is part of a project or not).

Enumerator
NoContext 
ProjectContext 

◆ WorkOrderStatus

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 

Constructor & Destructor Documentation

◆ ImportShapesWorkOrder() [1/2]

Isis::ImportShapesWorkOrder::ImportShapesWorkOrder ( Project * project)

Creates a work order to import a shape model.

Parameters
*projectPointer to the project this work order belongs to

References Isis::WorkOrder::m_isSynchronous, Isis::WorkOrder::m_isUndoable, and Isis::WorkOrder::setModifiesDiskState().

Referenced by clone().

◆ ImportShapesWorkOrder() [2/2]

Isis::ImportShapesWorkOrder::ImportShapesWorkOrder ( const ImportShapesWorkOrder & other)

Creates a copy of the other ImportShapesWorkOrder.

Parameters
&otherImportShapesWorkOrder to copy the state from

◆ ~ImportShapesWorkOrder()

Isis::ImportShapesWorkOrder::~ImportShapesWorkOrder ( )

Destructor.

Member Function Documentation

◆ addCloneToProject

void Isis::WorkOrder::addCloneToProject ( )
protectedslotinherited

Runs a copy of the current WorkOrder and stores it in the project.

References Isis::Project::addToProject(), Isis::WorkOrder::clone(), and Isis::WorkOrder::project().

Referenced by Isis::WorkOrder::WorkOrder(), and Isis::WorkOrder::WorkOrder().

◆ bestText()

QString Isis::WorkOrder::bestText ( ) const
inherited

Generate unique action names 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.

See also
Directory::restructureActions
Returns
QString A textual description of the action.

Referenced by Isis::WorkOrder::save().

◆ clone()

ImportShapesWorkOrder * Isis::ImportShapesWorkOrder::clone ( ) const
virtual

This method clones the current ImportShapesWorkOrder and returns it.

Returns
ImportShapesWorkOrder Clone

Implements Isis::WorkOrder.

References ImportShapesWorkOrder().

◆ controlList()

◆ correlationMatrix()

CorrelationMatrix Isis::WorkOrder::correlationMatrix ( )
protectedinherited

◆ createsCleanState()

bool Isis::WorkOrder::createsCleanState ( ) const
inherited

Returns the CleanState status (whether the Project has been saved to disk or not).

If this is set to true the work order will avoid being put on the undo stack, meaning it will not be undoable. It will also set the undo stack to a clean state, by doing this it makes all previous workorders done before the save to be no longer undoable.

Returns
Returns True if the Project has been saved to disk. False if it has not.

References Isis::WorkOrder::project().

Referenced by Isis::WorkOrder::setCreatesCleanState(), and Isis::WorkOrder::setupExecution().

◆ creatingProgress

void Isis::WorkOrder::creatingProgress ( WorkOrder * )
signalinherited

◆ deletingProgress

void Isis::WorkOrder::deletingProgress ( WorkOrder * )
signalinherited

◆ dependsOn()

bool Isis::WorkOrder::dependsOn ( WorkOrder * other) const
protectedvirtualinherited

Indicate workorder dependency This is a virtual function whose role in child classes is to determine if this WorkOrder depends on the WorkOrder passed in as an argument.

Parameters
WorkOrder* The WorkOrder we are checking for dependency with this one.
Returns
bool Returns True if there is a dependency, and False if there is no dependency.

Reimplemented in Isis::CnetEditorViewWorkOrder, Isis::CubeDnViewWorkOrder, Isis::JigsawWorkOrder, Isis::MatrixViewWorkOrder, Isis::RenameProjectWorkOrder, Isis::SensorGetInfoWorkOrder, Isis::TargetGetInfoWorkOrder, Isis::TemplateEditViewWorkOrder, and Isis::ViewControlNet3DWorkOrder.

Referenced by Isis::WorkOrder::redo().

◆ directory()

Directory * Isis::WorkOrder::directory ( ) const
protectedinherited

◆ disableWorkOrder

void Isis::WorkOrder::disableWorkOrder ( )
slotinherited

Disables the work order.

Disables the work order so it cannot be triggered (grayed-out).

See also
Directory::initializeActions()

◆ enableWorkOrder

void Isis::WorkOrder::enableWorkOrder ( )
slotinherited

Enables the work order.

Enables the work order so that it can be triggered (clicked).

See also
Directory::initializeActions()

◆ execute()

void Isis::ImportShapesWorkOrder::execute ( )
virtual

Creates a project shape folder and copies the shape cubes into it.

This will create the *.ecub and .cub files inside of the project.

Reimplemented from Isis::WorkOrder.

References Isis::WorkOrder::internalData(), Isis::WorkOrder::project(), and Isis::Project::setClean().

◆ executionTime()

QDateTime Isis::WorkOrder::executionTime ( ) const
inherited

Gets the execution time of this WorkOrder.

Returns
QDateTime The execution time.

References Isis::WorkOrder::project().

◆ fileItem()

FileItemQsp Isis::WorkOrder::fileItem ( )
protectedinherited

◆ finished

void Isis::WorkOrder::finished ( WorkOrder * )
signalinherited

◆ fromStatusString()

WorkOrder::WorkOrderStatus Isis::WorkOrder::fromStatusString ( QString statusString)
staticinherited

Attempts to query the current status of the WorkOrder.

Parameters
statusStringThe status we want information about.
Returns
WorkOrderStatus Returns WorkOrderUnknownStatus if the statusString does not match the current status. If there is a result, then it returns the status which matches the statusString.

References Isis::WorkOrder::toString(), Isis::WorkOrder::WorkOrderLastStatus, and Isis::WorkOrder::WorkOrderUnknownStatus.

◆ getTemplate()

Template * Isis::WorkOrder::getTemplate ( )
protectedinherited

◆ guiCamera()

◆ imageList() [1/2]

◆ imageList() [2/2]

const ImageList * Isis::WorkOrder::imageList ( ) const
protectedinherited

A thread-safe method for retrieving a pointer to the imageList.

Returns
(ImageList *) A pointer to the image list for this WorkOrder.

References Isis::WorkOrder::imageList().

◆ internalData()

QStringList Isis::WorkOrder::internalData ( ) const
protectedinherited

Gets the internal data for this WorkOrder.

Returns
QStringList Returns the internal data object.

References Isis::WorkOrder::project().

Referenced by Isis::CubeDnViewWorkOrder::execute(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::MosaicSceneWorkOrder::restoreZPositions(), Isis::MosaicSceneWorkOrder::scene(), Isis::ImageListActionWorkOrder::setData(), Isis::CubeDnViewWorkOrder::setupExecution(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::ExportImagesWorkOrder::setupExecution(), Isis::Footprint2DViewWorkOrder::setupExecution(), Isis::ImageFileListViewWorkOrder::setupExecution(), Isis::ImportControlNetWorkOrder::setupExecution(), Isis::MatrixViewWorkOrder::setupExecution(), Isis::RenameProjectWorkOrder::setupExecution(), Isis::SensorGetInfoWorkOrder::setupExecution(), Isis::TargetGetInfoWorkOrder::setupExecution(), Isis::TemplateEditViewWorkOrder::setupExecution(), Isis::ImageListActionWorkOrder::setupExecution(), Isis::MosaicSceneWorkOrder::storeZPositions(), Isis::MatrixViewWorkOrder::undoExecution(), Isis::RenameProjectWorkOrder::undoExecution(), and Isis::ImageListActionWorkOrder::undoExecution().

◆ isExecutable() [1/10]

bool Isis::WorkOrder::isExecutable ( Context context)
virtualinherited

Re-implement this method if your work order utilizes controls for data in order to operate.

For example, "CnetEditorViewWorkOrder" works sometimes on controls

  • the logic in side of CnetEditorViewWorkOrder::isExecutable() determines whethere or not a user is prompted with this work order as a possibility.
    Parameters
    contextThis is an enum variable with two values: NoContext,ProjectContext.
    Returns
    bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::RenameProjectWorkOrder.

Referenced by Isis::WorkOrder::isExecutable().

◆ isExecutable() [2/10]

bool Isis::WorkOrder::isExecutable ( ControlList * controls)
virtualinherited

Re-implement this method if your work order utilizes a control for data in order to operate.

Parameters
controlA control networks.
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Re-implement this method if your work order utilizes a control list (a list of control networks) for data in order to operate.

Parameters
controlsA list of control networks.
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::CnetEditorViewWorkOrder, Isis::ControlHealthMonitorWorkOrder, Isis::ExportControlNetWorkOrder, Isis::SetActiveControlWorkOrder, and Isis::ViewControlNet3DWorkOrder.

◆ isExecutable() [3/10]

bool Isis::WorkOrder::isExecutable ( CorrelationMatrix correlationMatrix)
virtualinherited

Reimplemented in Isis::MatrixViewWorkOrder.

◆ isExecutable() [4/10]

bool Isis::WorkOrder::isExecutable ( FileItemQsp fileItem)
virtualinherited

Re-implement this method if your WorkOrder utilizes FileItemQsp (a QSharedPointer to a FileItem object) for data in order to operate.

Parameters
FileItemQsp
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::BundleObservationViewWorkOrder.

◆ isExecutable() [5/10]

bool Isis::WorkOrder::isExecutable ( GuiCameraQsp guiCamera)
virtualinherited

Re-implement this method if your WorkOrder utilizes GuiCameraQsp (a QSharedPointer to a GuiCamera object) for data in order to operate.

Parameters
GuiCameraQsp
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::SensorGetInfoWorkOrder.

◆ isExecutable() [6/10]

bool Isis::WorkOrder::isExecutable ( ImageList * images)
virtualinherited

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.

Parameters
imagesAn image list that this work order should execute on
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::SetActiveImageListWorkOrder, Isis::CubeDnViewWorkOrder, Isis::ExportImagesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::RemoveImagesWorkOrder, and Isis::ImageListActionWorkOrder.

◆ isExecutable() [7/10]

bool Isis::ImportShapesWorkOrder::isExecutable ( ProjectItem * item)
virtual

This method returns true if the user clicked on a project tree node with the text "Shapes".

This is used by Directory::supportedActions(DataType data) to determine what actions are appended to context menus.

Parameters
itemThe ProjectItem that was clicked
Returns
bool True if the user clicked on a project tree node named "Shapes"

Reimplemented from Isis::WorkOrder.

◆ isExecutable() [8/10]

bool Isis::WorkOrder::isExecutable ( ShapeList * shapes)
virtualinherited

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.

Parameters
shapesA shape list that this work order should execute on
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::CubeDnViewWorkOrder, and Isis::Footprint2DViewWorkOrder.

◆ isExecutable() [9/10]

bool Isis::WorkOrder::isExecutable ( TargetBodyQsp targetBody)
virtualinherited

Re-implement this method if your work order utilizes a control list (a list of control networks) for data in order to operate.

Parameters
controlsA list of control networks.
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

Reimplemented in Isis::TargetGetInfoWorkOrder.

◆ isExecutable() [10/10]

bool Isis::WorkOrder::isExecutable ( Template * currentTemplate)
virtualinherited

Re-implement this method if your work order utilizes a control list (a list of control networks) for data in order to operate.

Parameters
controlsA list of control networks.
Returns
bool Upon re-implementation, returns True if the WorkOrder is executable, and False if it is not.

◆ isFinished()

bool Isis::WorkOrder::isFinished ( ) const
inherited

Returns the finished state of this WorkOrder.

Returns
bool Returns True if the WorkOrder is finished, False otherwise.

References Isis::WorkOrder::m_status, and Isis::WorkOrder::WorkOrderFinished.

◆ isRedoing()

bool Isis::WorkOrder::isRedoing ( ) const
inherited

Returns the redoing status of this WorkOrder.

Returns
bool Returns True if the WorkOrder is executing a redo. Returns False if it is not.

References Isis::WorkOrder::m_status, Isis::WorkOrder::project(), and Isis::WorkOrder::WorkOrderRedoing.

Referenced by Isis::WorkOrder::redo(), and Isis::WorkOrder::undo().

◆ isRedone()

bool Isis::WorkOrder::isRedone ( ) const
inherited

Returns the WorkOrder redone status.

Returns
bool Returns True if the WorkOrder has completed a Redo. False if it has not.

References Isis::WorkOrder::m_status, Isis::WorkOrder::project(), and Isis::WorkOrder::WorkOrderRedone.

Referenced by Isis::WorkOrder::redo().

◆ isSavedToHistory()

bool Isis::WorkOrder::isSavedToHistory ( ) const
inherited

Returns true if this work order is to be shown in History, otherwise false.

Returns
(bool) Returns True if this work order is to be shown in History

References Isis::WorkOrder::m_isSavedToHistory, and Isis::WorkOrder::project().

◆ isSynchronous()

bool Isis::WorkOrder::isSynchronous ( ) const
inherited

Returns true if this work order is run synchronously, otherwise false.

Returns
(bool) Returns True if this work order is run synchronously

References Isis::WorkOrder::m_isSynchronous, and Isis::WorkOrder::project().

Referenced by Isis::WorkOrder::redo(), and Isis::WorkOrder::undo().

◆ isUndoable()

bool Isis::WorkOrder::isUndoable ( ) const
inherited

Returns true if this work order is undoable, otherwise false.

This needs to be set to true and createsCleanState needs to be set to false in order for a WorkOrder to appear on the undoStack. This should be done by setting the member variable and should not be overloading this function.

Returns
(bool) Returns True if this work order is undoable, false if it is not.

References Isis::WorkOrder::m_isUndoable, and Isis::WorkOrder::project().

Referenced by Isis::WorkOrder::setupExecution().

◆ isUndoing()

bool Isis::WorkOrder::isUndoing ( ) const
inherited

Returns the WorkOrderUndoing state.

Returns
bool Returns True if the current status is WorkOrderUndoing, False otherwise.

References Isis::WorkOrder::m_status, Isis::WorkOrder::project(), and Isis::WorkOrder::WorkOrderUndoing.

Referenced by Isis::WorkOrder::redo(), and Isis::WorkOrder::undo().

◆ isUndone()

bool Isis::WorkOrder::isUndone ( ) const
inherited

Returns the WorkOrder undo status.

Returns
bool Returns True if the WorkOrder has been undone. False if it has not.

References Isis::WorkOrder::m_status, Isis::WorkOrder::project(), and Isis::WorkOrder::WorkOrderUndone.

Referenced by Isis::WorkOrder::undo().

◆ modifiesDiskState()

bool Isis::WorkOrder::modifiesDiskState ( ) const
inherited

Returns the modified disk state.

Returns
Returns True if the WorkOrder has modified the Project on disk to perform it's actions. Returns False if it has not.

References Isis::WorkOrder::project().

◆ next()

WorkOrder * Isis::WorkOrder::next ( ) const
inherited

Gets the next WorkOrder.

Returns
QPointer pointing to the next WorkOrder.

References Isis::WorkOrder::project().

◆ postExecution()

void Isis::ImportShapesWorkOrder::postExecution ( )
virtual

Add the imported shapes into the project.

If there was an error on import display a error message to the user.

Reimplemented from Isis::WorkOrder.

References Isis::Project::addShapes(), Isis::WorkOrder::project(), Isis::Project::shapes(), Isis::Project::undoStack(), and Isis::Project::warn().

◆ postUndoExecution()

void Isis::ImportShapesWorkOrder::postUndoExecution ( )
virtual

delete the imported shapes from the project.

Reimplemented from Isis::WorkOrder.

References Isis::WorkOrder::project().

◆ previous()

WorkOrder * Isis::WorkOrder::previous ( ) const
inherited

Gets the previous WorkOrder.

Returns
QPointer pointing to the previous WorkOrder.

References Isis::WorkOrder::project().

Referenced by Isis::Project::lastNotUndoneWorkOrder(), Isis::Project::lastNotUndoneWorkOrder(), and Isis::WorkOrder::redo().

◆ progressBar()

ProgressBar * Isis::WorkOrder::progressBar ( )
inherited

Returns the ProgressBar.

Returns
A QPointer to the ProgessBar.

References Isis::WorkOrder::project().

Referenced by Isis::OpenProjectWorkOrder::setupExecution().

◆ progressMax()

int Isis::WorkOrder::progressMax ( ) const
protectedinherited

Gets the maximum value of the progress range of the WorkOrder.

Returns
int The maximum value.

References Isis::WorkOrder::project().

◆ progressMin()

int Isis::WorkOrder::progressMin ( ) const
protectedinherited

Gets the minimum value of the progress range of the WorkOrder.

Returns
int The minimum value.

References Isis::WorkOrder::project().

◆ progressValue()

int Isis::WorkOrder::progressValue ( ) const
protectedinherited

Gets the current progress value of the WorkOrder.

Returns
int Returns the current progress value.

References Isis::WorkOrder::project().

◆ project()

Project * Isis::WorkOrder::project ( ) const
protectedinherited

Returns the Project this WorkOrder is attached to.

Returns
(Project *) A pointer to the Project.
Exceptions
IException::Programmer"This work order no longer has a project."

References _FILEINFO_, and Isis::IException::Programmer.

Referenced by Isis::WorkOrder::addCloneToProject(), Isis::WorkOrder::controlList(), Isis::WorkOrder::correlationMatrix(), Isis::WorkOrder::createsCleanState(), Isis::WorkOrder::directory(), Isis::BundleObservationViewWorkOrder::execute(), Isis::CloseProjectWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::ControlHealthMonitorWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::ExportControlNetWorkOrder::execute(), Isis::ExportImagesWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), execute(), Isis::JigsawWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::OpenProjectWorkOrder::execute(), Isis::RemoveImagesWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::execute(), Isis::SetActiveControlWorkOrder::execute(), Isis::SetActiveImageListWorkOrder::execute(), Isis::TargetGetInfoWorkOrder::execute(), Isis::TemplateEditViewWorkOrder::execute(), Isis::WorkOrder::executionTime(), Isis::WorkOrder::fileItem(), Isis::WorkOrder::getTemplate(), Isis::WorkOrder::guiCamera(), Isis::WorkOrder::imageList(), Isis::WorkOrder::internalData(), Isis::JigsawWorkOrder::isExecutable(), Isis::SetActiveControlWorkOrder::isExecutable(), Isis::SensorGetInfoWorkOrder::isExecutable(), Isis::SetActiveImageListWorkOrder::isExecutable(), Isis::TemplateEditViewWorkOrder::isExecutable(), Isis::TargetGetInfoWorkOrder::isExecutable(), Isis::WorkOrder::isRedoing(), Isis::WorkOrder::isRedone(), Isis::WorkOrder::isSavedToHistory(), Isis::WorkOrder::isSynchronous(), Isis::WorkOrder::isUndoable(), Isis::WorkOrder::isUndoing(), Isis::WorkOrder::isUndone(), Isis::WorkOrder::modifiesDiskState(), Isis::WorkOrder::next(), Isis::ExportControlNetWorkOrder::postExecution(), Isis::ExportImagesWorkOrder::postExecution(), Isis::ImportControlNetWorkOrder::postExecution(), Isis::ImportImagesWorkOrder::postExecution(), postExecution(), Isis::ImportImagesWorkOrder::postUndoExecution(), postUndoExecution(), Isis::WorkOrder::previous(), Isis::WorkOrder::progressBar(), Isis::WorkOrder::progressMax(), Isis::WorkOrder::progressMin(), Isis::WorkOrder::progressValue(), Isis::WorkOrder::redo(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::CloseProjectWorkOrder::setupExecution(), Isis::CubeDnViewWorkOrder::setupExecution(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::ExportImagesWorkOrder::setupExecution(), Isis::Footprint2DViewWorkOrder::setupExecution(), Isis::ImageFileListViewWorkOrder::setupExecution(), Isis::ImportImagesWorkOrder::setupExecution(), Isis::MatrixViewWorkOrder::setupExecution(), Isis::OpenProjectWorkOrder::setupExecution(), Isis::RemoveImagesWorkOrder::setupExecution(), Isis::RenameProjectWorkOrder::setupExecution(), Isis::SaveProjectWorkOrder::setupExecution(), Isis::SetActiveControlWorkOrder::setupExecution(), Isis::WorkOrder::shapeList(), Isis::WorkOrder::statusText(), Isis::WorkOrder::targetBody(), Isis::CnetEditorViewWorkOrder::undoExecution(), Isis::ImportImagesWorkOrder::undoExecution(), Isis::ImportMapTemplateWorkOrder::undoExecution(), Isis::ImportRegistrationTemplateWorkOrder::undoExecution(), undoExecution(), Isis::MatrixViewWorkOrder::undoExecution(), Isis::RenameProjectWorkOrder::undoExecution(), and Isis::WorkOrder::WorkOrder().

◆ redo

◆ save()

void Isis::WorkOrder::save ( QXmlStreamWriter & stream) const
inherited

: 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>
Parameters

b QXmlStreamWriter stream The data stream we are saving the WorkOrder to.

Exceptions
IException::UnknownThis exception is thrown if save is called while the WorkOrder is currently running.

References _FILEINFO_, Isis::WorkOrder::bestText(), Isis::WorkOrder::m_status, Isis::WorkOrder::NoContext, Isis::IException::Programmer, and Isis::WorkOrder::toString().

Referenced by Isis::CloseProjectWorkOrder::setupExecution(), and Isis::OpenProjectWorkOrder::setupExecution().

◆ setCreatesCleanState()

void Isis::WorkOrder::setCreatesCleanState ( bool createsCleanState)
protectedinherited

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. If this is set to true all wrokorders before this call will be locked.

Parameters
createsCleanStateTrue if this work order is going to save the project to disk, False otherwise.

References Isis::WorkOrder::createsCleanState().

Referenced by Isis::CloseProjectWorkOrder::CloseProjectWorkOrder(), Isis::OpenProjectWorkOrder::OpenProjectWorkOrder(), Isis::SaveProjectAsWorkOrder::SaveProjectAsWorkOrder(), and Isis::SaveProjectWorkOrder::SaveProjectWorkOrder().

◆ setData() [1/11]

void Isis::WorkOrder::setData ( Context context)
virtualinherited

Sets the context data for this WorkOrder.

Parameters
contextThis is an enum variable with two values: NoContext,ProjectContext.

Referenced by Isis::ImageListActionWorkOrder::setData(), Isis::WorkOrder::setData(), Isis::ExportControlNetWorkOrder::setupExecution(), and Isis::Directory::supportedActions().

◆ setData() [2/11]

void Isis::WorkOrder::setData ( ControlList * controls)
virtualinherited

Sets the Control data for this WorkOrder.

Parameters
controls.A pointer to the Control

Sets the ControlList data for this WorkOrder.

Parameters
controls.A pointer to the ControlList (which is a list of control networks).

◆ setData() [3/11]

void Isis::WorkOrder::setData ( CorrelationMatrix correlationMatrix)
virtualinherited

Sets the CorrelationMatrix data for this WorkOrder.

Parameters
correlationMatrixThe matrix data.

References Isis::WorkOrder::correlationMatrix().

◆ setData() [4/11]

void Isis::WorkOrder::setData ( FileItemQsp fileItem)
virtualinherited

Sets the FileItem data for this WorkOrder.

Parameters
FileItemA QSharedPointer to the FileItem.

References Isis::WorkOrder::fileItem().

◆ setData() [5/11]

void Isis::WorkOrder::setData ( GuiCameraQsp guiCamera)
virtualinherited

Sets the GuiCamera data for this WorkOrder.

Parameters
guiCameraA QSharedPointer to the GuiCamera.

References Isis::WorkOrder::guiCamera().

◆ setData() [6/11]

void Isis::WorkOrder::setData ( ImageList * images)
virtualinherited

Sets the ImageList data for this WorkOrder.

Parameters
imagesA pointer to the updated ImageList.

Reimplemented in Isis::ImageListActionWorkOrder.

◆ setData() [7/11]

◆ setData() [8/11]

void Isis::WorkOrder::setData ( QString data)
virtualinherited

◆ setData() [9/11]

void Isis::WorkOrder::setData ( ShapeList * shapes)
virtualinherited

Sets the ShapeList data for this WorkOrder.

Parameters
imagesA pointer to the updated ShapeList.

◆ setData() [10/11]

void Isis::WorkOrder::setData ( TargetBodyQsp targetBody)
virtualinherited

Sets the TargetBody data for this WorkOrder.

Parameters
targetBodyA QSharedPointer to the TargetBody.

References Isis::WorkOrder::targetBody().

◆ setData() [11/11]

void Isis::WorkOrder::setData ( Template * currentTemplate)
virtualinherited

Sets the TargetBody data for this WorkOrder.

Parameters
targetBodyA QSharedPointer to the TargetBody.

◆ setInternalData()

void Isis::WorkOrder::setInternalData ( QStringList data)
protectedinherited

◆ setModifiesDiskState()

void Isis::WorkOrder::setModifiesDiskState ( bool changesProjectOnDisk)
protectedinherited

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.

Parameters
changesProjectOnDiskTrue if this WorkOrder modifies the Project on disk. False if it does not.

Referenced by Isis::ImportControlNetWorkOrder::ImportControlNetWorkOrder(), Isis::ImportImagesWorkOrder::ImportImagesWorkOrder(), Isis::ImportMapTemplateWorkOrder::ImportMapTemplateWorkOrder(), Isis::ImportRegistrationTemplateWorkOrder::ImportRegistrationTemplateWorkOrder(), ImportShapesWorkOrder(), and Isis::RemoveImagesWorkOrder::RemoveImagesWorkOrder().

◆ setNext()

void Isis::WorkOrder::setNext ( WorkOrder * nextWorkOrder)
inherited

Sets the next WorkOrder in the sequence.

Parameters
nextWorkOrderThe next WorkOrder.

◆ setPrevious()

void Isis::WorkOrder::setPrevious ( WorkOrder * previousWorkOrder)
inherited

Sets the previous WorkOrder in the sequence.

Parameters
previousWorkOrderThe previous WorkOrder.

◆ setProgressRange()

void Isis::WorkOrder::setProgressRange ( int minValue,
int maxValue )
protectedinherited

Sets the progress range of the WorkOrder.

Parameters
minValueThe progress range minimum value.
maxValueThe progress range maximum value.

Referenced by Isis::ExportImagesWorkOrder::execute(), and Isis::ImportControlNetWorkOrder::execute().

◆ setProgressValue()

void Isis::WorkOrder::setProgressValue ( int value)
protectedinherited

Sets the current progress value for the WorkOrder.

Parameters
intvalue The value to set the current progress to.

Referenced by Isis::ExportImagesWorkOrder::execute(), and Isis::ImportControlNetWorkOrder::execute().

◆ setupExecution()

bool Isis::ImportShapesWorkOrder::setupExecution ( )
virtual

Prompt the user for shape files to import and whether to copy DN data in to project.

This method is designed to be implemented by children work orders, but they need to call this version inside of their setupExecution (at the beginning).

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.

If this method returns false the workorder will be cancelled and will not be executed.

Returns
bool Returns True is the user selected shape files to import, false if the user cancelled the import.

Reimplemented from Isis::WorkOrder.

References Isis::FileName::expanded(), Isis::FileName::extension(), Isis::FileName::original(), Isis::FileName::path(), Isis::WorkOrder::setInternalData(), and Isis::WorkOrder::setupExecution().

◆ shapeList() [1/2]

ShapeList * Isis::WorkOrder::shapeList ( )
protectedinherited

@briefReturns a pointer to the ShapeList for this WorkOrder.

Returns
(ShapeList*) A pointer to the ShapeList.

References Isis::WorkOrder::project(), and Isis::Project::shape().

Referenced by Isis::WorkOrder::isExecutable(), Isis::WorkOrder::redo(), Isis::WorkOrder::setData(), and Isis::WorkOrder::shapeList().

◆ shapeList() [2/2]

const ShapeList * Isis::WorkOrder::shapeList ( ) const
protectedinherited

A thread-safe method for retrieving a pointer to the shapeList.

Returns
(ShapeList *) A pointer to the shape list for this WorkOrder.

References Isis::WorkOrder::shapeList().

◆ statusChanged

void Isis::WorkOrder::statusChanged ( WorkOrder * )
signalinherited

◆ statusText()

QString Isis::WorkOrder::statusText ( ) const
inherited

WorkOrder::statusText.

Returns
QString A string representation of the current WorkOrder status.

References Isis::WorkOrder::m_status, Isis::WorkOrder::project(), and Isis::WorkOrder::toString().

◆ targetBody()

◆ toString()

QString Isis::WorkOrder::toString ( WorkOrderStatus status)
staticinherited

◆ undo

◆ undoExecution()

void Isis::ImportShapesWorkOrder::undoExecution ( )
virtual

Member Data Documentation

◆ m_isSavedToHistory

◆ m_isSynchronous

bool Isis::WorkOrder::m_isSynchronous
protectedinherited

This is defaulted to true.

If true, the work order will be executed on the GUI thread synchronously. If false, then the work order will be queued for execution on a non-GUI thread and will not block the GUI.

Referenced by Isis::ExportControlNetWorkOrder::ExportControlNetWorkOrder(), Isis::ExportImagesWorkOrder::ExportImagesWorkOrder(), Isis::ImportControlNetWorkOrder::ImportControlNetWorkOrder(), Isis::ImportImagesWorkOrder::ImportImagesWorkOrder(), ImportShapesWorkOrder(), Isis::WorkOrder::isSynchronous(), Isis::WorkOrder::WorkOrder(), and Isis::WorkOrder::WorkOrder().

◆ m_isUndoable

bool Isis::WorkOrder::m_isUndoable
protectedinherited

Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to be redone.

Note the workorder undoExecution() method must be implemented. This will result on the workorder being placed on the QUndoStack and being displayed in the history as being undoable. If set to false, the work order will not be put on the QUndoStack and the workorder will not be able to be undone.

Referenced by Isis::BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(), Isis::BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(), Isis::CloseProjectWorkOrder::CloseProjectWorkOrder(), Isis::CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(), Isis::ControlHealthMonitorWorkOrder::ControlHealthMonitorWorkOrder(), Isis::CubeDnViewWorkOrder::CubeDnViewWorkOrder(), Isis::ExportControlNetWorkOrder::ExportControlNetWorkOrder(), Isis::ExportImagesWorkOrder::ExportImagesWorkOrder(), Isis::Footprint2DViewWorkOrder::Footprint2DViewWorkOrder(), Isis::Footprint2DViewWorkOrder::Footprint2DViewWorkOrder(), Isis::ImageFileListViewWorkOrder::ImageFileListViewWorkOrder(), Isis::ImportControlNetWorkOrder::ImportControlNetWorkOrder(), Isis::ImportMapTemplateWorkOrder::ImportMapTemplateWorkOrder(), Isis::ImportRegistrationTemplateWorkOrder::ImportRegistrationTemplateWorkOrder(), ImportShapesWorkOrder(), Isis::WorkOrder::isUndoable(), Isis::JigsawWorkOrder::JigsawWorkOrder(), Isis::OpenProjectWorkOrder::OpenProjectWorkOrder(), Isis::RemoveImagesWorkOrder::RemoveImagesWorkOrder(), Isis::RemoveImagesWorkOrder::RemoveImagesWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::SaveProjectAsWorkOrder::SaveProjectAsWorkOrder(), Isis::SensorGetInfoWorkOrder::SensorGetInfoWorkOrder(), Isis::SetActiveControlWorkOrder::SetActiveControlWorkOrder(), Isis::SetActiveImageListWorkOrder::SetActiveImageListWorkOrder(), Isis::TargetGetInfoWorkOrder::TargetGetInfoWorkOrder(), Isis::TemplateEditViewWorkOrder::TemplateEditViewWorkOrder(), Isis::WorkOrder::WorkOrder(), and Isis::WorkOrder::WorkOrder().

◆ m_status


The documentation for this class was generated from the following files: