|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef ImportShapesWorkOrder_H
2 #define ImportShapesWorkOrder_H
95 class OriginalFileToProjectCubeFunctor :
96 public std::unary_function<const FileName &, Cube *> {
98 OriginalFileToProjectCubeFunctor(
QThread *guiThread,
99 QDir destinationFolder,
bool copyDnData);
100 OriginalFileToProjectCubeFunctor(
const OriginalFileToProjectCubeFunctor &other);
101 ~OriginalFileToProjectCubeFunctor();
109 OriginalFileToProjectCubeFunctor &operator=(
const OriginalFileToProjectCubeFunctor &rhs);
111 QDir m_destinationFolder;
121 void importConfirmedShapes(
QStringList confirmedShapes,
bool copyDnData);
129 #endif // ImportShapesWorkOrder_H
void undoExecution()
delete the imported shapes from the disk.
Definition: ImportShapesWorkOrder.cpp:191
static QStringList shapes(QStringList)
ImportShapesWorkOrder(Project *project)
Creates a work order to import a shape model.
Definition: ImportShapesWorkOrder.cpp:45
void setId(QString id)
Override the automatically generated ID with the given ID.
Definition: Shape.cpp:402
ShapeDisplayProperties * displayProperties()
Get the display (GUI) properties (information) associated with this shape.
Definition: Shape.cpp:355
virtual bool setupExecution()
This sets up the state for the work order.
Definition: WorkOrder.cpp:1261
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:311
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Definition: Directory.cpp:1091
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
void postExecution()
Add the imported shapes into the project.
Definition: ImportShapesWorkOrder.cpp:231
File name manipulation and expansion.
Definition: FileName.h:100
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
void setInternalData(QStringList data)
Sets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1318
void closeCube()
Cleans up the Cube *.
Definition: Shape.cpp:342
Cube * copy(FileName newFile, const CubeAttributeOutput &newFileAttributes)
Copies the cube to the new fileName.
Definition: Cube.cpp:276
Provides access to sequential ASCII stream I/O.
Definition: TextFile.h:38
bool GetLine(QString &line, const bool skipComments=true)
Gets next line from file.
Definition: TextFile.cpp:411
Manipulate and parse attributes of output cube filenames.
Definition: CubeAttribute.h:473
QUndoStack * undoStack()
Returns the Projects stack of QUndoCommands.
Definition: Project.cpp:1694
Definition: JigsawWorkOrder.h:28
bool m_isSynchronous
This is defaulted to true.
Definition: WorkOrder.h:530
virtual bool isExecutable(ProjectItem *item)
This method returns true if the user clicked on a project tree node with the text "Shapes".
Definition: ImportShapesWorkOrder.cpp:102
const char * what() const
Returns a string representation of this exception in its current state.
Definition: IException.cpp:375
void deleteFromDisk(Project *project)
Delete all of the contained Shapes from disk.
Definition: ShapeList.cpp:578
The main project for ipce.
Definition: Project.h:289
void append(const IException &exceptionSource)
Appends the given exception (and its list of previous exceptions) to this exception's causational exc...
Definition: IException.cpp:409
Directory * directory() const
Returns the directory associated with this Project.
Definition: Project.cpp:1229
void waitForShapeReaderFinished()
Locks program if another spot in code is still running and called this function.
Definition: Project.cpp:1740
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
QString id() const
Get a unique, identifying string associated with this shape.
Definition: Shape.cpp:459
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Definition: WorkOrder.h:523
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
void postUndoExecution()
delete the imported shapes from the project.
Definition: ImportShapesWorkOrder.cpp:206
Add shape model cubes to a project.
Definition: ImportShapesWorkOrder.h:66
This represents a shape in a project-based GUI interface.
Definition: Shape.h:68
void warn(QString text, Data relevantData)
Definition: Project.cpp:2643
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1300
Internalizes a list of shapes and allows for operations on the entire list.
Definition: ShapeList.h:33
IO Handler for Isis Cubes.
Definition: Cube.h:167
QDir addShapeFolder(QString prefix)
Create and return the name of a folder for placing shape models.
Definition: Project.cpp:1060
Isis exception class.
Definition: IException.h:91
ProjectItem * findItemData(const QVariant &data, int role=Qt::UserRole+1)
Returns the first item found that contains the given data in the given role or a null pointer if no i...
Definition: ProjectItemModel.cpp:290
void addShapes(QStringList shapeFiles)
Read the given shape model cube file names as Images and add them to the project.
Definition: Project.cpp:1089
void setProgressRange(int, int)
Sets the progress range of the WorkOrder.
Definition: WorkOrder.cpp:1358
~ImportShapesWorkOrder()
Destructor.
Definition: ImportShapesWorkOrder.cpp:74
QString extension() const
Returns the last extension of the file name.
Definition: FileName.cpp:178
bool setupExecution()
Prompt the user for shape files to import and whether to copy DN data in to project.
Definition: ImportShapesWorkOrder.cpp:126
void setProgressValue(int)
Sets the current progress value for the WorkOrder.
Definition: WorkOrder.cpp:1368
void execute()
Creates a project shape folder and copies the shape cubes into it.
Definition: ImportShapesWorkOrder.cpp:219
QStringList internalData() const
Gets the internal data for this WorkOrder.
Definition: WorkOrder.cpp:1377
void append(Shape *const &value)
Appends an shape to the shape list.
Definition: ShapeList.cpp:133
void setModifiesDiskState(bool changesProjectOnDisk)
Definition: WorkOrder.cpp:1674
QString original() const
Returns the full file name including the file path.
Definition: FileName.cpp:212
virtual ImportShapesWorkOrder * clone() const
This method clones the current ImportShapesWorkOrder and returns it.
Definition: ImportShapesWorkOrder.cpp:88
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595
virtual void removeItem(ProjectItem *item)
Removes an item and its children from the model.
Definition: ProjectItemModel.cpp:315
void relocateDnData(FileName dnDataFile)
Relocates the DN data for a cube to an external cube label file.
Definition: Cube.cpp:1366
QString path() const
Returns the path of the file name.
Definition: FileName.cpp:103
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
void reopen(QString access="r")
This method will reopen an isis sube for reading or reading/writing.
Definition: Cube.cpp:774
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:134