USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::MoveUpOneSceneWorkOrder Class Reference

Move images, one by one, on top of the immediately-above intersecting image in a scene. More...

#include <MoveUpOneSceneWorkOrder.h>

Inherits Isis::MosaicSceneWorkOrder.

List of all members.

Public Types

enum  WorkOrderStatus {
  WorkOrderUnknownStatus = 0, WorkOrderNotStarted, WorkOrderRedoing, WorkOrderRedone,
  WorkOrderUndoing, WorkOrderUndone, WorkOrderFinished, WorkOrderLastStatus = WorkOrderFinished
}
enum  Context { NoContext, ProjectContext }

Public Slots

virtual bool execute ()
 The (child) implementation of this method should prompt the user/gather state by any means necessary.
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

 MoveUpOneSceneWorkOrder (MosaicSceneWidget *scene, Project *project)
 MoveUpOneSceneWorkOrder (Project *project)
 MoveUpOneSceneWorkOrder (const MoveUpOneSceneWorkOrder &other)
 ~MoveUpOneSceneWorkOrder ()
virtual MoveUpOneSceneWorkOrderclone () const
void syncRedo ()
 This method is designed to be implemented by children work orders.
void syncUndo ()
 This method is designed to be implemented by children work orders.
virtual bool isExecutable (Context)
 Re-implement this method if your work order utilizes controls for data in order to operate.
virtual bool isExecutable (QList< Control * > controls)
 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.
void read (XmlStackedHandlerReader *xmlReader)
 Read this work order's data from disk.
void save (QXmlStreamWriter &stream) const
 Output XML format:.
virtual void setData (Context)
virtual void setData (ImageList *images)
virtual void setData (QList< Control * > controls)
void setNext (WorkOrder *nextWorkOrder)
void setPrevious (WorkOrder *previousWorkOrder)
QString bestText () const
bool createsCleanState () const
QDateTime executionTime () const
bool isFinished () const
bool isRedoing () const
bool isRedone () const
bool isUndoing () const
bool isUndone () const
bool modifiesDiskState () const
WorkOrdernext () const
WorkOrderprevious () const
QString statusText () const
ProgressBarprogressBar ()

Static Public Member Functions

static WorkOrderStatus fromStatusString (QString)
static QString toString (WorkOrderStatus)

Protected Slots

void addCloneToProject ()

Protected Member Functions

MosaicSceneWidgetscene ()
void restoreZPositions (bool zValuesMightBeInUse)
void storeZPositions (QList< double > zPositions)
ImageListimageList ()
const ImageListimageList () const
QList< Control * > controlList ()
virtual bool dependsOn (WorkOrder *other) const
Directorydirectory () const
Projectproject () const
void setCreatesCleanState (bool createsCleanState)
 Declare that this work order is saving the project.
void setModifiesDiskState (bool changesProjectOnDisk)
void setInternalData (QStringList data)
int progressMin () const
int progressMax () const
int progressValue () const
void setProgressRange (int, int)
void setProgressValue (int)
QStringList internalData () const
virtual void asyncRedo ()
 This method is designed to be implemented by children work orders.
virtual void postSyncRedo ()
 This method is designed to be implemented by children work orders.
virtual void asyncUndo ()
 This method is designed to be implemented by children work orders.
virtual void postSyncUndo ()
 This method is designed to be implemented by children work orders.

Detailed Description

Move images, one by one, on top of the immediately-above intersecting image in a scene.

This shows up as "Bring Forward" to the user.

Author:
2012-10-04 Stuart Sides and Steven Lambright

Member Enumeration Documentation

enum Isis::WorkOrder::Context [inherited]
Enumerator:
NoContext 
ProjectContext 
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

Isis::MoveUpOneSceneWorkOrder::MoveUpOneSceneWorkOrder ( MosaicSceneWidget scene,
Project project 
)

Referenced by clone().

Isis::MoveUpOneSceneWorkOrder::MoveUpOneSceneWorkOrder ( Project project  ) 
Isis::MoveUpOneSceneWorkOrder::MoveUpOneSceneWorkOrder ( const MoveUpOneSceneWorkOrder other  ) 
Isis::MoveUpOneSceneWorkOrder::~MoveUpOneSceneWorkOrder (  ) 

Member Function Documentation

void Isis::WorkOrder::addCloneToProject (  )  [protected, slot, inherited]
void Isis::WorkOrder::asyncRedo (  )  [protected, virtual, inherited]

This method is designed to be implemented by children work orders.

The order of execution for redo is: syncRedo() - GUI thread asyncRedo() - Pooled thread* postSyncRedo() - GUI thread

State can be read from the parent WorkOrder class and from state set in syncRedo() while in this method. You can set state to be used in postSyncRedo() safely. Please be wary of creating QObjects inside of this method because they will associated with the pooled thread and must be moved back to the GUI thread with QObject::moveToThread(). This method is never executed in the GUI thread. You can update progress by calling setProgressRange() and setProgressValue(). Please do not manipulate any GUI objects here.

Reimplemented in Isis::ExportControlNetWorkOrder, Isis::ExportImagesWorkOrder, Isis::ImportControlNetWorkOrder, and Isis::ImportImagesWorkOrder.

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

void Isis::WorkOrder::asyncUndo (  )  [protected, virtual, inherited]

This method is designed to be implemented by children work orders.

The order of execution for undo is: syncUndo() - GUI thread asyncUndo() - Pooled thread* postSyncUndo() - GUI thread

State can be read from the parent WorkOrder class and from state set in syncUndo() while in this method. You can set state to be used in postSyncUndo() safely. Please be wary of deleting QObjects inside of this method because they will cause unpredictable crashes. This method is never executed in the GUI thread. You can update progress by calling setProgressRange() and setProgressValue(). Please do not manipulate any GUI objects here.

Reimplemented in Isis::ImportImagesWorkOrder.

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

QString Isis::WorkOrder::bestText (  )  const [inherited]
MoveUpOneSceneWorkOrder * Isis::MoveUpOneSceneWorkOrder::clone (  )  const [virtual]

Implements Isis::WorkOrder.

References MoveUpOneSceneWorkOrder().

QList< Control * > Isis::WorkOrder::controlList (  )  [protected, inherited]
bool Isis::WorkOrder::createsCleanState (  )  const [inherited]
void Isis::WorkOrder::creatingProgress ( WorkOrder _t1  )  [signal, inherited]
void Isis::WorkOrder::deletingProgress ( WorkOrder _t1  )  [signal, inherited]
bool Isis::WorkOrder::dependsOn ( WorkOrder other  )  const [protected, virtual, inherited]

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

Directory * Isis::WorkOrder::directory (  )  const [protected, inherited]
bool Isis::WorkOrder::execute (  )  [virtual, slot, inherited]

The (child) implementation of this method should prompt the user/gather state by any means necessary.

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

Prompts for file names, questions, warnings, etc.. should be done here.

Once the work order has enough data to execute, this method needs to set the state in the parent (this) WorkOrder class. Call setData(ImageList), setInternalData(QStringList), etc... with all of the data/state necessary to perform the work order. This could be a list of file names, an ImageList of images you're viewing, or really anything else.

Finally, the actual work needs done in *Redo(), using only state (data) stored by the parent (this) WorkOrder class. You do not have to call *Redo() - this is done for you by WorkOrder::redo(). WorkOrder::redo() is called from Project::addToProject() when the workOrder is pushed onto the undo stack.

We do it this way to ensure saving/restoring from history can be done automatically/simply and implemented only once per data type. This also gives us full undo/redo functionality.

Returns:
False if this operation should be cancelled (the user clicked cancel, the operation turns out to be impossible, etc). This prevents the work order from making it into the history and redo will never be called.

The order of execution for work orders is: execute() - GUI thread, can ask user for input* syncRedo() - GUI thread, should not prompt the user for input asyncRedo() - Pooled thread postSyncRedo() - GUI thread

syncUndo() - GUI thread, always called after redo finishes asyncUndo() - Pooled thread postSyncUndo() - GUI thread

syncRedo() - GUI thread asyncRedo() - Pooled thread postSyncRedo() - GUI thread

and so on...

State should only be set in the parent WorkOrder class in this method. You can set arbitrary state using setInternalData(). This method is always executed in the GUI thread and is the only place to ask the user questions.

Reimplemented in Isis::CnetEditorViewWorkOrder, Isis::CubeViewportViewWorkOrder, Isis::ExportControlNetWorkOrder, Isis::ExportImagesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImageFileListViewWorkOrder, Isis::ImportControlNetWorkOrder, Isis::ImportImagesWorkOrder, Isis::OpenProjectWorkOrder, Isis::RenameProjectWorkOrder, Isis::SaveProjectAsWorkOrder, Isis::SaveProjectWorkOrder, and Isis::ImageListActionWorkOrder.

References Isis::WorkOrder::createsCleanState(), Isis::WorkOrder::statusChanged(), and Isis::WorkOrder::WorkOrderFinished.

Referenced by Isis::Project::addToProject().

QDateTime Isis::WorkOrder::executionTime (  )  const [inherited]
void Isis::WorkOrder::finished ( WorkOrder _t1  )  [signal, inherited]
WorkOrder::WorkOrderStatus Isis::WorkOrder::fromStatusString ( QString  statusString  )  [static, inherited]
const ImageList * Isis::WorkOrder::imageList (  )  const [protected, inherited]
ImageList * Isis::WorkOrder::imageList (  )  [protected, inherited]
QStringList Isis::WorkOrder::internalData (  )  const [protected, inherited]
bool Isis::WorkOrder::isExecutable ( ImageList images  )  [virtual, inherited]

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:
images An image list that this work order should execute on

Reimplemented in Isis::CubeViewportViewWorkOrder, Isis::ExportImagesWorkOrder, Isis::Footprint2DViewWorkOrder, Isis::ImageFileListViewWorkOrder, and Isis::ImageListActionWorkOrder.

bool Isis::WorkOrder::isExecutable ( QList< Control * >  controls  )  [virtual, inherited]

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.

Reimplemented in Isis::CnetEditorViewWorkOrder, and Isis::ExportControlNetWorkOrder.

bool Isis::WorkOrder::isExecutable ( Context  context  )  [virtual, inherited]

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.

Reimplemented in Isis::RenameProjectWorkOrder.

Referenced by Isis::Directory::supportedActions().

bool Isis::WorkOrder::isFinished (  )  const [inherited]
bool Isis::WorkOrder::isRedoing (  )  const [inherited]
bool Isis::WorkOrder::isRedone (  )  const [inherited]
bool Isis::WorkOrder::isUndoing (  )  const [inherited]
bool Isis::WorkOrder::isUndone (  )  const [inherited]
bool Isis::WorkOrder::modifiesDiskState (  )  const [inherited]

Referenced by Isis::Project::~Project().

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

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

void Isis::WorkOrder::postSyncRedo (  )  [protected, virtual, inherited]

This method is designed to be implemented by children work orders.

The order of execution for redo is: syncRedo() - GUI thread asyncRedo() - Pooled thread postSyncRedo() - GUI thread*

State can be read from the parent WorkOrder class and from state set in either syncRedo() or asyncRedo() while in this method. You can not set state to be used in any of the undo code safely. This method is always executed in the GUI thread and has no progress.

Reimplemented in Isis::ExportControlNetWorkOrder, Isis::ExportImagesWorkOrder, Isis::ImportControlNetWorkOrder, and Isis::ImportImagesWorkOrder.

void Isis::WorkOrder::postSyncUndo (  )  [protected, virtual, inherited]

This method is designed to be implemented by children work orders.

The order of execution for undo is: syncUndo() - GUI thread asyncUndo() - Pooled thread postSyncUndo() - GUI thread*

State can be read from the parent WorkOrder class and from state set in either syncUndo() or asyncUndo() while in this method. You can not set state to be used in any of the redo code safely. This method is always executed in the GUI thread and has no progress.

Reimplemented in Isis::ImportImagesWorkOrder.

WorkOrder * Isis::WorkOrder::previous (  )  const [inherited]
ProgressBar * Isis::WorkOrder::progressBar (  )  [inherited]
int Isis::WorkOrder::progressMax (  )  const [protected, inherited]
int Isis::WorkOrder::progressMin (  )  const [protected, inherited]
int Isis::WorkOrder::progressValue (  )  const [protected, inherited]
Project * Isis::WorkOrder::project (  )  const [protected, inherited]
void Isis::WorkOrder::read ( XmlStackedHandlerReader xmlReader  )  [inherited]

Read this work order's data from disk.

References Isis::XmlStackedHandlerReader::pushContentHandler().

void Isis::WorkOrder::redo (  )  [virtual, slot, inherited]
void Isis::MosaicSceneWorkOrder::restoreZPositions ( bool  zValuesMightBeInUse  )  [protected, inherited]
void Isis::WorkOrder::save ( QXmlStreamWriter &  stream  )  const [inherited]

Output XML format:.

   <workOrder actiontext="..." undotext="..." type="..." status="...">
     <images>
       <image id="...">
     </images>
     <internalDataValues>
       <dataValue value="...">
     </internalDataValues>
   </workOrder>
 

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

MosaicSceneWidget * Isis::MosaicSceneWorkOrder::scene (  )  [protected, inherited]
void Isis::WorkOrder::setCreatesCleanState ( bool  createsCleanState  )  [protected, inherited]

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 is marked as a 'clean' state of the project. The QUndoCommand undo/redo will never be called. The default for createsCleanState is false.

Parameters:
createsCleanState True if this work order is going to save the project to disk

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

void Isis::WorkOrder::setData ( QList< Control * >  controls  )  [virtual, inherited]
void Isis::WorkOrder::setData ( ImageList images  )  [virtual, inherited]

Reimplemented in Isis::ImageListActionWorkOrder.

void Isis::WorkOrder::setData ( Context  context  )  [virtual, inherited]
void Isis::WorkOrder::setInternalData ( QStringList  data  )  [protected, inherited]
void Isis::WorkOrder::setModifiesDiskState ( bool  changesProjectOnDisk  )  [protected, inherited]
void Isis::WorkOrder::setNext ( WorkOrder nextWorkOrder  )  [inherited]
void Isis::WorkOrder::setPrevious ( WorkOrder previousWorkOrder  )  [inherited]
void Isis::WorkOrder::setProgressRange ( int  minValue,
int  maxValue 
) [protected, inherited]
void Isis::WorkOrder::setProgressValue ( int  value  )  [protected, inherited]
void Isis::WorkOrder::statusChanged ( WorkOrder _t1  )  [signal, inherited]
QString Isis::WorkOrder::statusText (  )  const [inherited]
void Isis::MosaicSceneWorkOrder::storeZPositions ( QList< double >  zPositions  )  [protected, inherited]
void Isis::MoveUpOneSceneWorkOrder::syncRedo (  )  [virtual]

This method is designed to be implemented by children work orders.

The order of execution for redo is: syncRedo() - GUI thread* asyncRedo() - Pooled thread postSyncRedo() - GUI thread

State should only be read from the parent WorkOrder class in this method. You can set state to be used in asyncRedo() and postSyncRedo() safely. This method is always executed in the GUI thread and has no progress.

Reimplemented from Isis::WorkOrder.

References Isis::WorkOrder::imageList(), Isis::MosaicSceneWorkOrder::scene(), and Isis::MosaicSceneWorkOrder::storeZPositions().

void Isis::MoveUpOneSceneWorkOrder::syncUndo (  )  [virtual]

This method is designed to be implemented by children work orders.

The order of execution for undo is: syncUndo() - GUI thread* asyncUndo() - Pooled thread postSyncUndo() - GUI thread

State should only be read from the parent WorkOrder class in this method. You can set state to be used in asyncUndo() and postSyncUndo() safely. This method is always executed in the GUI thread and has no progress.

Reimplemented from Isis::WorkOrder.

References Isis::MosaicSceneWorkOrder::restoreZPositions().

QString Isis::WorkOrder::toString ( WorkOrderStatus  status  )  [static, inherited]
void Isis::WorkOrder::undo (  )  [virtual, slot, inherited]

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