28 #include <QStringList> 30 #include <QXmlDefaultHandler> 35 class QXmlStreamWriter;
37 #include "ControlList.h" 39 #include "GuiCameraList.h" 40 #include "ImageList.h" 41 #include "ShapeList.h" 44 #include "XmlStackedHandler.h" 47 class BundleSolutionInfo;
51 class CorrelationMatrix;
335 QString
name()
const;
346 void writeSettings(
FileName projName)
const;
403 void save(
FileName projectPath,
bool verifyPathDoesntExist =
true);
407 template<
typename Data>
void warn(QString text, Data relevantData);
409 void warn(QString text);
536 void discardActiveControlEdits();
574 ControlList *createOrRetrieveControlList(QString
name, QString path =
"");
575 ImageList *createOrRetrieveImageList(QString
name, QString path =
"");
576 ShapeList *createOrRetrieveShapeList(QString
name, QString path =
"");
578 void writeSettings();
581 QString nextImageListGroupName();
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);
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;
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;
void imageListAdded(ImageList *images)
Emitted when new ImageList added to Project receivers: ProjectTreeWidget.
This represents an ISIS control net in a project-based GUI interface.
Internalizes a list of shapes and allows for operations on the entire list.
void waitForImageReaderFinished()
Locks program if another spot in code is still running and called this function.
QDir addImageFolder(QString prefix)
Create and return the name of a folder for placing images.
QString cnetRoot() const
Get where control networks ought to be stored inside the project.
Internalizes a list of images and allows for operations on the entire list.
void activeControlModified()
Emmited in cnetModified() when the actice control is modified.
BundleSettings * bundleSettings()
Return BundleSettings objects in Project.
QList< ShapeList * > shapes()
Return the projects shapelist.
void controlClosed(QObject *control)
A control is being deleted from the project.
The main project for ipce.
bool isClean()
Accessor to determine whether the current project is Unsaved.
~Project()
Clean up the project.
void projectSaved(Project *)
Emitted when project is saved.
void allControlsRemoved()
Emitted when all controls have been removed from the Project.
File name manipulation and expansion.
QList< WorkOrder * > workOrderHistory()
Get the entire list of work orders that have executed.
Container class for BundleAdjustment results.
bool hasTarget(QString id)
This method checks for the existence of a target based on TargetName.
void checkActiveControlAndImageList()
Checks if both an active control and active image list have been set.
Control * control(QString id)
Accessor for if the project is clearing or not.
void addCamera(Camera *camera)
Adds a new camera to the project.
static int maxRecentProjects()
Return max number of recent projects to be displayed.
QMutex * mutex()
Return mutex used for Naif calls.
WorkOrder * lastNotUndoneWorkOrder()
Return the last not undone workorder.
Shape * shape(QString id)
Return a shape given its id.
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
void controlListDeleted(QObject *controlList)
An control list is being deleted from the project.
void open(QString)
Open the project at the given path.
void addTarget(Target *target)
Adds a new target to the project.
bool m_clearing
used to determine whether a project's changes are unsaved
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...
QString targetBodyRoot() const
Accessor for the root directory of the target body data.
void addControl(Control *control)
Add the given Control's to the current project.
void controlsAndImagesAvailable()
Emitted when at least one cnet and image have been added to the project.
void controlListAdded(ControlList *controls)
apparently not used?
void activeControlAndImageListSet()
Emitted when both an active control and active image list have been set.
ControlList * controlList(QString name)
Return controlslist matching name in Project.
void targetBodyClosed(QObject *targetBodyObj)
A target body is being deleted from the project.
QList< TemplateList * > regTemplates()
Return registration template FileNames.
QList< TemplateList * > templates()
Return all template FileNames.
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
QUndoStack * undoStack()
Returns the Projects stack of QUndoCommands.
List for holding TargetBodies.
bool isTemporaryProject() const
Returns if the project is a temp project or not.
bool hasCamera(QString id)
This method checks for the existence of a camera based on InstrumentId.
void imagesReady(ImageList)
Prepare new images for opening.
QString imageDataRoot() const
Accessor for the root directory of the image data.
ShapeList * shapeList(QString name)
Return a shapelist given its name.
void clear()
Function to clear out all values in a project essentially making it a new project object...
Control * activeControl()
Return the Active Control (control network)
void addTemplates(TemplateList *templateFiles)
Add new templates to m_mapTemplates or m_regTemplates and update project item model.
void saveHistory(QXmlStreamWriter &stream) const
Serialize the work orders into the given XML.
void projectLoaded(Project *)
Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget.
QList< ImageList * > images()
Return projects imagelist.
void workOrderStarting(WorkOrder *)
Emitted when work order starts.
void waitForShapeReaderFinished()
Locks program if another spot in code is still running and called this function.
void createFolders()
This creates the project root, image root, and control net root directories.
void relocateProjectRoot(QString newRoot)
This is called when the project is moved.
void setActiveControl(QString displayName)
Set the Active Control (control network)
QList< TemplateList * > mapTemplates()
Return map template FileNames.
void addBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Add the given BundleSolutionInfo to the current project.
QMutex * workOrderMutex()
This function returns a QMutex.
void saveWarnings(QXmlStreamWriter &stream) const
Serialize the warnings into the given XML.
Directory * directory() const
Returns the directory associated with this Project.
void checkControlsAndImagesAvailable()
Checks if at least one control and image have been added to the project.
void addToProject(WorkOrder *)
This executes the WorkOrder and stores it in the project.
void imageClosed(QObject *image)
An image is being deleted from the project.
Provide Undo/redo abilities, serialization, and history for an operation.
QString shapeDataRoot() const
Accessor for the root directory of the shape model data.
void bundleSolutionInfoAdded(BundleSolutionInfo *bundleSolutionInfo)
Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should ...
void shapeListDeleted(QObject *shapeList)
A shape model list is being deleted from the project.
void shapeClosed(QObject *shape)
A shape model is being deleted from the project.
void cnetModified()
When a cnet is modified, set the project state to not clean.
void activeImageListSet()
Emitted when an active image list is set.
void deleteAllProjectFiles()
Delete all of the files, that this project stores, from disk.
Container class for BundleAdjustment settings.
void loadBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Loads bundle solution info into project.
TargetBodyList targetBodies()
Return TargetBodyList in Project.
XML Handler that parses XMLs in a stack-oriented way.
void guiCamerasAdded(GuiCameraList *targets)
Emitted when new GuiCamera objects added to project receivers: Directory.
ImageList * activeImageList()
Returns the active ImageList.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
The xml parser for ending tags.
void controlAdded(Control *control)
Emitted when new Control added to Project receivers: ProjectTreeWidget.
This represents a cube in a project-based GUI interface.
QDir addBundleSolutionInfoFolder(QString folder)
Create and return the name of a folder for placing BundleSolutionInfo.
QString projectRoot() const
Get the top-level folder of the project.
void projectRelocated(Project *)
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody.
void imageListDeleted(QObject *imageList)
An image list is being deleted from the project.
void addShapes(QStringList shapeFiles)
Read the given shape model cube file names as Images and add them to the project. ...
QList< QAction * > userPreferenceActions()
Get a list of configuration/settings actions related to reading images into this Project.
QList< ControlList * > controls()
Return controls in project.
Image * image(QString id)
Return an image given its id.
void shapesAdded(ShapeList *shapes)
Emitted when new shape model images are available.
QString newProjectRoot() const
Get the top-level folder of the new project.
void addImages(QStringList imageFiles)
Read the given cube file names as Images and add them to the project.
QString name() const
Get the project's GUI name.
This class is used to create and store valid Isis3 targets.
QString templateRoot() const
Accessor for the root directory of the template data.
QDir addShapeFolder(QString prefix)
Create and return the name of a folder for placing shape models.
List of GuiCameras saved as QSharedPointers.
int m_numImagesCurrentlyReading
used to negate segfaults happening in post undos when clearning project
void nameChanged(QString newName)
Emitted when project name is changed receivers: ProjectTreeWidget.
void imagesAdded(ImageList *images)
Emitted when new images are available.
bool save()
Generic save method to save the state of the project.
void setActiveImageList(QString displayName)
Set the Active ImageList from the displayName which is saved in project.xml.
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
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).
void activeControlSet(bool boolean)
Emitted when an active control is set.
This represents a shape in a project-based GUI interface.
void bundleSolutionInfoClosed(QObject *bundleSolutionInfo)
A BundleSolutionInfo object is being deleted from the project.
QString resultsRoot() const
Accessor for the root directory of the results data.
void workOrderFinished(WorkOrder *)
Emitted when work order ends.
QMap< QString, Control * > * m_idToControlMap
This variable will probably go away when we add the bundle results object because it will be under: B...
Namespace for ISIS/Bullet specific routines.
QString bundleSolutionInfoRoot() const
Accessor for the root directory of the results data.
void targetsAdded(TargetBodyList *targets)
Emitted when new TargetBody objects added to project receivers: Directory.
QDir addTemplateFolder(QString prefix)
Create and navigate to the appropriate template type folder in the project directory.
QDir addCnetFolder(QString prefix)
Create and return the name of a folder for placing control networks.
bool isOpen()
Accessor to determine whether a current project is Open.
void setClean(bool value)
Function to change the clean state of the project.
bool m_isClean
used to determine whether a project is currently open
ImageList * imageList(QString name)
Return an imagelist given its name.
Project(Directory &directory, QObject *parent=0)
Create a new Project.