Isis 3 Programmer Reference
ImportImagesWorkOrder.h
Go to the documentation of this file.
1#ifndef ImportImagesWorkOrder_H
2#define ImportImagesWorkOrder_H
25#include "WorkOrder.h"
26
27#include <functional>
28
29#include <QDir>
30#include <QMutex>
31
32#include "IException.h"
33
34class QString;
35
36namespace Isis {
37 class Cube;
38 class FileName;
39
110 Q_OBJECT
111 public:
115
116 virtual ImportImagesWorkOrder *clone() const;
117
118 virtual bool isExecutable(ProjectItem *item);
119 virtual bool setupExecution();
120
121 virtual void execute();
122
123 protected:
124 virtual void undoExecution();
125 virtual void postExecution();
126 virtual void postUndoExecution();
127
128 private:
129 ImportImagesWorkOrder &operator=(const ImportImagesWorkOrder &rhs);
130
140 public std::function<Cube *(const FileName &)> {
141 public:
143 QDir destinationFolder, bool copyDnData);
146
147 Cube *operator()(const FileName &original);
148
149 IException errors() const;
150
151 private:
154
158
160 QSharedPointer<IException> m_errors;
161 QSharedPointer<int> m_numErrors;
162 };
163
164 private:
165 void importConfirmedImages(QStringList confirmedImages, bool copyDnData);
166
167 private:
170 QString m_warning;
171 };
172}
173#endif // ImportImagesWorkOrder_H
IO Handler for Isis Cubes.
Definition Cube.h:168
File name manipulation and expansion.
Definition FileName.h:100
Isis exception class.
Definition IException.h:91
Internalizes a list of images and allows for operations on the entire list.
Definition ImageList.h:55
IException errors() const
Indicates if any errors occurred during the import.
QSharedPointer< int > m_numErrors
Number of errors that occur during import.
OriginalFileToProjectCubeFunctor & operator=(const OriginalFileToProjectCubeFunctor &rhs)
Not implemented.
Cube * operator()(const FileName &original)
Overloads the callable operator to invoke this functor.
OriginalFileToProjectCubeFunctor(QThread *guiThread, QDir destinationFolder, bool copyDnData)
Creates the internal functor.
QSharedPointer< IException > m_errors
Stores any errors that occur during import.
bool m_copyDnData
Indicates whether the cube data will be copied to the project.
QDir m_destinationFolder
Directory where to import the images to.
QThread * m_guiThread
Pointer to the GUI thread. Not used?
QMutex m_errorsLock
Mutex lock for appending errors and incrementing error count.
QString m_warning
String of any errors/warnings that occurred during import.
virtual void undoExecution()
Undoes the work order's execute.
ImageList * m_list
List of images that was succesfully imported into project.
ImportImagesWorkOrder(Project *project)
Creates an asynchronous WorkOrder for importing images to the project.
virtual bool setupExecution()
Sets up this work order before being executed.
void importConfirmedImages(QStringList confirmedImages, bool copyDnData)
Imports the images.
virtual void execute()
Executes the work order.
virtual void postExecution()
Associates the imported images to the project.
ImageList * m_newImages
List of images that are being imported in 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 ImportImagesWorkOrder * clone() const
Creates a clone of this work order.
virtual void postUndoExecution()
Cleans up memory (images) after the undo execution occurs.
The main project for ipce.
Definition Project.h:289
Represents an item of a ProjectItemModel in Qt's model-view framework.
Provide Undo/redo abilities, serialization, and history for an operation.
Definition WorkOrder.h:311
Project * project() const
Returns the Project this WorkOrder is attached to.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16