29 #include <QUndoCommand> 41 class QXmlStreamWriter;
53 class XmlStackedHandlerReader;
372 void save(QXmlStreamWriter &stream)
const;
375 virtual void setData(QString data);
476 bool isInStableState()
const;
477 void listenForImageDestruction();
478 void listenForShapeDestruction();
479 void resetProgressBar();
480 void setProgressToFinalText();
483 void attemptQueuedAction();
484 void executionFinished();
485 void clearImageList();
486 void clearShapeList();
487 void updateProgress();
494 enum QueuedWorkOrderAction {
508 class XmlHandler :
public XmlStackedHandler {
512 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
513 const QString &qName,
const QXmlAttributes &atts);
516 Q_DISABLE_COPY(XmlHandler);
560 bool m_createsCleanState;
567 bool m_modifiesDiskState;
569 QueuedWorkOrderAction m_queuedAction;
574 int m_progressRangeMinValue;
578 int m_progressRangeMaxValue;
586 QPointer<ImageList> m_imageList;
587 QPointer<ShapeList> m_shapeList;
588 QPointer<ControlList> m_controlList;
637 QPointer<WorkOrder> m_nextWorkOrder;
642 QPointer<WorkOrder> m_previousWorkOrder;
647 QPointer<Project> m_project;
653 QMutex *m_transparentConstMutex;
658 QDateTime m_executionTime;
665 QPointer< QFutureWatcher<void> > m_futureWatcher;
672 QPointer<ProgressBar> m_progressBar;
677 QPointer<QTimer> m_progressBarUpdateTimer;
682 QPointer<QTimer> m_progressBarDeletionTimer;
688 QTime *m_elapsedTimer;
693 double m_secondsElapsed;
void finished(WorkOrder *)
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
QString bestText() const
Generate unique action names We don't use action text anymore because Directory likes to rename our a...
Definition: WorkOrder.cpp:809
bool isSynchronous() const
Returns true if this work order is run synchronously, otherwise false.
Definition: WorkOrder.cpp:855
void setProgressValue(int)
Sets the current progress value for the WorkOrder.
Definition: WorkOrder.cpp:1382
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
The main project for ipce.
Definition: Project.h:289
virtual void postExecution()
Perform any necessary actions after execution of a workorder.
Definition: WorkOrder.cpp:1428
Definition: WorkOrder.h:334
This is a container for the correlation matrix that comes from a bundle adjust.
Definition: CorrelationMatrix.h:72
Definition: WorkOrder.h:343
Definition: WorkOrder.h:352
Definition: WorkOrder.h:336
bool modifiesDiskState() const
Returns the modified disk state.
Definition: WorkOrder.cpp:938
int progressMax() const
Gets the maximum value of the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1351
bool isRedoing() const
Returns the redoing status of this WorkOrder.
Definition: WorkOrder.cpp:897
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Definition: ControlList.h:36
virtual bool setupExecution()
This sets up the state for the work order.
Definition: WorkOrder.cpp:1275
void read(XmlStackedHandlerReader *xmlReader)
Read this work order's data from disk.
Definition: WorkOrder.cpp:534
Definition: Template.h:44
WorkOrder * next() const
Gets the next WorkOrder.
Definition: WorkOrder.cpp:948
bool isRedone() const
Returns the WorkOrder redone status.
Definition: WorkOrder.cpp:907
TargetBodyQsp targetBody()
WorkOrder::targetBody.
Definition: WorkOrder.cpp:760
ShapeList * shapeList()
a pointer to the ShapeList for this WorkOrder.
Definition: WorkOrder.cpp:677
Definition: WorkOrder.h:333
virtual void redo()
Starts (or enqueues) a redo.
Definition: WorkOrder.cpp:1057
virtual bool isExecutable(Context)
Re-implement this method if your work order utilizes controls for data in order to operate...
Definition: WorkOrder.cpp:196
void deletingProgress(WorkOrder *)
WorkOrder(Project *project)
Create a work order that will work with the given project.
Definition: WorkOrder.cpp:55
void disableWorkOrder()
Disables the work order.
Definition: WorkOrder.cpp:1244
virtual void undo()
Starts (or enqueues) an undo.
Definition: WorkOrder.cpp:1160
int progressMin() const
Gets the minimum value of the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1341
static QString toString(WorkOrderStatus)
Gets the current status of the WorkOrder.
Definition: WorkOrder.cpp:1023
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:322
bool isSavedToHistory() const
Returns true if this work order is to be shown in History, otherwise false.
Definition: WorkOrder.cpp:844
void creatingProgress(WorkOrder *)
Q_DECLARE_METATYPE(Isis::WorkOrder *)
This allows WorkOrder *'s to be stored in a QVariant.
Definition: AbstractTableModel.h:16
bool createsCleanState() const
Returns the CleanState status (whether the Project has been saved to disk or not).
Definition: WorkOrder.cpp:868
WorkOrderStatus
This enumeration is used by other functions to set and retrieve the current state of the WorkOrder...
Definition: WorkOrder.h:332
virtual void execute()
Execute the workorder.
Definition: WorkOrder.cpp:1417
void setPrevious(WorkOrder *previousWorkOrder)
Sets the previous WorkOrder in the sequence.
Definition: WorkOrder.cpp:636
Template * getTemplate()
WorkOrder::getTemplate.
Definition: WorkOrder.cpp:750
bool m_isSynchronous
This is defaulted to true.
Definition: WorkOrder.h:541
int progressValue() const
Gets the current progress value of the WorkOrder.
Definition: WorkOrder.cpp:1361
WorkOrder * previous() const
Gets the previous WorkOrder.
Definition: WorkOrder.cpp:958
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Definition: WorkOrder.h:534
Definition: WorkOrder.h:351
virtual void setData(Context)
Sets the context data for this WorkOrder.
Definition: WorkOrder.cpp:262
bool isFinished() const
Returns the finished state of this WorkOrder.
Definition: WorkOrder.cpp:888
void setProgressRange(int, int)
Sets the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1372
virtual ~WorkOrder()
The Destructor.
Definition: WorkOrder.cpp:171
bool isUndoing() const
Returns the WorkOrderUndoing state.
Definition: WorkOrder.cpp:917
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void setModifiesDiskState(bool changesProjectOnDisk)
Definition: WorkOrder.cpp:1688
void statusChanged(WorkOrder *)
virtual WorkOrder * clone() const =0
Context
This enumeration is for recording the context of the current Workorder (whether it is part of a proje...
Definition: WorkOrder.h:350
static WorkOrderStatus fromStatusString(QString)
Attempts to query the current status of the WorkOrder.
Definition: WorkOrder.cpp:1002
QString statusText() const
WorkOrder::statusText.
Definition: WorkOrder.cpp:968
Definition: WorkOrder.h:337
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:146
FileItemQsp fileItem()
WorkOrder::fileItem.
Definition: WorkOrder.cpp:780
bool isUndone() const
Returns the WorkOrder undo status.
Definition: WorkOrder.cpp:927
QDateTime executionTime() const
Gets the execution time of this WorkOrder.
Definition: WorkOrder.cpp:878
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual void postUndoExecution()
Perform any steps necessary after an undo of a workorder.
Definition: WorkOrder.cpp:1459
CorrelationMatrix correlationMatrix()
Returns the CorrleationMatrix for this WorkOrder.
Definition: WorkOrder.cpp:710
void setNext(WorkOrder *nextWorkOrder)
Sets the next WorkOrder in the sequence.
Definition: WorkOrder.cpp:627
void enableWorkOrder()
Enables the work order.
Definition: WorkOrder.cpp:1232
This is used for work orders that will not undo or redo (See createsCleanState()) ...
Definition: WorkOrder.h:342
Definition: WorkOrder.h:335
Definition: ProgressBar.h:15
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1314
WorkOrderStatus m_status
Definition: WorkOrder.h:550
virtual void undoExecution()
Execute the steps necessary to undo this workorder.
Definition: WorkOrder.cpp:1448
GuiCameraQsp guiCamera()
WorkOrder::guiCamera.
Definition: WorkOrder.cpp:770
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
Definition: WorkOrder.cpp:720
ProgressBar * progressBar()
Returns the ProgressBar.
Definition: WorkOrder.cpp:989
ImageList * imageList()
Returns a pointer to the ImageList for this WorkOrder.
Definition: WorkOrder.cpp:645
Definition: Directory.h:285
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:25
void addCloneToProject()
Runs a copy of the current WorkOrder and stores it in the project.
Definition: WorkOrder.cpp:1466
bool m_isSavedToHistory
Set the work order to be shown in the HistoryTreeWidget.
Definition: WorkOrder.h:548
QStringList internalData() const
Gets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1391
bool isUndoable() const
Returns true if this work order is undoable, otherwise false.
Definition: WorkOrder.cpp:833
virtual bool dependsOn(WorkOrder *other) const
Indicate workorder dependency This is a virtual function whose role in child classes is to determine ...
Definition: WorkOrder.cpp:795
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1332
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
Definition: WorkOrder.cpp:1677
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
Definition: WorkOrder.cpp:558
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
Definition: WorkOrder.cpp:1304
Definition: WorkOrder.h:338