Isis 3 Programmer Reference
Isis::ImportImagesWorkOrder Class Reference

Add cubes to a project. More...

#include <ImportImagesWorkOrder.h>

Inheritance diagram for Isis::ImportImagesWorkOrder:
Inheritance graph
Collaboration diagram for Isis::ImportImagesWorkOrder:
Collaboration graph

Classes

class  OriginalFileToProjectCubeFunctor
 This copies the given cube(s) into the project. More...
 

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

 ImportImagesWorkOrder (Project *project)
 Creates an asynchronous WorkOrder for importing images to the project.
 
 ImportImagesWorkOrder (const ImportImagesWorkOrder &other)
 Copies the WorkOrder.
 
 ~ImportImagesWorkOrder ()
 Destructor.
 
virtual ImportImagesWorkOrderclone () const
 Creates a clone of this work order.
 
virtual bool isExecutable (ProjectItem *item)
 This method returns true if the user clicked on a project tree node with the text "Images".
 
virtual bool setupExecution ()
 Sets up this work order before being executed.
 
virtual void execute ()
 Executes the work order.
 
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 read (XmlStackedHandlerReader *xmlReader)
 Read this work order's data from disk.
 
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

virtual void undoExecution ()
 Undoes the work order's execute.
 
virtual void postExecution ()
 Associates the imported images to the project.
 
virtual void postUndoExecution ()
 Cleans up memory (images) after the undo execution occurs.
 
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
 

Private Types

enum  QueuedWorkOrderAction { NoQueuedAction , RedoQueuedAction , UndoQueuedAction }
 This enum describes the current state of a Queued WorkOrder. More...
 

Private Slots

void attemptQueuedAction ()
 Attempts to execute an action on the action queue.
 
void executionFinished ()
 Signals the Project that the WorkOrder is finished, deletes the update time for the Progress bar, and sets the finished status.
 
void clearImageList ()
 Clears the list of images.
 
void clearShapeList ()
 Clears the list of shapes.
 
void updateProgress ()
 Updates the progress bar.
 
void startRedo ()
 WorkOrder::startRedo This function is currently empty.
 

Private Member Functions

ImportImagesWorkOrderoperator= (const ImportImagesWorkOrder &rhs)
 
void importConfirmedImages (QStringList confirmedImages, bool copyDnData)
 Imports the images.
 
bool isInStableState () const
 Determines if the WorkOrder is in a stable state, or if it's busy doing something.
 
void listenForImageDestruction ()
 Checks to see if we have lost any images in the ImageList.
 
void listenForShapeDestruction ()
 Checks to see if we have lost any shapes in the ShapeList.
 
void resetProgressBar ()
 Resets the ProgressBar.
 
void setProgressToFinalText ()
 Sets the ProgressBar to display the final status of the operation.
 

Private Attributes

ImageListm_newImages
 List of images that are being imported in this work order.
 
ImageListm_list
 List of images that was succesfully imported into project.
 
QString m_warning
 String of any errors/warnings that occurred during import.
 
bool m_createsCleanState
 This is defaulted to false.
 
bool m_modifiesDiskState
 This is defaulted to false.
 
QueuedWorkOrderAction m_queuedAction
 
int m_progressRangeMinValue
 The miniumum value of the Progess Bar.
 
int m_progressRangeMaxValue
 The maximum value of the Progess Bar.
 
int m_progressValue
 The current value of the Progress Bar.
 
Context m_context
 
QString m_data
 
QPointer< ImageListm_imageList
 
QPointer< ShapeListm_shapeList
 
QPointer< ControlListm_controlList
 
CorrelationMatrix m_correlationMatrix
 
GuiCameraQsp m_guiCamera
 A QSharedPointer to the GuiCamera (the Camera object but encapsulated within a Gui framework.
 
Templatem_template
 A QSharedPointer to the Template (A Template object but encapsulated within a Gui framework.
 
TargetBodyQsp m_targetBody
 A QSharedPointer to the TargetBody (A Target object but encapsulated within a Gui framework.
 
FileItemQsp m_fileItem
 A QSharedPointer to the FileItem.
 
QStringList m_imageIds
 A QStringList of unique image identifiers for all of the images this WorkOrder is dealing with.
 
QStringList m_shapeIds
 A QStringList of unique shape identifiers for all of the shapes this WorkOrder is dealing with.
 
QStringList m_internalData
 A QStringList of internal properties for this WorkOrder.
 
QPointer< WorkOrderm_nextWorkOrder
 A pointer to the next WorkOrder in the queue.
 
QPointer< WorkOrderm_previousWorkOrder
 A pointer to the previous WorkOrder in the queue.
 
QPointer< Projectm_project
 A pointer to the Project this WorkOrder is attached to.
 
QMutex * m_transparentConstMutex
 This is used to protect the integrity of data the WorkOrder is working on so that only one thread at a time cann access it.
 
QDateTime m_executionTime
 This is the date/time that setupExecution() was called.
 
QPointer< QFutureWatcher< void > > m_futureWatcher
 A pointer to a QFutureWatcher object which monitors a QFuture object using signals and slots.
 
QPointer< ProgressBarm_progressBar
 A pointer to the ProgressBar.
 
QPointer< QTimer > m_progressBarUpdateTimer
 A pointer to the QTimer which updates the ProgressBar.
 
QPointer< QTimer > m_progressBarDeletionTimer
 A pointer to the ProgressBar deletion timer.
 
QTime * m_elapsedTimer
 A QTime object holding the excecution time of the WorkOrder.
 
double m_secondsElapsed
 The seconds that have elapsed since the WorkOrder started executing.
 

Detailed Description

Add cubes to a project.

Asks the user for a list of cube file names and whether they should be copied into the project. The cubes are then converted to external cube label files inside the project (and cube files if the user said to copy the DN data). These files are then handed off to the project.

Author
2012-??-?? Steven Lambright and Stuart Sides
History

2012-08-24 Steven Lambright and Stuart Sides - Removed GUI-thread slowdown of image verification

2012-08-29 Steven Lambright - This work order should now work correctly even when just 1 QtConcurrent thread is enabled.

2012-10-02 Steven Lambright - Image ID's are now guaranteed to be the same after undo/redo. This is a beginning step for making work orders whose images are freed from memory undo/redo correctly.

2012-10-29 Steven Lambright - Added a prompt to save the project if importing a lot of images to a temporary project.

2017-04-05 Ian Humphrey and Makayla Shepherd - Renamed the following: execute() to setupExeuction(), asyncRedo() to execute(), syncUndo() to undoExecution(), postSyncRedo() to postExecution(), and postSyncUndo() to postUndoExecution(). Added isSynchronous(). This is related to the WorkOrder redesign. Fixes #4732.

2017-04-11 Ian Humphrey - Removed isSynchronous() and instead set inherited member m_isSynchronous to false in constructor to indicate this is an asynchronous work order. Updated documentation. References #4732.

2017-05-01 Ian Humphrey - Updated undoExecution() so that when undo, imported images are removed from the project tree. Fixes #4597.

2017-07-06 Cole Neubauer - Added ability to have cube lists without full file path Fixes #4956

2017-07-14 Cole Neubauer - Added ability successfully import after failing to import a set or list of images Fixes #5015

2017-07-14 Cole Neubauer - Made import statement more descriptive when importing a cube list Fixes #5042

2017-07-17 Makayla Shepherd - Added isExecutable(ProjectItem) to allow for importing in the context menu. Fixes #4968.

2017-07-25 Cole Neubauer - Added project()->setClean call #4969

2017-07-26 Makayla Shepherd - Fixed a crash that occurs when a failed image import is undone. Fixes #5043.

2017-07-28 Cole Neubauer - Added a pointer to the project item added by the work order. This pointer is used in the Undo funtions #5064

2017-08-11 Cole Neubauer - Created a try catch around a previously unprotected error to handle errors thrown in the workorder that halted execution. Fixes #5026.

2017-11-02 Tyler Wilson - Added a null pointer check around ProjectItem *item pointer in isExecutable to prevent potential seg faults. References #4492.

History

2017-11-13 Cole Neubauer - Fixed apsolute paths not being read correctly in cubelis Fixes #4956

2017-09-26 Tracie Sucharski - In importConfirmedImages, pass in the cube pointer to Image constructor rather than the future result. Null out the cube pointer after it is closed in the Image. After output ecub is created reopen created ecub as readOnly. When closing cube, the labels were being re-written because the cube was read/write. This caused a segfault when imported large number of images because of a label template file being opened too many times. Uncommented error checking in functor operator method. Fixes #4955.

2018-01-18 Tracie Sucharski - Add the targets and gui cameras to the project. Fixes #5181.

2018-07-12 Summer Stapleton - Updated how adding the targets and the gui cameras to the project is handled to address segfault. Instead of creating a camera and a target with every new image imported and adding them if needed, they are now no longer created in the first place except when needed. Fixes #5460.

2018-07-19 Tracie Sucharski - Changed default button for importing DN data to "No".

Definition at line 109 of file ImportImagesWorkOrder.h.

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).

Definition at line 339 of file WorkOrder.h.

◆ QueuedWorkOrderAction

This enum describes the current state of a Queued WorkOrder.

Definition at line 483 of file WorkOrder.h.

◆ WorkOrderStatus

This enumeration is used by other functions to set and retrieve the current state of the WorkOrder.

Enumerator
WorkOrderFinished 

This is used for work orders that will not undo or redo (See createsCleanState())

Definition at line 321 of file WorkOrder.h.

Constructor & Destructor Documentation

◆ ImportImagesWorkOrder() [1/2]

Isis::ImportImagesWorkOrder::ImportImagesWorkOrder ( Project * project)

Creates an asynchronous WorkOrder for importing images to the project.

Parameters
Project*project Project to import images into.

Definition at line 48 of file ImportImagesWorkOrder.cpp.

References Isis::WorkOrder::m_isSynchronous, m_list, m_newImages, and Isis::WorkOrder::setModifiesDiskState().

Referenced by clone().

◆ ImportImagesWorkOrder() [2/2]

Isis::ImportImagesWorkOrder::ImportImagesWorkOrder ( const ImportImagesWorkOrder & other)

Copies the WorkOrder.

Parameters
ImportImagesWorkOrder&other The other work order to copy state from.

Definition at line 66 of file ImportImagesWorkOrder.cpp.

References m_list, and m_newImages.

◆ ~ImportImagesWorkOrder()

Isis::ImportImagesWorkOrder::~ImportImagesWorkOrder ( )

Destructor.

Releases the memory for the m_newImages member.

Definition at line 78 of file ImportImagesWorkOrder.cpp.

References m_list, and m_newImages.

Member Function Documentation

◆ addCloneToProject

void Isis::WorkOrder::addCloneToProject ( )
protectedslotinherited

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

Definition at line 1450 of file WorkOrder.cpp.

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

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

◆ attemptQueuedAction

void Isis::WorkOrder::attemptQueuedAction ( )
privateslotinherited

Attempts to execute an action on the action queue.

Definition at line 1573 of file WorkOrder.cpp.

References Isis::WorkOrder::redo(), and Isis::WorkOrder::undo().

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

◆ 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.

Definition at line 793 of file WorkOrder.cpp.

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

◆ clearImageList

void Isis::WorkOrder::clearImageList ( )
privateslotinherited

Clears the list of images.

Definition at line 1621 of file WorkOrder.cpp.

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

◆ clearShapeList

void Isis::WorkOrder::clearShapeList ( )
privateslotinherited

Clears the list of shapes.

Definition at line 1629 of file WorkOrder.cpp.

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

◆ clone()

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

Creates a clone of this work order.

See also
WorkOrder::clone()
Returns
ImportImagesWorkOrder* Returns a pointer to the newly cloned work order.

Implements Isis::WorkOrder.

Definition at line 93 of file ImportImagesWorkOrder.cpp.

References ImportImagesWorkOrder().

◆ controlList()

QPointer< ControlList > Isis::WorkOrder::controlList ( )
protectedinherited

◆ correlationMatrix()

CorrelationMatrix Isis::WorkOrder::correlationMatrix ( )
protectedinherited

Returns the CorrleationMatrix for this WorkOrder.

Returns
A CorrelationMatrix.

Definition at line 694 of file WorkOrder.cpp.

References Isis::WorkOrder::project().

Referenced by Isis::MatrixViewWorkOrder::execute(), Isis::WorkOrder::setData(), and Isis::MatrixViewWorkOrder::setupExecution().

◆ 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.

Definition at line 852 of file WorkOrder.cpp.

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

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

◆ 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.

Definition at line 779 of file WorkOrder.cpp.

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

◆ directory()

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

return the workorder project directory Returns the Directory object of the Project this WorkOrder is attached to.

Returns
(Directory *) A pointer to the Directory.

Definition at line 1288 of file WorkOrder.cpp.

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

Referenced by Isis::CnetEditorViewWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), and Isis::JigsawWorkOrder::isExecutable().

◆ 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()

Definition at line 1228 of file WorkOrder.cpp.

◆ 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()

Definition at line 1216 of file WorkOrder.cpp.

◆ execute()

void Isis::ImportImagesWorkOrder::execute ( )
virtual

Executes the work order.

This actually "does" the work order task. In this case, this imports the images into memory and copies any necessary data to disk. This was renamed from asyncRedo() to execute() according to the WorkOrder redesign.

See also
ImportImagesWorkOrder::importConfirmedImages(QStringList confirmedImages, bool copyDnData)
WorkOrder::execute()

Reimplemented from Isis::WorkOrder.

Definition at line 282 of file ImportImagesWorkOrder.cpp.

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

◆ executionFinished

◆ executionTime()

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

Gets the execution time of this WorkOrder.

Returns
QDateTime The execution time.

Definition at line 862 of file WorkOrder.cpp.

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

Referenced by Isis::WorkOrder::XmlHandler::startElement().

◆ fileItem()

FileItemQsp Isis::WorkOrder::fileItem ( )
protectedinherited

◆ 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.

Definition at line 986 of file WorkOrder.cpp.

References Isis::WorkOrder::toString().

Referenced by Isis::WorkOrder::XmlHandler::startElement().

◆ 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.

Definition at line 714 of file WorkOrder.cpp.

References Isis::WorkOrder::imageList(), and Isis::WorkOrder::m_transparentConstMutex.

◆ importConfirmedImages()

void Isis::ImportImagesWorkOrder::importConfirmedImages ( QStringList confirmedImages,
bool copyDnData )
private

Imports the images.

Creates a project image folder and copies the cubes into it. This will create the *.ecub and *.cub files inside of the project. This can be thought of as:

  mkdir project/images/import1
  cp in1.cub in2.cub project/images/import1

This should be called in a non-GUI thread.

Parameters
confirmedImagesThis is a list of cube file names outside of the project folder
copyDnDataIf this is true, this will create both the *.cub and *.ecub files in the project. Otherwise, only the external label files (*.ecub) will be created inside of the project.

Definition at line 482 of file ImportImagesWorkOrder.cpp.

References Isis::Project::addCamera(), Isis::Project::addImageFolder(), Isis::Project::addTarget(), Isis::ImageList::append(), Isis::Cube::camera(), Isis::Image::closeCube(), Isis::Image::displayProperties(), Isis::PvlObject::findGroup(), Isis::Image::id(), Isis::WorkOrder::internalData(), Isis::Cube::label(), m_newImages, m_warning, Isis::WorkOrder::project(), Isis::Image::setId(), Isis::WorkOrder::setInternalData(), Isis::WorkOrder::setProgressRange(), Isis::WorkOrder::setProgressValue(), Isis::Spice::target(), and Isis::PvlObject::Traverse.

Referenced by execute().

◆ internalData()

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

Gets the internal data for this WorkOrder.

Returns
QStringList Returns the internal data object.

Definition at line 1375 of file WorkOrder.cpp.

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

Referenced by Isis::CubeDnViewWorkOrder::execute(), Isis::ExportControlNetWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), execute(), Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), Isis::ImportShapesWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::ImageListActionWorkOrder::execute(), Isis::ImageListActionWorkOrder::ImageListActionWorkOrder(), importConfirmedImages(), Isis::ImportShapesWorkOrder::importConfirmedShapes(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::ImageListActionWorkOrder::setData(), Isis::CubeDnViewWorkOrder::setupExecution(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::Footprint2DViewWorkOrder::setupExecution(), Isis::ImportControlNetWorkOrder::setupExecution(), Isis::MatrixViewWorkOrder::setupExecution(), Isis::RenameProjectWorkOrder::setupExecution(), Isis::SensorGetInfoWorkOrder::setupExecution(), Isis::TargetGetInfoWorkOrder::setupExecution(), Isis::TemplateEditViewWorkOrder::setupExecution(), Isis::ImageListActionWorkOrder::setupExecution(), 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.

Definition at line 180 of file WorkOrder.cpp.

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.

Definition at line 232 of file WorkOrder.cpp.

◆ isExecutable() [3/10]

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

Reimplemented in Isis::MatrixViewWorkOrder.

Definition at line 237 of file WorkOrder.cpp.

◆ 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.

Definition at line 444 of file WorkOrder.cpp.

◆ 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.

Definition at line 432 of file WorkOrder.cpp.

◆ 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.

Definition at line 194 of file WorkOrder.cpp.

◆ isExecutable() [7/10]

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

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

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.

Definition at line 107 of file ImportImagesWorkOrder.cpp.

◆ 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.

Definition at line 208 of file WorkOrder.cpp.

◆ 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.

Definition at line 408 of file WorkOrder.cpp.

◆ 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.

Definition at line 420 of file WorkOrder.cpp.

◆ 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.

Definition at line 872 of file WorkOrder.cpp.

References Isis::WorkOrder::WorkOrderFinished.

◆ isInStableState()

bool Isis::WorkOrder::isInStableState ( ) const
privateinherited

Determines if the WorkOrder is in a stable state, or if it's busy doing something.

Returns
bool Returns True if the WorkOrder is in a stable state, and False if it is not.

Definition at line 1461 of file WorkOrder.cpp.

References Isis::WorkOrder::isRedoing(), and Isis::WorkOrder::isUndoing().

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

◆ 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.

Definition at line 881 of file WorkOrder.cpp.

References Isis::WorkOrder::project().

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

◆ 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.

Definition at line 891 of file WorkOrder.cpp.

References Isis::WorkOrder::project().

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

◆ 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

Definition at line 828 of file WorkOrder.cpp.

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

Definition at line 839 of file WorkOrder.cpp.

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.

Definition at line 817 of file WorkOrder.cpp.

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.

Definition at line 901 of file WorkOrder.cpp.

References Isis::WorkOrder::project().

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

◆ 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.

Definition at line 911 of file WorkOrder.cpp.

References Isis::WorkOrder::project().

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

◆ listenForImageDestruction()

void Isis::WorkOrder::listenForImageDestruction ( )
privateinherited

Checks to see if we have lost any images in the ImageList.

If we have, then destroy the entire list. This will send a signal that the list needs to be rebuilt if requested.

Definition at line 1477 of file WorkOrder.cpp.

References Isis::WorkOrder::clearImageList(), Isis::Image::id(), and Isis::WorkOrder::m_imageIds.

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

◆ listenForShapeDestruction()

void Isis::WorkOrder::listenForShapeDestruction ( )
privateinherited

Checks to see if we have lost any shapes in the ShapeList.

If we have, then destroy the entire list. This will send a signal that the list needs to be rebuilt if requested.

TODO 2016-07-26 TLS Combine this with listenForImageDestruction() - Basically duplicate code.

Definition at line 1500 of file WorkOrder.cpp.

References Isis::WorkOrder::clearShapeList(), Isis::Shape::id(), and Isis::WorkOrder::m_shapeIds.

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

◆ 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.

Definition at line 922 of file WorkOrder.cpp.

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

◆ next()

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

Gets the next WorkOrder.

Returns
QPointer pointing to the next WorkOrder.

Definition at line 932 of file WorkOrder.cpp.

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

◆ postExecution()

void Isis::ImportImagesWorkOrder::postExecution ( )
protectedvirtual

Associates the imported images to the project.

After execute finishes, associates the imported images to the project. This will also notify the project if there are any warnings that occurred related to the import. This was renamed from postSyncRedo() to postExecution() according to the WorkOrder redesign.

See also
Project::addImages(Imagelist newImages)
WorkOrder::postExecution()

Reimplemented from Isis::WorkOrder.

Definition at line 308 of file ImportImagesWorkOrder.cpp.

References Isis::Project::addImages(), Isis::Project::images(), m_list, m_newImages, m_warning, Isis::WorkOrder::project(), and Isis::WorkOrder::WorkOrderFinished.

◆ postUndoExecution()

void Isis::ImportImagesWorkOrder::postUndoExecution ( )
protectedvirtual

Cleans up memory (images) after the undo execution occurs.

After the undoExecution() occurs, this cleans up memory that was allocated for the images from this import. This was renamed from postSyncUndo() to postUndoExecution() according to the WorkOrder redesign.

See also
WorkOrder::postUndoExecution()

Reimplemented from Isis::WorkOrder.

Definition at line 262 of file ImportImagesWorkOrder.cpp.

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

◆ previous()

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

Gets the previous WorkOrder.

Returns
QPointer pointing to the previous WorkOrder.

Definition at line 942 of file WorkOrder.cpp.

References Isis::WorkOrder::m_previousWorkOrder, and 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.

Definition at line 973 of file WorkOrder.cpp.

References Isis::WorkOrder::m_progressBar, and 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.

Definition at line 1335 of file WorkOrder.cpp.

References Isis::WorkOrder::m_progressRangeMaxValue, and 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.

Definition at line 1325 of file WorkOrder.cpp.

References Isis::WorkOrder::m_progressRangeMinValue, and 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.

Definition at line 1345 of file WorkOrder.cpp.

References Isis::WorkOrder::m_progressValue, and 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."

Definition at line 1298 of file WorkOrder.cpp.

References Isis::WorkOrder::m_project, and Isis::IException::Programmer.

Referenced by Isis::WorkOrder::addCloneToProject(), Isis::ImportControlNetWorkOrder::cnetReady(), Isis::WorkOrder::controlList(), Isis::WorkOrder::correlationMatrix(), Isis::ImportControlNetWorkOrder::CreateControlsFunctor::CreateControlsFunctor(), Isis::WorkOrder::createsCleanState(), Isis::WorkOrder::directory(), Isis::BundleObservationViewWorkOrder::execute(), Isis::CloseProjectWorkOrder::execute(), Isis::ControlHealthMonitorWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::ExportControlNetWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImportControlNetWorkOrder::execute(), execute(), Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), Isis::ImportShapesWorkOrder::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(), importConfirmedImages(), Isis::ImportShapesWorkOrder::importConfirmedShapes(), 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::ImportControlNetWorkOrder::postExecution(), postExecution(), Isis::ImportShapesWorkOrder::postExecution(), postUndoExecution(), Isis::ImportShapesWorkOrder::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::Footprint2DViewWorkOrder::setupExecution(), 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(), undoExecution(), Isis::ImportMapTemplateWorkOrder::undoExecution(), Isis::ImportRegistrationTemplateWorkOrder::undoExecution(), Isis::ImportShapesWorkOrder::undoExecution(), Isis::MatrixViewWorkOrder::undoExecution(), Isis::RenameProjectWorkOrder::undoExecution(), and Isis::WorkOrder::WorkOrder().

◆ read()

void Isis::WorkOrder::read ( XmlStackedHandlerReader * xmlReader)
inherited

Read this work order's data from disk.

Definition at line 518 of file WorkOrder.cpp.

◆ redo

◆ resetProgressBar()

◆ 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.

Definition at line 542 of file WorkOrder.cpp.

References Isis::WorkOrder::bestText(), Isis::WorkOrder::isInStableState(), Isis::WorkOrder::m_executionTime, Isis::WorkOrder::m_imageIds, Isis::WorkOrder::m_internalData, Isis::WorkOrder::m_shapeIds, 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.

Definition at line 1661 of file WorkOrder.cpp.

References Isis::WorkOrder::createsCleanState(), and Isis::WorkOrder::m_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.

Definition at line 246 of file WorkOrder.cpp.

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).

Definition at line 295 of file WorkOrder.cpp.

◆ setData() [3/11]

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

Sets the CorrelationMatrix data for this WorkOrder.

Parameters
correlationMatrixThe matrix data.

Definition at line 304 of file WorkOrder.cpp.

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.

Definition at line 342 of file WorkOrder.cpp.

References Isis::WorkOrder::fileItem(), and Isis::WorkOrder::m_fileItem.

◆ setData() [5/11]

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

Sets the GuiCamera data for this WorkOrder.

Parameters
guiCameraA QSharedPointer to the GuiCamera.

Definition at line 333 of file WorkOrder.cpp.

References Isis::WorkOrder::guiCamera(), and Isis::WorkOrder::m_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.

Definition at line 259 of file WorkOrder.cpp.

References Isis::WorkOrder::listenForImageDestruction(), and Isis::WorkOrder::m_imageIds.

◆ setData() [7/11]

◆ setData() [8/11]

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

Definition at line 250 of file WorkOrder.cpp.

◆ setData() [9/11]

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

Sets the ShapeList data for this WorkOrder.

Parameters
imagesA pointer to the updated ShapeList.

Definition at line 272 of file WorkOrder.cpp.

References Isis::WorkOrder::listenForShapeDestruction(), and Isis::WorkOrder::m_shapeIds.

◆ setData() [10/11]

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

Sets the TargetBody data for this WorkOrder.

Parameters
targetBodyA QSharedPointer to the TargetBody.

Definition at line 315 of file WorkOrder.cpp.

References Isis::WorkOrder::m_targetBody, and 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.

Definition at line 324 of file WorkOrder.cpp.

References Isis::WorkOrder::m_template.

◆ 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.

Definition at line 1672 of file WorkOrder.cpp.

References Isis::WorkOrder::m_modifiesDiskState.

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

◆ setNext()

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

Sets the next WorkOrder in the sequence.

Parameters
nextWorkOrderThe next WorkOrder.

Definition at line 611 of file WorkOrder.cpp.

References Isis::WorkOrder::m_nextWorkOrder.

◆ setPrevious()

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

Sets the previous WorkOrder in the sequence.

Parameters
previousWorkOrderThe previous WorkOrder.

Definition at line 620 of file WorkOrder.cpp.

References Isis::WorkOrder::m_previousWorkOrder.

◆ 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.

Definition at line 1356 of file WorkOrder.cpp.

References Isis::WorkOrder::m_progressRangeMaxValue, and Isis::WorkOrder::m_progressRangeMinValue.

Referenced by Isis::ImportControlNetWorkOrder::execute(), importConfirmedImages(), and Isis::ImportShapesWorkOrder::importConfirmedShapes().

◆ setProgressToFinalText()

void Isis::WorkOrder::setProgressToFinalText ( )
privateinherited

◆ 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.

Definition at line 1366 of file WorkOrder.cpp.

References Isis::WorkOrder::m_progressValue.

Referenced by Isis::ImportControlNetWorkOrder::execute(), importConfirmedImages(), and Isis::ImportShapesWorkOrder::importConfirmedShapes().

◆ setupExecution()

bool Isis::ImportImagesWorkOrder::setupExecution ( )
virtual

Sets up this work order before being executed.

First invokes WorkOrder's setupExecution(). Prompts the user for cubes and image list files to import and stores them via a setInternalData() call. If there are more than 100 images to import, the user is prompted if they want to save their project before the import occurs. If yes, a SaveProjectWorkOrder will be executed. This setup is considered successful if the user does not hit cancel on a dialog prompt and if there is at least one image has been selected by the user to import. This method was renamed from execute() to setupExecution() according to the WorkOrder redesign.

See also
WorkOrder::setupExecution()
Returns
bool Returns true if the setup was successful.

Reimplemented from Isis::WorkOrder.

Definition at line 132 of file ImportImagesWorkOrder.cpp.

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

◆ shapeList() [1/2]

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

◆ 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.

Definition at line 724 of file WorkOrder.cpp.

References Isis::WorkOrder::m_transparentConstMutex, and Isis::WorkOrder::shapeList().

◆ startRedo

void Isis::WorkOrder::startRedo ( )
privateslotinherited

WorkOrder::startRedo This function is currently empty.

Definition at line 1648 of file WorkOrder.cpp.

◆ statusText()

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

WorkOrder::statusText.

Returns
QString A string representation of the current WorkOrder status.

Definition at line 952 of file WorkOrder.cpp.

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

◆ targetBody()

◆ toString()

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

Gets the current status of the WorkOrder.

Parameters
statusAn enumeration of all possible WorkOrder states.
Returns
QString Returns a string representation of the current status of the WorkOrder.

Definition at line 1007 of file WorkOrder.cpp.

References Isis::WorkOrder::WorkOrderFinished.

Referenced by Isis::WorkOrder::fromStatusString(), Isis::WorkOrder::save(), and Isis::WorkOrder::statusText().

◆ undo

◆ undoExecution()

void Isis::ImportImagesWorkOrder::undoExecution ( )
protectedvirtual

Undoes the work order's execute.

After this ImportImagesWorkOrder has executed and finished (all the images have been read), this removes the images from this import from disk in the project's directory. This was renamed from asyncUndo() to undoExecution() according to the WorkOrder redesign.

See also
WorkOrder::undoExecution()

Reimplemented from Isis::WorkOrder.

Definition at line 240 of file ImportImagesWorkOrder.cpp.

References Isis::ImageList::deleteFromDisk(), Isis::Project::directory(), Isis::ProjectItemModel::findItemData(), m_list, Isis::Directory::model(), Isis::WorkOrder::project(), Isis::ProjectItemModel::removeItem(), and Isis::Project::waitForImageReaderFinished().

◆ updateProgress

Member Data Documentation

◆ m_context

Context Isis::WorkOrder::m_context
privateinherited

Definition at line 573 of file WorkOrder.h.

◆ m_controlList

QPointer<ControlList> Isis::WorkOrder::m_controlList
privateinherited

Definition at line 577 of file WorkOrder.h.

◆ m_correlationMatrix

CorrelationMatrix Isis::WorkOrder::m_correlationMatrix
privateinherited

Definition at line 578 of file WorkOrder.h.

◆ m_createsCleanState

bool Isis::WorkOrder::m_createsCleanState
privateinherited

This is defaulted to false.

If a work order saves the project to disk, this causes a 'clean' (non-dirty) state. These work orders should call setCreatesCleanState(true) in their constructor.

Definition at line 549 of file WorkOrder.h.

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

◆ m_data

QString Isis::WorkOrder::m_data
privateinherited

Definition at line 574 of file WorkOrder.h.

◆ m_elapsedTimer

QTime* Isis::WorkOrder::m_elapsedTimer
privateinherited

A QTime object holding the excecution time of the WorkOrder.

Definition at line 677 of file WorkOrder.h.

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

◆ m_executionTime

QDateTime Isis::WorkOrder::m_executionTime
privateinherited

◆ m_fileItem

FileItemQsp Isis::WorkOrder::m_fileItem
privateinherited

◆ m_futureWatcher

QPointer< QFutureWatcher<void> > Isis::WorkOrder::m_futureWatcher
privateinherited

A pointer to a QFutureWatcher object which monitors a QFuture object using signals and slots.

A QFuture object represents the results of an asynchrounous operation.

Definition at line 654 of file WorkOrder.h.

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

◆ m_guiCamera

GuiCameraQsp Isis::WorkOrder::m_guiCamera
privateinherited

A QSharedPointer to the GuiCamera (the Camera object but encapsulated within a Gui framework.

Definition at line 583 of file WorkOrder.h.

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

◆ m_imageIds

QStringList Isis::WorkOrder::m_imageIds
privateinherited

A QStringList of unique image identifiers for all of the images this WorkOrder is dealing with.

Definition at line 610 of file WorkOrder.h.

Referenced by Isis::WorkOrder::imageList(), Isis::WorkOrder::listenForImageDestruction(), Isis::WorkOrder::save(), Isis::WorkOrder::setData(), and Isis::WorkOrder::WorkOrder().

◆ m_imageList

QPointer<ImageList> Isis::WorkOrder::m_imageList
privateinherited

Definition at line 575 of file WorkOrder.h.

◆ m_internalData

QStringList Isis::WorkOrder::m_internalData
privateinherited

A QStringList of internal properties for this WorkOrder.

Definition at line 621 of file WorkOrder.h.

Referenced by Isis::WorkOrder::internalData(), Isis::WorkOrder::save(), Isis::WorkOrder::setInternalData(), and Isis::WorkOrder::WorkOrder().

◆ 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.

Definition at line 530 of file WorkOrder.h.

Referenced by Isis::ExportControlNetWorkOrder::ExportControlNetWorkOrder(), Isis::ImportControlNetWorkOrder::ImportControlNetWorkOrder(), ImportImagesWorkOrder(), Isis::ImportShapesWorkOrder::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.

Definition at line 523 of file WorkOrder.h.

Referenced by Isis::BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(), Isis::BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(), Isis::CloseProjectWorkOrder::CloseProjectWorkOrder(), Isis::ControlHealthMonitorWorkOrder::ControlHealthMonitorWorkOrder(), Isis::CubeDnViewWorkOrder::CubeDnViewWorkOrder(), Isis::ExportControlNetWorkOrder::ExportControlNetWorkOrder(), Isis::Footprint2DViewWorkOrder::Footprint2DViewWorkOrder(), Isis::Footprint2DViewWorkOrder::Footprint2DViewWorkOrder(), Isis::ImportControlNetWorkOrder::ImportControlNetWorkOrder(), Isis::ImportMapTemplateWorkOrder::ImportMapTemplateWorkOrder(), Isis::ImportRegistrationTemplateWorkOrder::ImportRegistrationTemplateWorkOrder(), Isis::ImportShapesWorkOrder::ImportShapesWorkOrder(), Isis::WorkOrder::isUndoable(), Isis::JigsawWorkOrder::JigsawWorkOrder(), Isis::OpenProjectWorkOrder::OpenProjectWorkOrder(), 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_list

ImageList* Isis::ImportImagesWorkOrder::m_list
private

List of images that was succesfully imported into project.

Definition at line 169 of file ImportImagesWorkOrder.h.

Referenced by ImportImagesWorkOrder(), ImportImagesWorkOrder(), postExecution(), postUndoExecution(), undoExecution(), and ~ImportImagesWorkOrder().

◆ m_modifiesDiskState

bool Isis::WorkOrder::m_modifiesDiskState
privateinherited

This is defaulted to false.

If a WorkOrder modifies the project on disk to perform its actions (for example, an import WorkOrder), the WorkOrder should call setModifiesDiskState(true) in its constructor.

Definition at line 556 of file WorkOrder.h.

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

◆ m_newImages

ImageList* Isis::ImportImagesWorkOrder::m_newImages
private

List of images that are being imported in this work order.

Definition at line 168 of file ImportImagesWorkOrder.h.

Referenced by importConfirmedImages(), ImportImagesWorkOrder(), ImportImagesWorkOrder(), postExecution(), and ~ImportImagesWorkOrder().

◆ m_nextWorkOrder

QPointer<WorkOrder> Isis::WorkOrder::m_nextWorkOrder
privateinherited

A pointer to the next WorkOrder in the queue.

Definition at line 626 of file WorkOrder.h.

Referenced by Isis::WorkOrder::next(), Isis::WorkOrder::setNext(), and Isis::WorkOrder::~WorkOrder().

◆ m_previousWorkOrder

QPointer<WorkOrder> Isis::WorkOrder::m_previousWorkOrder
privateinherited

A pointer to the previous WorkOrder in the queue.

Definition at line 631 of file WorkOrder.h.

Referenced by Isis::WorkOrder::previous(), Isis::WorkOrder::setPrevious(), and Isis::WorkOrder::~WorkOrder().

◆ m_progressBar

◆ m_progressBarDeletionTimer

QPointer<QTimer> Isis::WorkOrder::m_progressBarDeletionTimer
privateinherited

A pointer to the ProgressBar deletion timer.

Definition at line 671 of file WorkOrder.h.

Referenced by Isis::WorkOrder::resetProgressBar(), Isis::WorkOrder::setProgressToFinalText(), and Isis::WorkOrder::~WorkOrder().

◆ m_progressBarUpdateTimer

QPointer<QTimer> Isis::WorkOrder::m_progressBarUpdateTimer
privateinherited

A pointer to the QTimer which updates the ProgressBar.

Definition at line 666 of file WorkOrder.h.

Referenced by Isis::WorkOrder::executionFinished(), Isis::WorkOrder::resetProgressBar(), and Isis::WorkOrder::~WorkOrder().

◆ m_progressRangeMaxValue

int Isis::WorkOrder::m_progressRangeMaxValue
privateinherited

◆ m_progressRangeMinValue

int Isis::WorkOrder::m_progressRangeMinValue
privateinherited

◆ m_progressValue

int Isis::WorkOrder::m_progressValue
privateinherited

◆ m_project

QPointer<Project> Isis::WorkOrder::m_project
privateinherited

◆ m_queuedAction

QueuedWorkOrderAction Isis::WorkOrder::m_queuedAction
privateinherited

Definition at line 558 of file WorkOrder.h.

◆ m_secondsElapsed

double Isis::WorkOrder::m_secondsElapsed
privateinherited

The seconds that have elapsed since the WorkOrder started executing.

Definition at line 682 of file WorkOrder.h.

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

◆ m_shapeIds

QStringList Isis::WorkOrder::m_shapeIds
privateinherited

A QStringList of unique shape identifiers for all of the shapes this WorkOrder is dealing with.

Definition at line 616 of file WorkOrder.h.

Referenced by Isis::WorkOrder::listenForShapeDestruction(), Isis::WorkOrder::save(), Isis::WorkOrder::setData(), Isis::WorkOrder::shapeList(), and Isis::WorkOrder::WorkOrder().

◆ m_shapeList

QPointer<ShapeList> Isis::WorkOrder::m_shapeList
privateinherited

Definition at line 576 of file WorkOrder.h.

◆ m_status

WorkOrderStatus Isis::WorkOrder::m_status
protectedinherited

Definition at line 539 of file WorkOrder.h.

◆ m_targetBody

TargetBodyQsp Isis::WorkOrder::m_targetBody
privateinherited

A QSharedPointer to the TargetBody (A Target object but encapsulated within a Gui framework.

Definition at line 597 of file WorkOrder.h.

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

◆ m_template

Template* Isis::WorkOrder::m_template
privateinherited

A QSharedPointer to the Template (A Template object but encapsulated within a Gui framework.

Definition at line 590 of file WorkOrder.h.

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

◆ m_transparentConstMutex

QMutex* Isis::WorkOrder::m_transparentConstMutex
privateinherited

This is used to protect the integrity of data the WorkOrder is working on so that only one thread at a time cann access it.

Definition at line 642 of file WorkOrder.h.

Referenced by Isis::WorkOrder::imageList(), Isis::WorkOrder::shapeList(), Isis::WorkOrder::WorkOrder(), Isis::WorkOrder::WorkOrder(), and Isis::WorkOrder::~WorkOrder().

◆ m_warning

QString Isis::ImportImagesWorkOrder::m_warning
private

String of any errors/warnings that occurred during import.

Definition at line 170 of file ImportImagesWorkOrder.h.

Referenced by importConfirmedImages(), and postExecution().


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