31 #include <QUndoCommand>
38 #include "XmlStackedHandler.h"
42 class QXmlStreamWriter;
53 class XmlStackedHandlerReader;
115 WorkOrderUnknownStatus = 0,
152 void save(QXmlStreamWriter &stream)
const;
303 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
304 const QString &qName,
const QXmlAttributes &atts);
351 QPointer<ImageList> m_imageList;
352 QPointer<ShapeList> m_shapeList;
353 QPointer<ControlList> m_controlList;
Internalizes a list of shapes and allows for operations on the entire list.
void setProgressValue(int)
Sets the current progress value for the WorkOrder.
Internalizes a list of images and allows for operations on the entire list.
bool m_modifiesDiskState
This is defaulted to false.
The main project for cnetsuite.
void deleteProgress()
Deletes the progress bar.
XmlHandler(WorkOrder *workOrder)
Passes a pointer to a WorkOrder to the WorkOrder::XmlHandler class.
This is a container for the correlation matrix that comes from a bundle adjust.
void attemptQueuedAction()
Attempts to execute an action on the action action queue.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
The XML reader invokes this method at the start of every element in the XML document.
void updateProgress()
Updates the progress bar.
virtual void syncUndo()
This method is designed to be implemented by children work orders.
QPointer< QTimer > m_progressBarUpdateTimer
A pointer to the QTimer which updates the ProgressBar.
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Project * project() const
Returns the Project this WorkOrder is attached to.
void read(XmlStackedHandlerReader *xmlReader)
Read this work order's data from disk.
bool createsCleanState() const
Returns the CleanState status (whether the Project has been saved to disk or not).
WorkOrder * previous() const
Gets the previous WorkOrder.
int m_progressRangeMinValue
The miniumum value of the Progess Bar.
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.
QPointer< WorkOrder > m_previousWorkOrder
A pointer to the previous WorkOrder in the queue.
QStringList internalData() const
Gets the internal data for this WorkOrder.
void asyncFinished()
Signals the Project that the WorkOrder is finished, deletes the update time for the Progress bar...
int progressMax() const
Gets the maximum value of the progress range of the WorkOrder.
bool isRedone() const
Returns the WorkOrder redone status.
TargetBodyQsp targetBody()
WorkOrder::targetBody.
ShapeList * shapeList()
a pointer to the ShapeList for this WorkOrder.
virtual void redo()
Starts (or enqueues) a redo.
QPointer< ProgressBar > m_progressBar
A pointer to the ProgressBar.
virtual bool isExecutable(Context)
Re-implement this method if your work order utilizes controls for data in order to operate...
QTime * m_elapsedTimer
A QTime object holding the excecution time of the WorkOrder.
QDateTime m_executionTime
This is the date/time that execute() was called.
virtual void postSyncRedo()
This method is designed to be implemented by children work orders.
WorkOrder(Project *project)
Create a work order that will work with the given project.
virtual void undo()
Starts (or enqueues) an undo.
void listenForShapeDestruction()
Checks to see if we have lost any shapes in the ShapeList.
static QString toString(WorkOrderStatus)
Gets the current status of the WorkOrder.
QPointer< QTimer > m_progressBarDeletionTimer
A pointer to the ProgressBar deletion timer.
Parent class for anything that performs an action in Project.
int m_progressValue
The current value of the Progress Bar.
int progressValue() const
Gets the current progress value of the WorkOrder.
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
virtual void postSyncUndo()
This method is designed to be implemented by children work orders.
bool isFinished() const
Returns the finished state of this WorkOrder.
WorkOrderStatus
This enumeration is used by other functions to set and retrieve the current state of the WorkOrder...
QStringList m_internalData
A QStringList of internal properties for this WorkOrder.
XML Handler that parses XMLs in a stack-oriented way.
virtual void asyncUndo()
This method is designed to be implemented by children work orders.
void setPrevious(WorkOrder *previousWorkOrder)
Sets the previous WorkOrder in the sequence.
QPointer< WorkOrder > m_nextWorkOrder
A pointer to the next WorkOrder in the queue.
bool m_createsCleanState
This is defaulted to false.
virtual void setData(Context)
Sets the context data for this WorkOrder.
void clearShapeList()
Clears the list of shapes.
int m_progressRangeMaxValue
The maximum value of the Progess Bar.
void resetProgressBar()
Resets the ProgressBar.
void setProgressRange(int, int)
Sets the progress range of the WorkOrder.
bool modifiesDiskState() const
Returns the modified disk state.
virtual ~WorkOrder()
The Destructor.
TargetBodyQsp m_targetBody
A QSharedPointer to the TargetBody (A Target object but encapsulated within a Gui framework...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double m_secondsElapsed
The seconds that have elapsed since the WorkOrder started executing.
void setModifiesDiskState(bool changesProjectOnDisk)
.
bool isInStableState() const
Determines if the WorkOrder is in a stable state, or if it's busy doing something.
QString statusText() const
WorkOrder::statusText.
QPointer< QFutureWatcher< void > > m_futureWatcher
A pointer to a QFutureWatcher object which monitors a QFuture object using signals and slots...
QSharedPointer< GuiCamera > GuiCameraQsp
GuiCameraQsp Represents a smart pointer to a GuiCamera object.
QueuedWorkOrderAction
This enum describes the current state of a Queued WorkOrder.
QMutex * m_transparentConstMutex
This is used to protect the integrity of data the WorkOrder is working on so that only one thread at ...
bool isUndone() const
Returns the WorkOrder undo status.
void listenForImageDestruction()
Checks to see if we have lost any images in the ImageList.
bool isRedoing() const
Returns the redoing status of this WorkOrder.
void setProgressToFinalText()
Sets the ProgressBar to display the final status of the operation.
QString bestText() const
We don't use action text anymore because Directory likes to rename our actions.
WorkOrder * next() const
Gets the next WorkOrder.
Context
This enumeration is for recording the context of the current Workorder (whether it is part of a proje...
static WorkOrderStatus fromStatusString(QString)
Attempts to query the current status of the WorkOrder.
Represents an item of a ProjectItemModel in Qt's model-view framework.
Directory * directory() const
Returns the Directory object of the Project this WorkOrder is attached to.
QDateTime executionTime() const
Gets the execution time of this WorkOrder.
bool isUndoing() const
Returns the WorkOrderUndoing state.
CorrelationMatrix correlationMatrix()
Returns the CorrleationMatrix for this WorkOrder.
void setNext(WorkOrder *nextWorkOrder)
Sets the next WorkOrder in the sequence.
This is used for work orders that will not undo or redo (See createsCleanState()) ...
QProgressBar with customizable text.
This class is used for processing an XML file containing information about a WorkOrder.
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
GuiCameraQsp m_guiCamera
A QSharedPointer to the GuiCamera (the Camera object but encapsulated within a Gui framework...
GuiCameraQsp guiCamera()
WorkOrder::guiCamera.
virtual bool execute()
The (child) implementation of this method should prompt the user/gather state by any means necessary...
QPointer< ControlList > controlList()
Returns the Control List for this WorkOrder (a list of control networks).
ProgressBar * progressBar()
Returns the ProgressBar.
ImageList * imageList()
a pointer to the ImageList for this WorkOrder.
virtual void asyncRedo()
This method is designed to be implemented by children work orders.
his enables stack-based XML parsing of XML files.
void addCloneToProject()
Runs a copy of the current WorkOrder and stores it in the project.
QStringList m_shapeIds
A QStringList of unique shape identifiers for all of the shapes this WorkOrder is dealing with...
void clearImageList()
Clears the list of images.
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
void startRedo()
WorkOrder::startRedo This function is currently empty.
void setCreatesCleanState(bool createsCleanState)
Declare that this work order is saving the project.
QPointer< Project > m_project
A pointer to the Project this WorkOrder is attached to.
QStringList m_imageIds
A QStringList of unique image identifiers for all of the images this WorkOrder is dealing with...
WorkOrder * m_workOrder
This is a pointer to the WorkOrder the XmlHandler is filling with information it parses from an XML f...
virtual bool dependsOn(WorkOrder *other) const
This is a virtual function whose role in child classes is to determine if this WorkOrder deppends on ...
virtual void syncRedo()
This method is designed to be implemented by children work orders.