|
Isis Developer Reference
|
Go to the documentation of this file.
28 #include <QStringList>
30 #include <QXmlDefaultHandler>
35 class QXmlStreamWriter;
47 class BundleSolutionInfo;
51 class CorrelationMatrix;
335 QString
name()
const;
403 void save(
FileName projectPath,
bool verifyPathDoesntExist =
true);
407 template<
typename Data>
void warn(QString text, Data relevantData);
409 void warn(QString text);
562 void targetBodyClosed(
QObject *targetBodyObj);
566 void checkActiveControlAndImageList();
567 void checkControlsAndImagesAvailable();
572 void createFolders();
574 ControlList *createOrRetrieveControlList(QString
name, QString path =
"");
575 ImageList *createOrRetrieveImageList(QString
name, QString path =
"");
576 ShapeList *createOrRetrieveShapeList(QString
name, QString path =
"");
581 QString nextImageListGroupName();
585 void saveHistory(QXmlStreamWriter &stream)
const;
586 void saveWarnings(QXmlStreamWriter &stream)
const;
588 void storeWarning(QString text);
589 void storeWarning(QString text,
const ImageList &relevantData);
601 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
602 const QString &qName,
const QXmlAttributes &atts);
603 virtual bool endElement(
const QString &namespaceURI,
const QString &localName,
604 const QString &qName);
607 Q_DISABLE_COPY(XmlHandler);
621 static const int m_maxRecentProjects = 5;
623 QString m_newProjectRoot;
625 QDir m_currentCnetFolder;
626 QPointer<Directory> m_directory;
636 QPointer<Control> m_activeControl;
637 QPointer<ImageList> m_activeImageList;
662 QPointer<ImageReader> m_imageReader;
664 bool m_isTemporaryProject;
668 int m_numImagesCurrentlyReading;
671 QMutex *m_workOrderMutex;
672 QMutex *m_imageReadingMutex;
674 int m_numShapesCurrentlyReading;
675 QMutex *m_shapeMutex;
676 QPointer<ShapeReader> m_shapeReader;
677 QMutex *m_shapeReadingMutex;
679 QUndoStack m_undoStack;
static QStringList shapes(QStringList)
void activeControlModified()
Emmited in cnetModified() when the actice control is modified.
void setPath(QString newPath)
Set the relative path (from the project root) to this control list's folder.
Definition: ControlList.cpp:529
BundleSettings * bundleSettings()
Return BundleSettings objects in Project.
Definition: Project.h:390
Container class for TargetBody.
Definition: TargetBody.h:65
QList< ShapeList * > shapes()
Return the projects shapelist.
Definition: Project.cpp:2106
Definition: ShapeReader.h:34
void removeImages(ImageList &imageList)
Definition: Project.cpp:2786
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
bool isUndoable() const
Returns true if this work order is undoable, otherwise false.
Definition: WorkOrder.cpp:819
void allControlsRemoved()
Emitted when all controls have been removed from the Project.
@ FootprintViewProperties
Every display property for footprint views, provided for convenience.
Definition: ImageDisplayProperties.h:111
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition: IException.h:155
void waitForImageReaderFinished()
Locks program if another spot in code is still running and called this function.
Definition: Project.cpp:1732
virtual bool setupExecution()
This sets up the state for the work order.
Definition: WorkOrder.cpp:1261
void addCamera(Camera *camera)
Adds a new camera to the project.
Definition: Project.cpp:2761
QString cnetRoot() const
Get where control networks ought to be stored inside the project.
Definition: Project.cpp:2029
Definition: Directory.h:271
static QString userName()
@Returns the user name.
Definition: Environment.cpp:72
void setName(QString newName)
Set the human-readable name of this control list.
Definition: ControlList.cpp:518
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
WorkOrder * lastNotUndoneWorkOrder()
Return the last not undone workorder.
Definition: Project.cpp:1605
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:311
QMutex * mutex()
Return mutex used for Naif calls.
Definition: Project.cpp:1658
bool isClean()
Accessor to determine whether the current project is Unsaved.
Definition: Project.cpp:1584
Shape * shape(QString id)
Return a shape given its id.
Definition: Project.cpp:1539
bool isControl() const
Returns true if a Control is stored in the data of the item.
Definition: ProjectItem.cpp:690
void open(QString)
Open the project at the given path.
Definition: Project.cpp:1345
ProjectItemModel * model()
Gets the ProjectItemModel for this directory.
Definition: Directory.cpp:1091
void projectSaved(Project *)
Emitted when project is saved.
void removeTemplate(FileName file)
~Project()
Clean up the project.
Definition: Project.cpp:257
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
void addTarget(Target *target)
Adds a new target to the project.
Definition: Project.cpp:2730
virtual void redo()
Starts (or enqueues) a redo.
Definition: WorkOrder.cpp:1043
void addImagesToIdMap(ImageList images)
Add images to the id map which are not under the projects main data area, the Images node on the proj...
Definition: Project.cpp:2778
QList< WorkOrder * > workOrderHistory()
Get the entire list of work orders that have executed.
Definition: Project.cpp:1748
File name manipulation and expansion.
Definition: FileName.h:100
bool hasTarget(QString id)
This method checks for the existence of a target based on TargetName.
Definition: Project.cpp:2715
void addControl(Control *control)
Add the given Control's to the current project.
Definition: Project.cpp:958
void controlsAndImagesAvailable()
Emitted when at least one cnet and image have been added to the project.
Control * control(QString id)
Accessor for if the project is clearing or not.
Definition: Project.cpp:1163
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
Definition: ControlList.h:44
virtual void pushContentHandler(XmlStackedHandler *newHandler)
Push a contentHandler and maybe continue parsing...
Definition: XmlStackedHandlerReader.cpp:55
ControlList * controlList(QString name)
Return controlslist matching name in Project.
Definition: Project.cpp:2048
void closeCube()
Cleans up the Cube *.
Definition: Shape.cpp:342
static int maxRecentProjects()
Return max number of recent projects to be displayed.
Definition: Project.h:396
void save(QXmlStreamWriter &stream) const
: Saves a WorkOrder to a data stream.
Definition: WorkOrder.cpp:544
void setName(QString newName)
Set the human-readable name of this shape list.
Definition: ShapeList.cpp:534
void clear()
Clears the list.
Definition: GuiCameraList.cpp:157
void setTextColor(Qt::GlobalColor color)
Definition: ProjectItem.cpp:1246
Definition: TemplateList.h:35
void append(Image *const &value)
Appends an image to the image list.
Definition: ImageList.cpp:153
ShapeList * shapeList(QString name)
Return a shapelist given its name.
Definition: Project.cpp:1549
void clear()
Function to clear out all values in a project essentially making it a new project object.
Definition: Project.cpp:459
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Definition: XmlStackedHandler.cpp:44
bool clearing()
Definition: Project.cpp:666
bool createsCleanState() const
Returns the CleanState status (whether the Project has been saved to disk or not).
Definition: WorkOrder.cpp:854
Control * activeControl()
Return the Active Control (control network)
Definition: Project.cpp:1903
QString targetBodyRoot() const
Accessor for the root directory of the target body data.
Definition: Project.cpp:2186
QSharedPointer< TargetBody > TargetBodyQsp
Defines A smart pointer to a TargetBody obj.
Definition: TargetBody.h:216
void controlListAdded(ControlList *controls)
apparently not used?
void activeControlAndImageListSet()
Emitted when both an active control and active image list have been set.
Control * control() const
Returns the Control stored in the data of the item.
Definition: ProjectItem.cpp:536
QList< TemplateList * > regTemplates()
Return registration template FileNames.
Definition: Project.cpp:2166
void workOrderStarting(WorkOrder *)
Emitted when work order starts.
QList< TemplateList * > templates()
Return all template FileNames.
Definition: Project.cpp:2145
Definition: ImageReader.h:43
Q_DECLARE_METATYPE(Isis::Project *)
void deleteFromDisk(Project *project)
Delete all of the contained Images from disk.
Definition: ImageList.cpp:747
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
QUndoStack * undoStack()
Returns the Projects stack of QUndoCommands.
Definition: Project.cpp:1694
bool isTemporaryProject() const
Returns if the project is a temp project or not.
Definition: Project.cpp:1567
bool hasCamera(QString id)
This method checks for the existence of a camera based on InstrumentId.
Definition: Project.cpp:2745
QList< TemplateList * > mapTemplates()
Return map template FileNames.
Definition: Project.cpp:2156
void addBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Add the given BundleSolutionInfo to the current project.
Definition: Project.cpp:1194
QString imageDataRoot() const
Accessor for the root directory of the image data.
Definition: Project.cpp:2077
void showWarning(QString text)
Displays a Warning.
Definition: Directory.cpp:1481
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
QMutex * workOrderMutex()
This function returns a QMutex.
Definition: Project.cpp:2986
void setPath(QString newPath)
Set the relative path (from the project root) to this shape list's folder.
Definition: ShapeList.cpp:545
bool isModified()
@description Has this control been modified?
Definition: Control.cpp:229
void addTemplates(TemplateList *templateFiles)
Add new templates to m_mapTemplates or m_regTemplates and update project item model.
Definition: Project.cpp:1113
void deleteFromDisk(Project *project)
Delete all of the contained Shapes from disk.
Definition: ShapeList.cpp:578
void discardActiveControlEdits()
The main project for ipce.
Definition: Project.h:289
void projectLoaded(Project *)
Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget.
QList< ImageList * > images()
Return projects imagelist.
Definition: Project.cpp:2115
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
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
void setName(QString newName)
Set the human-readable name of this image list.
Definition: ImageList.cpp:703
void relocateProjectRoot(QString newRoot)
This is called when the project is moved.
Definition: Project.cpp:2305
void addToProject(WorkOrder *)
This executes the WorkOrder and stores it in the project.
Definition: Project.cpp:2598
void setActiveControl(QString displayName)
Set the Active Control (control network)
Definition: Project.cpp:1819
bool isImageList() const
Returns true if an ImageList is stored in the data of the item.
Definition: ProjectItem.cpp:657
bool write()
@description Write control net to disk.
Definition: Control.cpp:191
QString id() const
Get a unique, identifying string associated with this shape.
Definition: Shape.cpp:459
const int ReadWrite
Definition: Process.h:24
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
ControlNet * controlNet()
Open and return a pointer to the ControlNet for this Control.
Definition: Control.cpp:150
bool isSavedToHistory() const
Returns true if this work order is to be shown in History, otherwise false.
Definition: WorkOrder.cpp:830
void clean()
Cleans directory of everything to do with the current project.
Definition: Directory.cpp:289
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
void deleteAllProjectFiles()
Delete all of the files, that this project stores, from disk.
Definition: Project.cpp:2251
QDir dir() const
Returns the path of the file's parent directory as a QDir object.
Definition: FileName.cpp:465
void loadBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Loads bundle solution info into project.
Definition: Project.cpp:1210
QString toString() const
Returns a string representation of this exception.
Definition: IException.cpp:537
void guiCamerasAdded(GuiCameraList *targets)
Emitted when new GuiCamera objects added to project receivers: Directory.
void bundleSolutionInfoAdded(BundleSolutionInfo *bundleSolutionInfo)
Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should ...
QString shapeDataRoot() const
Accessor for the root directory of the shape model data.
Definition: Project.cpp:2097
bool isUndone() const
Returns the WorkOrder undo status.
Definition: WorkOrder.cpp:913
ImageList * activeImageList()
Returns the active ImageList.
Definition: Project.cpp:2003
QDir addBundleSolutionInfoFolder(QString folder)
Create and return the name of a folder for placing BundleSolutionInfo.
Definition: Project.cpp:1174
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:159
void cnetModified()
When a cnet is modified, set the project state to not clean.
Definition: Project.cpp:1924
Definition: Template.h:30
Container class for GuiCamera.
Definition: GuiCamera.h:72
void removeAt(int i)
Removes the image at an index.
Definition: ImageList.cpp:321
QList< ImageList * > adjustedImages() const
Returns the list of images that were adjusted after a bundle.
Definition: BundleSolutionInfo.cpp:222
This represents a shape in a project-based GUI interface.
Definition: Shape.h:68
void SetImages(const QString &imageListFile)
Creates the ControlNet's image cameras based on an input file.
Definition: ControlNet.cpp:1566
void closeCube()
Cleans up the Cube pointer.
Definition: Image.cpp:307
QString newProjectRoot() const
Get the top-level folder of the new project.
Definition: Project.cpp:1675
void activeImageListSet()
Emitted when an active image list is set.
void shapesAdded(ShapeList *shapes)
Emitted when new shape model images are available.
void warn(QString text, Data relevantData)
Definition: Project.cpp:2643
QString name() const
Get the human-readable name of this image list.
Definition: ImageList.cpp:724
TargetBodyList targetBodies()
Return TargetBodyList in Project.
Definition: Project.cpp:2194
Container class for BundleAdjustment settings.
Definition: BundleSettings.h:125
static WorkOrder * create(Project *project, QString type)
This instantiates a work order given a project and a type name (class name in a string).
Definition: WorkOrderFactory.cpp:50
WorkOrder * previous() const
Gets the previous WorkOrder.
Definition: WorkOrder.cpp:944
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
List for holding TargetBodies.
Definition: TargetBodyList.h:33
void controlAdded(Control *control)
Emitted when new Control added to Project receivers: ProjectTreeWidget.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Definition: XmlStackedHandler.cpp:55
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
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
#define ASSERT(x)
Definition: IsisDebug.h:134
void removeAt(int i)
Removes the shape at an index.
Definition: ShapeList.cpp:301
void clear()
clears the list.
Definition: TargetBodyList.cpp:143
bool save()
Generic save method to save the state of the project.
Definition: Project.cpp:2324
QString toString() const
Returns a QString of the full file name including the file path, excluding the attributes with any Is...
Definition: FileName.cpp:515
void setActiveImageList(QString displayName)
Set the Active ImageList from the displayName which is saved in project.xml.
Definition: Project.cpp:1955
void setNext(WorkOrder *nextWorkOrder)
Sets the next WorkOrder in the sequence.
Definition: WorkOrder.cpp:613
void projectRelocated(Project *)
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image,...
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
Definition: Project.cpp:2223
QString projectRoot() const
Get the top-level folder of the project.
Definition: Project.cpp:1666
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 activeControlSet(bool boolean)
Emitted when an active control is set.
QList< QAction * > userPreferenceActions()
Get a list of configuration/settings actions related to reading images into this Project.
Definition: Project.cpp:916
QList< ControlList * > controls()
Return controls in project.
Definition: Project.cpp:2038
void workOrderFinished(WorkOrder *)
Emitted when work order ends.
Image * image(QString id)
Return an image given its id.
Definition: Project.cpp:1509
void addImages(QStringList imageFiles)
Read the given cube file names as Images and add them to the project.
Definition: Project.cpp:1032
QString name() const
Get the project's GUI name.
Definition: Project.cpp:1625
void templatesAdded(TemplateList *newTemplates)
QString templateRoot() const
Accessor for the root directory of the template data.
Definition: Project.cpp:2135
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
void nameChanged(QString newName)
Emitted when project name is changed receivers: ProjectTreeWidget.
QString name() const
Get the human-readable name of this shape list.
Definition: ShapeList.cpp:555
void imagesAdded(ImageList *images)
Emitted when new images are available.
QString type() const
Get the type of template in this TemplateList.
Definition: TemplateList.cpp:91
void clear()
Clears the control list.
Definition: ControlList.cpp:145
void append(TargetBodyQsp const &value)
Appends a TargetBody to the list.
Definition: TargetBodyList.cpp:119
void setPath(QString newPath)
Set the relative path (from the project root) to this image list's folder.
Definition: ImageList.cpp:714
void cnetSaved(bool value)
Emmited in save() when the project is being saved Connected to Directory so that ControlPointEditWidg...
void setName(QString newName)
Change the project's name (GUI only, doesn't affect location on disk).
Definition: Project.cpp:1684
void writeSettings(FileName projName) const
QString id() const
Get a unique, identifying string associated with this image.
Definition: Image.cpp:445
ImageList * imageList() const
Returns the ImageList stored in the data of the item.
Definition: ProjectItem.cpp:486
QString name() const
Get the human-readable name of this control list.
Definition: ControlList.cpp:539
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
QString bundleSolutionInfoRoot() const
Accessor for the root directory of the results data.
Definition: Project.cpp:2243
QString resultsRoot() const
Accessor for the root directory of the results data.
Definition: Project.cpp:2214
void append(Shape *const &value)
Appends an shape to the shape list.
Definition: ShapeList.cpp:133
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
virtual void execute()
Execute the workorder.
Definition: WorkOrder.cpp:1403
void targetsAdded(TargetBodyList *targets)
Emitted when new TargetBody objects added to project receivers: Directory.
void setPrevious(WorkOrder *previousWorkOrder)
Sets the previous WorkOrder in the sequence.
Definition: WorkOrder.cpp:622
void append(Control *const &value)
Appends a control pointer to the control list.
Definition: ControlList.cpp:121
void deleteFromDisk(Project *project)
Delete all of the contained Controls from disk.
Definition: ControlList.cpp:562
QDir addTemplateFolder(QString prefix)
Create and navigate to the appropriate template type folder in the project directory.
Definition: Project.cpp:1134
void append(GuiCameraQsp const &value)
Appends a single GuiCamera to the list.
Definition: GuiCameraList.cpp:133
QString original() const
Returns the full file name including the file path.
Definition: FileName.cpp:212
QDir addCnetFolder(QString prefix)
Create and return the name of a folder for placing control networks.
Definition: Project.cpp:926
QSharedPointer< GuiCamera > GuiCameraQsp
GuiCameraQsp Represents a smart pointer to a GuiCamera object.
Definition: GuiCamera.h:186
List of GuiCameras saved as QSharedPointers.
Definition: GuiCameraList.h:35
This class is used to create and store valid Isis targets.
Definition: Target.h:63
QProgressBar * progress()
Definition: Project.cpp:1499
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595
bool isUndoing() const
Returns the WorkOrderUndoing state.
Definition: WorkOrder.cpp:903
QString id() const
Access the unique ID associated with this Control.
Definition: Control.cpp:282
void imageListAdded(ImageList *images)
Emitted when new ImageList added to Project receivers: ProjectTreeWidget.
ImageList * imageList(QString name)
Return an imagelist given its name.
Definition: Project.cpp:1520
Project(Directory &directory, QObject *parent=0)
Create a new Project.
Definition: Project.cpp:88
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
QDir addImageFolder(QString prefix)
Create and return the name of a folder for placing images.
Definition: Project.cpp:1003
Represents an item of a ProjectItemModel in Qt's model-view framework.
Definition: ProjectItem.h:134
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:272
bool isOpen()
Accessor to determine whether a current project is Open.
Definition: Project.cpp:1575