31 #include <QUndoCommand>
42 class QXmlStreamWriter;
53 class XmlStackedHandlerReader;
152 void save(QXmlStreamWriter &stream)
const;
266 bool isInStableState()
const;
267 void listenForImageDestruction();
268 void listenForShapeDestruction();
269 void resetProgressBar();
270 void setProgressToFinalText();
273 void attemptQueuedAction();
274 void asyncFinished();
275 void clearImageList();
276 void clearShapeList();
277 void deleteProgress();
278 void updateProgress();
285 enum QueuedWorkOrderAction {
299 class XmlHandler :
public XmlStackedHandler {
303 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
304 const QString &qName,
const QXmlAttributes &atts);
307 Q_DISABLE_COPY(XmlHandler);
325 bool m_createsCleanState;
332 bool m_modifiesDiskState;
335 QueuedWorkOrderAction m_queuedAction;
340 int m_progressRangeMinValue;
344 int m_progressRangeMaxValue;
351 QPointer<ImageList> m_imageList;
352 QPointer<ShapeList> m_shapeList;
353 QPointer<ControlList> m_controlList;
354 CorrelationMatrix m_correlationMatrix;
389 QPointer<WorkOrder> m_nextWorkOrder;
394 QPointer<WorkOrder> m_previousWorkOrder;
399 QPointer<Project> m_project;
405 QMutex *m_transparentConstMutex;
410 QDateTime m_executionTime;
417 QPointer< QFutureWatcher<void> > m_futureWatcher;
424 QPointer<ProgressBar> m_progressBar;
429 QPointer<QTimer> m_progressBarUpdateTimer;
434 QPointer<QTimer> m_progressBarDeletionTimer;
440 QTime *m_elapsedTimer;
445 double m_secondsElapsed;
void finished(WorkOrder *)
Definition: moc_WorkOrder.cpp:259
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
void setProgressValue(int)
Sets the current progress value for the WorkOrder.
Definition: WorkOrder.cpp:1177
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:44
The main project for cnetsuite.
Definition: Project.h:105
Definition: WorkOrder.h:116
This is a container for the correlation matrix that comes from a bundle adjust.
Definition: CorrelationMatrix.h:72
Definition: WorkOrder.h:125
Definition: WorkOrder.h:134
Definition: WorkOrder.h:118
virtual void syncUndo()
This method is designed to be implemented by children work orders.
Definition: WorkOrder.cpp:1254
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Definition: ControlList.h:34
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1116
void read(XmlStackedHandlerReader *xmlReader)
Read this work order's data from disk.
Definition: WorkOrder.cpp:454
bool createsCleanState() const
Returns the CleanState status (whether the Project has been saved to disk or not).
Definition: WorkOrder.cpp:721
WorkOrder * previous() const
Gets the previous WorkOrder.
Definition: WorkOrder.cpp:803
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
int progressMin() const
Gets the minimum value of the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1139
QStringList internalData() const
Gets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1186
int progressMax() const
Gets the maximum value of the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1148
bool isRedone() const
Returns the WorkOrder redone status.
Definition: WorkOrder.cpp:757
TargetBodyQsp targetBody()
WorkOrder::targetBody.
Definition: WorkOrder.cpp:666
ShapeList * shapeList()
a pointer to the ShapeList for this WorkOrder.
Definition: WorkOrder.cpp:596
Definition: WorkOrder.h:115
virtual void redo()
Starts (or enqueues) a redo.
Definition: WorkOrder.cpp:900
virtual bool isExecutable(Context)
Re-implement this method if your work order utilizes controls for data in order to operate...
Definition: WorkOrder.cpp:179
void deletingProgress(WorkOrder *)
Definition: moc_WorkOrder.cpp:252
virtual void postSyncRedo()
This method is designed to be implemented by children work orders.
Definition: WorkOrder.cpp:1238
WorkOrder(Project *project)
Create a work order that will work with the given project.
Definition: WorkOrder.cpp:55
virtual void undo()
Starts (or enqueues) an undo.
Definition: WorkOrder.cpp:994
static QString toString(WorkOrderStatus)
Gets the current status of the WorkOrder.
Definition: WorkOrder.cpp:865
Parent class for anything that performs an action in Project.
Definition: WorkOrder.h:104
void creatingProgress(WorkOrder *)
Definition: moc_WorkOrder.cpp:245
int progressValue() const
Gets the current progress value of the WorkOrder.
Definition: WorkOrder.cpp:1157
Definition: AbstractTableModel.h:16
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
Definition: TargetBody.h:224
virtual void postSyncUndo()
This method is designed to be implemented by children work orders.
Definition: WorkOrder.cpp:1287
bool isFinished() const
Returns the finished state of this WorkOrder.
Definition: WorkOrder.cpp:739
WorkOrderStatus
This enumeration is used by other functions to set and retrieve the current state of the WorkOrder...
Definition: WorkOrder.h:114
virtual void asyncUndo()
This method is designed to be implemented by children work orders.
Definition: WorkOrder.cpp:1271
void setPrevious(WorkOrder *previousWorkOrder)
Sets the previous WorkOrder in the sequence.
Definition: WorkOrder.cpp:556
Definition: WorkOrder.h:133
virtual void setData(Context)
Sets the context data for this WorkOrder.
Definition: WorkOrder.cpp:245
void setProgressRange(int, int)
Sets the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1167
bool modifiesDiskState() const
Returns the modified disk state.
Definition: WorkOrder.cpp:785
virtual ~WorkOrder()
The Destructor.
Definition: WorkOrder.cpp:97
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void setModifiesDiskState(bool changesProjectOnDisk)
.
Definition: WorkOrder.cpp:1531
QString statusText() const
WorkOrder::statusText.
Definition: WorkOrder.cpp:812
QSharedPointer< GuiCamera > GuiCameraQsp
GuiCameraQsp Represents a smart pointer to a GuiCamera object.
Definition: GuiCamera.h:188
void statusChanged(WorkOrder *)
Definition: moc_WorkOrder.cpp:266
bool isUndone() const
Returns the WorkOrder undo status.
Definition: WorkOrder.cpp:775
virtual WorkOrder * clone() const =0
bool isRedoing() const
Returns the redoing status of this WorkOrder.
Definition: WorkOrder.cpp:748
QString bestText() const
We don't use action text anymore because Directory likes to rename our actions.
Definition: WorkOrder.cpp:701
WorkOrder * next() const
Gets the next WorkOrder.
Definition: WorkOrder.cpp:794
Context
This enumeration is for recording the context of the current Workorder (whether it is part of a proje...
Definition: WorkOrder.h:132
static WorkOrderStatus fromStatusString(QString)
Attempts to query the current status of the WorkOrder.
Definition: WorkOrder.cpp:844
Definition: WorkOrder.h:119
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:113
Directory * directory() const
Returns the Directory object of the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1106
QDateTime executionTime() const
Gets the execution time of this WorkOrder.
Definition: WorkOrder.cpp:730
bool isUndoing() const
Returns the WorkOrderUndoing state.
Definition: WorkOrder.cpp:766
CorrelationMatrix correlationMatrix()
Returns the CorrleationMatrix for this WorkOrder.
Definition: WorkOrder.cpp:628
void setNext(WorkOrder *nextWorkOrder)
Sets the next WorkOrder in the sequence.
Definition: WorkOrder.cpp:547
This is used for work orders that will not undo or redo (See createsCleanState()) ...
Definition: WorkOrder.h:124
Definition: WorkOrder.h:117
QProgressBar with customizable text.
Definition: ProgressBar.h:15
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
Definition: WorkOrder.cpp:478
GuiCameraQsp guiCamera()
WorkOrder::guiCamera.
Definition: WorkOrder.cpp:675
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
Definition: WorkOrder.cpp:1078
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
Definition: WorkOrder.cpp:637
ProgressBar * progressBar()
Returns the ProgressBar.
Definition: WorkOrder.cpp:832
ImageList * imageList()
a pointer to the ImageList for this WorkOrder.
Definition: WorkOrder.cpp:565
virtual void asyncRedo()
This method is designed to be implemented by children work orders.
Definition: WorkOrder.cpp:1222
Definition: Directory.h:106
his enables stack-based XML parsing of XML files.
Definition: XmlStackedHandlerReader.h:26
void addCloneToProject()
Runs a copy of the current WorkOrder and stores it in the project.
Definition: WorkOrder.cpp:1294
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1130
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
Definition: WorkOrder.cpp:1520
virtual bool dependsOn(WorkOrder *other) const
This is a virtual function whose role in child classes is to determine if this WorkOrder deppends on ...
Definition: WorkOrder.cpp:688
Definition: WorkOrder.h:120
virtual void syncRedo()
This method is designed to be implemented by children work orders.
Definition: WorkOrder.cpp:1203