Isis Developer Reference
Isis::Project Class Reference

The main project for ipce. More...

#include <Project.h>

Inheritance diagram for Isis::Project:
Inheritance graph
Collaboration diagram for Isis::Project:
Collaboration graph

Public Slots

void open (QString)
 Open the project at the given path.
 
void setClean (bool value)
 Function to change the clean state of the project.
 
void cnetModified ()
 When a cnet is modified, set the project state to not clean.
 

Signals

void controlListAdded (ControlList *controls)
 apparently not used?
 
void controlAdded (Control *control)
 Emitted when new Control added to Project receivers: ProjectTreeWidget.
 
void activeControlSet (bool boolean)
 Emitted when an active control is set.
 
void allControlsRemoved ()
 Emitted when all controls have been removed from the Project.
 
void imageListAdded (ImageList *images)
 Emitted when new ImageList added to Project receivers: ProjectTreeWidget.
 
void imagesAdded (ImageList *images)
 Emitted when new images are available.
 
void activeImageListSet ()
 Emitted when an active image list is set.
 
void activeControlAndImageListSet ()
 Emitted when both an active control and active image list have been set.
 
void controlsAndImagesAvailable ()
 Emitted when at least one cnet and image have been added to the project.
 
void shapesAdded (ShapeList *shapes)
 Emitted when new shape model images are available.
 
void bundleSolutionInfoAdded (BundleSolutionInfo *bundleSolutionInfo)
 Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should this be the Directory?)
 
void targetsAdded (TargetBodyList *targets)
 Emitted when new TargetBody objects added to project receivers: Directory.
 
void guiCamerasAdded (GuiCameraList *targets)
 Emitted when new GuiCamera objects added to project receivers: Directory.
 
void nameChanged (QString newName)
 Emitted when project name is changed receivers: ProjectTreeWidget.
 
void projectLoaded (Project *)
 Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget.
 
void projectSaved (Project *)
 Emitted when project is saved.
 
void projectRelocated (Project *)
 Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody.
 
void workOrderStarting (WorkOrder *)
 Emitted when work order starts.
 
void workOrderFinished (WorkOrder *)
 Emitted when work order ends.
 
void templatesAdded (TemplateList *newTemplates)
 
void discardActiveControlEdits ()
 
void activeControlModified ()
 Emmited in cnetModified() when the actice control is modified.
 
void cnetSaved (bool value)
 Emmited in save() when the project is being saved Connected to Directory so that ControlPointEditWidget can recolor the save net button.
 

Public Member Functions

 Project (Directory &directory, QObject *parent=0)
 Create a new Project.
 
 ~Project ()
 Clean up the project.
 
QList< QAction * > userPreferenceActions ()
 Get a list of configuration/settings actions related to reading images into this Project.
 
bool hasTarget (QString id)
 This method checks for the existence of a target based on TargetName.
 
bool hasCamera (QString id)
 This method checks for the existence of a camera based on InstrumentId.
 
QDir addBundleSolutionInfoFolder (QString folder)
 Create and return the name of a folder for placing BundleSolutionInfo.
 
QDir addCnetFolder (QString prefix)
 Create and return the name of a folder for placing control networks.
 
void addControl (Control *control)
 Add the given Control's to the current project.
 
QDir addImageFolder (QString prefix)
 Create and return the name of a folder for placing images.
 
void addImages (QStringList imageFiles)
 Read the given cube file names as Images and add them to the project.
 
void addImages (ImageList newImages)
 Read the given cube file names as Images and add them to the project.
 
void addImagesToIdMap (ImageList images)
 Add images to the id map which are not under the projects main data area, the Images node on the project tree, such as the images under bundle results.
 
QDir addShapeFolder (QString prefix)
 Create and return the name of a folder for placing shape models.
 
void addShapes (QStringList shapeFiles)
 Read the given shape model cube file names as Images and add them to the project.
 
void addShapes (ShapeList newShapes)
 Read the given shape model cube file names as Images and add them to the project.
 
void addTemplates (TemplateList *templateFiles)
 Add new templates to m_mapTemplates or m_regTemplates and update project item model.
 
QDir addTemplateFolder (QString prefix)
 Create and navigate to the appropriate template type folder in the project directory.
 
void addBundleSolutionInfo (BundleSolutionInfo *bundleSolutionInfo)
 Add the given BundleSolutionInfo to the current project.
 
void addTarget (Target *target)
 Adds a new target to the project.
 
void addCamera (Camera *camera)
 Adds a new camera to the project.
 
void loadBundleSolutionInfo (BundleSolutionInfo *bundleSolutionInfo)
 Loads bundle solution info into project.
 
void clear ()
 Function to clear out all values in a project essentially making it a new project object.
 
bool clearing ()
 
Controlcontrol (QString id)
 Accessor for if the project is clearing or not.
 
Directorydirectory () const
 Returns the directory associated with this Project.
 
Imageimage (QString id)
 Return an image given its id.
 
ImageListimageList (QString name)
 Return an imagelist given its name.
 
Shapeshape (QString id)
 Return a shape given its id.
 
ShapeListshapeList (QString name)
 Return a shapelist given its name.
 
bool isTemporaryProject () const
 Returns if the project is a temp project or not.
 
bool isOpen ()
 Accessor to determine whether a current project is Open.
 
bool isClean ()
 Accessor to determine whether the current project is Unsaved.
 
WorkOrderlastNotUndoneWorkOrder ()
 Return the last not undone workorder.
 
const WorkOrderlastNotUndoneWorkOrder () const
 Return the last not undone workorder.
 
QString name () const
 Get the project's GUI name.
 
QMutex * workOrderMutex ()
 This function returns a QMutex.
 
QMutex * mutex ()
 Return mutex used for Naif calls.
 
QString projectRoot () const
 Get the top-level folder of the project.
 
QString newProjectRoot () const
 Get the top-level folder of the new project.
 
void setName (QString newName)
 Change the project's name (GUI only, doesn't affect location on disk).
 
QUndoStack * undoStack ()
 Returns the Projects stack of QUndoCommands.
 
void waitForImageReaderFinished ()
 Locks program if another spot in code is still running and called this function.
 
void waitForShapeReaderFinished ()
 Locks program if another spot in code is still running and called this function.
 
QList< WorkOrder * > workOrderHistory ()
 Get the entire list of work orders that have executed.
 
void writeSettings (FileName projName) const
 
void readProjectXml (QXmlStreamReader *xmlReader)
 
void setActiveControl (QString displayName)
 Set the Active Control (control network)
 
ControlactiveControl ()
 Return the Active Control (control network)
 
void setActiveImageList (QString displayName)
 Set the Active ImageList from the displayName which is saved in project.xml.
 
ImageListactiveImageList ()
 Returns the active ImageList.
 
QString cnetRoot () const
 Get where control networks ought to be stored inside the project.
 
QList< ControlList * > controls ()
 Return controls in project.
 
ControlListcontrolList (QString name)
 Return controlslist matching name in Project.
 
QString imageDataRoot () const
 Accessor for the root directory of the image data.
 
QList< ImageList * > images ()
 Return projects imagelist.
 
QString shapeDataRoot () const
 Accessor for the root directory of the shape model data.
 
QList< ShapeList * > shapes ()
 Return the projects shapelist.
 
QString targetBodyRoot () const
 Accessor for the root directory of the target body data.
 
TargetBodyList targetBodies ()
 Return TargetBodyList in Project.
 
QString resultsRoot () const
 Accessor for the root directory of the results data.
 
QString bundleSolutionInfoRoot () const
 Accessor for the root directory of the results data.
 
QList< BundleSolutionInfo * > bundleSolutionInfo ()
 Return BundleSolutionInfo objects in Project.
 
QString templateRoot () const
 Accessor for the root directory of the template data.
 
QList< TemplateList * > templates ()
 Return all template FileNames.
 
QList< TemplateList * > mapTemplates ()
 Return map template FileNames.
 
QList< TemplateList * > regTemplates ()
 Return registration template FileNames.
 
void removeTemplate (FileName file)
 
void deleteAllProjectFiles ()
 Delete all of the files, that this project stores, from disk.
 
void relocateProjectRoot (QString newRoot)
 This is called when the project is moved.
 
BundleSettingsbundleSettings ()
 Return BundleSettings objects in Project.
 
QProgressBarprogress ()
 
void removeImages (ImageList &imageList)
 
bool save ()
 Generic save method to save the state of the project.
 
void save (FileName projectPath, bool verifyPathDoesntExist=true)
 Project::save Saves the project state out to an XML file.
 
void addToProject (WorkOrder *)
 This executes the WorkOrder and stores it in the project.
 
template<typename Data >
void warn (QString text, Data relevantData)
 
void warn (QString text)
 

Static Public Member Functions

static QStringList images (QStringList)
 Verify that the input fileNames are image files.
 
static QStringList shapes (QStringList)
 
static QString cnetRoot (QString projectRoot)
 Appends the root directory name 'cnets' to the project.
 
static QString imageDataRoot (QString projectRoot)
 Appends the root directory name 'images' to the project .
 
static QString shapeDataRoot (QString projectRoot)
 Appends the root directory name 'shapes' to the project .
 
static QString targetBodyRoot (QString projectRoot)
 Appends the root directory name 'targets' to the project .
 
static QString resultsRoot (QString projectRoot)
 Appends the root directory name 'results' to the project.
 
static QString bundleSolutionInfoRoot (QString projectRoot)
 Appends the root directory name 'bundle' to the project results directory.
 
static QString templateRoot (QString projectRoot)
 Appends the root directory name 'templates' to the project .
 
static int maxRecentProjects ()
 Return max number of recent projects to be displayed.
 

Detailed Description

The main project for ipce.

Author
2012-??-?? ???

Constructor & Destructor Documentation

◆ Project()

Isis::Project::Project ( Directory & directory,
QObject * parent = 0 )

Create a new Project.

This creates a project on disk at /tmp/username_appname_pid.

References _FILEINFO_, controlListAdded(), directory(), imagesAdded(), Isis::IException::Programmer, setClean(), Isis::toString(), and Isis::Environment::userName().

◆ ~Project()

Isis::Project::~Project ( )

Clean up the project.

This will bring the Project back to a safe on-disk state.

References bundleSolutionInfo(), control(), controlList(), image(), imageList(), shape(), and shapeList().

Member Function Documentation

◆ activeControl()

Control * Isis::Project::activeControl ( )

Return the Active Control (control network)

@description Returns the active control (control network) for views which need to operate on the same control, ie. Footprint2dView, CubeDnView, ControlPointEditView. IMPORTANT: Returns NULL if no active Control.

Returns
Control * Returns the active Control if set, otherwise returns NULL

References activeImageList(), and setActiveControl().

Referenced by Isis::Directory::addControlHealthMonitorView(), Isis::Directory::addControlPointEditView(), Isis::Directory::cleanupCnetEditorViewWidgets(), Isis::ControlHealthMonitorView::ControlHealthMonitorView(), Isis::ControlNetTool::loadNetwork(), Isis::MosaicControlNetTool::loadNetwork(), Isis::ImportControlNetWorkOrder::postExecution(), setActiveImageList(), and Isis::ControlPointEditWidget::setControlFromActive().

◆ activeControlAndImageListSet

void Isis::Project::activeControlAndImageListSet ( )
signal

Emitted when both an active control and active image list have been set.

receivers: WorkOrder::enableWorkOrder

◆ activeControlModified

void Isis::Project::activeControlModified ( )
signal

Emmited in cnetModified() when the actice control is modified.

Connected to Directory so that other views can redraw measures.

Referenced by cnetModified().

◆ activeControlSet

void Isis::Project::activeControlSet ( bool boolean)
signal

Emitted when an active control is set.

receivers: Project::checkActiveControlAndImageList

Referenced by setActiveControl().

◆ activeImageList()

ImageList * Isis::Project::activeImageList ( )

Returns the active ImageList.

Returns the active ImageList for views which need to operate on the same list of images, ie. Footprint2dView, CubeDnView, ControlPointEditView. IMPORTANT: Returns NULL if active ImageList is not set and a default cannot be set if there are multiple image lists in the project.

References imageList(), and setActiveImageList().

Referenced by activeControl(), and setActiveControl().

◆ activeImageListSet

void Isis::Project::activeImageListSet ( )
signal

Emitted when an active image list is set.

receivers: Project::checkActiveControlAndImageList

Referenced by setActiveImageList().

◆ addBundleSolutionInfo()

void Isis::Project::addBundleSolutionInfo ( BundleSolutionInfo * bundleSolutionInfo)

Add the given BundleSolutionInfo to the current project.

This will cause the BundleSolutionInfo to be saved/restored from disk, Project-related GUIs to display the BundleSolutionInfo, and enable access to the BundleSolutionInfo given access to the project.

References bundleSolutionInfo(), loadBundleSolutionInfo(), and projectRelocated().

◆ addBundleSolutionInfoFolder()

QDir Isis::Project::addBundleSolutionInfoFolder ( QString folder)

Create and return the name of a folder for placing BundleSolutionInfo.

TODO: don't know if sentence below is accurate. This can be called from multiple threads, but should only be called by one thread at a time.

References _FILEINFO_, bundleSolutionInfoRoot(), and Isis::IException::Io.

◆ addCamera()

void Isis::Project::addCamera ( Camera * camera)

Adds a new camera to the project.

Parameters
cameraThe camera to be added.

References Isis::GuiCameraList::append().

◆ addCnetFolder()

QDir Isis::Project::addCnetFolder ( QString prefix)

Create and return the name of a folder for placing control networks.

This can be called from multiple threads, but should only be called by one thread at a time.

References _FILEINFO_, cnetRoot(), and Isis::IException::Io.

Referenced by Isis::ImportControlNetWorkOrder::execute().

◆ addControl()

void Isis::Project::addControl ( Control * control)

Add the given Control's to the current project.

This will cause the controls to be saved/restored from disk, Project-related GUIs to display the control, and enable access to the controls given access to the project.

References Isis::ControlList::append(), control(), controlAdded(), Isis::FileName::dir(), Isis::Control::fileName(), Isis::Control::id(), and projectRelocated().

◆ addImageFolder()

QDir Isis::Project::addImageFolder ( QString prefix)

Create and return the name of a folder for placing images.

This can be called from multiple threads, but should only be called by one thread at a time.

References _FILEINFO_, imageDataRoot(), and Isis::IException::Io.

◆ addImages() [1/2]

void Isis::Project::addImages ( ImageList newImages)

Read the given cube file names as Images and add them to the project.

Parameters
ImageList

References guiCamerasAdded(), and targetsAdded().

◆ addImages() [2/2]

void Isis::Project::addImages ( QStringList imageFiles)

Read the given cube file names as Images and add them to the project.

Parameters
QStringListnames of imageFiles

Referenced by Isis::ImportImagesWorkOrder::postExecution().

◆ addImagesToIdMap()

void Isis::Project::addImagesToIdMap ( ImageList images)

Add images to the id map which are not under the projects main data area, the Images node on the project tree, such as the images under bundle results.

This is an interim solution since the Project and model/view does not seem to be properly handling data which is not on the main data part of the project tree.

Parameters
ImagesListof images

References Isis::Image::id(), image(), and images().

◆ addShapeFolder()

QDir Isis::Project::addShapeFolder ( QString prefix)

Create and return the name of a folder for placing shape models.

This can be called from multiple threads, but should only be called by one thread at a time.

References _FILEINFO_, Isis::IException::Io, and shapeDataRoot().

◆ addShapes() [1/2]

void Isis::Project::addShapes ( QStringList shapeFiles)

Read the given shape model cube file names as Images and add them to the project.

Parameters
QStringListof shape Files names

Referenced by Isis::ImportShapesWorkOrder::postExecution().

◆ addShapes() [2/2]

void Isis::Project::addShapes ( ShapeList newShapes)

Read the given shape model cube file names as Images and add them to the project.

Parameters
ShapeList

◆ addTarget()

void Isis::Project::addTarget ( Target * target)

Adds a new target to the project.

Parameters
targetThe target to be added.

References Isis::TargetBodyList::append().

◆ addTemplateFolder()

QDir Isis::Project::addTemplateFolder ( QString prefix)

Create and navigate to the appropriate template type folder in the project directory.

Parameters
prefixThe name of the director under templates/ to store the template file.

References _FILEINFO_, Isis::IException::Io, and templateRoot().

Referenced by Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), and Isis::TemplateEditorWidget::saveAsText().

◆ addTemplates()

void Isis::Project::addTemplates ( TemplateList * templateList)

Add new templates to m_mapTemplates or m_regTemplates and update project item model.

Parameters
newFileListQList of FileNames for each new imported template

References projectRelocated(), templatesAdded(), and Isis::TemplateList::type().

Referenced by Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), and Isis::TemplateEditorWidget::saveAsText().

◆ addToProject()

void Isis::Project::addToProject ( WorkOrder * workOrder)

This executes the WorkOrder and stores it in the project.

@decription Run the WorkOrder and stores it in the project. If WorkOrder::setupExecution() returns true then the WorkOrder's redo is called. This takes ownership of WorkOrder.

The order of events is: 1) WorkOrder::setupExecution() 2) emit workOrderStarting() 3) WorkOrder::redo()

See also
WorkOrder::redo()
Parameters
workOrderThe work order to be executed. This work order must not already be in the project.

References lastNotUndoneWorkOrder(), workOrderFinished(), and workOrderStarting().

Referenced by Isis::WorkOrder::addCloneToProject(), Isis::CloseProjectWorkOrder::setupExecution(), and Isis::OpenProjectWorkOrder::setupExecution().

◆ allControlsRemoved

void Isis::Project::allControlsRemoved ( )
signal

Emitted when all controls have been removed from the Project.

receivers: WorkOrder::disableWorkOrder

Currently does not work (there is no work order to remove cnets).

See also
Project::controlListDeleted(QObject *controlListObj)

◆ bundleSettings()

BundleSettings * Isis::Project::bundleSettings ( )
inline

Return BundleSettings objects in Project.

Returns
BundleSettings

◆ bundleSolutionInfo()

◆ bundleSolutionInfoAdded

void Isis::Project::bundleSolutionInfoAdded ( BundleSolutionInfo * bundleSolutionInfo)
signal

Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should this be the Directory?)

Referenced by loadBundleSolutionInfo().

◆ bundleSolutionInfoRoot() [1/2]

QString Isis::Project::bundleSolutionInfoRoot ( ) const

Accessor for the root directory of the results data.

Returns
The path to the root directory of the results data.

References bundleSolutionInfoRoot().

Referenced by addBundleSolutionInfoFolder(), bundleSolutionInfoRoot(), open(), and Isis::BundleSolutionInfo::save().

◆ bundleSolutionInfoRoot() [2/2]

QString Isis::Project::bundleSolutionInfoRoot ( QString projectRoot)
static

Appends the root directory name 'bundle' to the project results directory.

Returns
The path to the root directory of bundle results data.

References projectRoot().

Referenced by Isis::BundleSolutionInfo::save().

◆ clear()

void Isis::Project::clear ( )

Function to clear out all values in a project essentially making it a new project object.

This function is also respoinsible for cleaning any directories created when importing but are no longer a part of the project.

References _FILEINFO_, Isis::Directory::clean(), Isis::GuiCameraList::clear(), Isis::TargetBodyList::clear(), controls(), directory(), images(), mapTemplates(), Isis::IException::Programmer, projectRoot(), regTemplates(), setClean(), shapes(), and Isis::Environment::userName().

Referenced by Isis::CloseProjectWorkOrder::execute(), and open().

◆ clearing()

bool Isis::Project::clearing ( )

◆ cnetModified

void Isis::Project::cnetModified ( )
slot

When a cnet is modified, set the project state to not clean.

If the active control was modified, send a signal back to Directory so that other views know that the active was modified. This allows for CubeDnView and Footprint2DView to be redrawn. Currently, this was the easiest place to emit this signal.

References activeControlModified(), and setClean().

◆ cnetRoot() [1/2]

QString Isis::Project::cnetRoot ( ) const

Get where control networks ought to be stored inside the project.

This is a full path.

Returns
The path to the root directory of the cnet data.

References cnetRoot().

Referenced by addCnetFolder(), cnetRoot(), deleteAllProjectFiles(), and Isis::ControlList::save().

◆ cnetRoot() [2/2]

QString Isis::Project::cnetRoot ( QString projectRoot)
static

Appends the root directory name 'cnets' to the project.

Returns
The path to the root directory of the cnet data.

References projectRoot().

Referenced by Isis::Control::copyToNewProjectRoot(), Isis::ControlList::deleteFromDisk(), Isis::BundleSolutionInfo::updateFileName(), and Isis::Control::updateFileName().

◆ cnetSaved

void Isis::Project::cnetSaved ( bool value)
signal

Emmited in save() when the project is being saved Connected to Directory so that ControlPointEditWidget can recolor the save net button.

References writeSettings().

Referenced by save().

◆ control()

Control * Isis::Project::control ( QString id)

Accessor for if the project is clearing or not.

Given the id return the corrsponding control net.

Parameters
QStringid of control net

Referenced by addControl(), Isis::ExportControlNetWorkOrder::execute(), save(), and ~Project().

◆ controlAdded

void Isis::Project::controlAdded ( Control * control)
signal

Emitted when new Control added to Project receivers: ProjectTreeWidget.

Referenced by addControl().

◆ controlList()

ControlList * Isis::Project::controlList ( QString name)

Return controlslist matching name in Project.

Parameters
QStringname of controllist to be returned
Returns
ControlList matching name

References Isis::ControlList::name(), and name().

Referenced by save(), and ~Project().

◆ controlListAdded

void Isis::Project::controlListAdded ( ControlList * controls)
signal

apparently not used?

Emitted when new ControlList added to Project receivers: ProjectTreeWidget

Referenced by Project().

◆ controls()

QList< ControlList * > Isis::Project::controls ( )

◆ controlsAndImagesAvailable

void Isis::Project::controlsAndImagesAvailable ( )
signal

Emitted when at least one cnet and image have been added to the project.

This is used to enable the JigsawWorkOrder in the main menu. receivers: WorkOrder::enableWorkOrder

◆ deleteAllProjectFiles()

void Isis::Project::deleteAllProjectFiles ( )

Delete all of the files, that this project stores, from disk.

References cnetRoot(), imageDataRoot(), resultsRoot(), shapeDataRoot(), templateRoot(), and warn().

Referenced by save().

◆ directory()

Directory * Isis::Project::directory ( ) const

Returns the directory associated with this Project.

The directory is not part of the project so a non-const pointer is returned and this is okay.

Returns
The Directory that was used to create this Project.

Referenced by clear(), Isis::WorkOrder::directory(), Isis::BundleObservationViewWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::ControlHealthMonitorWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::JigsawWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::RemoveImagesWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::execute(), Isis::TargetGetInfoWorkOrder::execute(), Isis::TemplateEditViewWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::isExecutable(), Isis::TemplateEditViewWorkOrder::isExecutable(), Isis::TargetGetInfoWorkOrder::isExecutable(), Isis::JigsawSetupDialog::JigsawSetupDialog(), open(), Project(), setActiveControl(), setActiveImageList(), Isis::CubeDnViewWorkOrder::setupExecution(), Isis::Footprint2DViewWorkOrder::setupExecution(), Isis::ImageFileListViewWorkOrder::setupExecution(), Isis::MatrixViewWorkOrder::setupExecution(), Isis::RemoveImagesWorkOrder::setupExecution(), Isis::CnetEditorViewWorkOrder::undoExecution(), Isis::ImportImagesWorkOrder::undoExecution(), Isis::ImportMapTemplateWorkOrder::undoExecution(), Isis::ImportRegistrationTemplateWorkOrder::undoExecution(), Isis::ImportShapesWorkOrder::undoExecution(), Isis::MatrixViewWorkOrder::undoExecution(), warn(), and warn().

◆ discardActiveControlEdits

void Isis::Project::discardActiveControlEdits ( )
signal

Referenced by setActiveControl().

◆ guiCamerasAdded

void Isis::Project::guiCamerasAdded ( GuiCameraList * targets)
signal

Emitted when new GuiCamera objects added to project receivers: Directory.

Referenced by addImages().

◆ hasCamera()

bool Isis::Project::hasCamera ( QString id)

This method checks for the existence of a camera based on InstrumentId.

Parameters
idThe instrument string to be compared.
Returns
bool Returns true if GuiCamera already exists in project

◆ hasTarget()

bool Isis::Project::hasTarget ( QString id)

This method checks for the existence of a target based on TargetName.

Parameters
idThe target string to be compared.
Returns
bool Returns true if targetBody already exists in project

◆ image()

Image * Isis::Project::image ( QString id)

Return an image given its id.

Parameters
QStringid
Returns
Image matching id

Referenced by addImagesToIdMap(), Isis::WorkOrder::imageList(), removeImages(), and ~Project().

◆ imageDataRoot() [1/2]

QString Isis::Project::imageDataRoot ( ) const

Accessor for the root directory of the image data.

Returns
The path to the root directory of the image data.

References imageDataRoot().

Referenced by addImageFolder(), Isis::Image::copyToNewProjectRoot(), deleteAllProjectFiles(), imageDataRoot(), and Isis::ImageList::save().

◆ imageDataRoot() [2/2]

QString Isis::Project::imageDataRoot ( QString projectRoot)
static

Appends the root directory name 'images' to the project .

Returns
The path to the root directory of the image data.

References projectRoot().

Referenced by Isis::ImageList::deleteFromDisk(), and Isis::Image::updateFileName().

◆ imageList()

ImageList * Isis::Project::imageList ( QString name)

Return an imagelist given its name.

Parameters
QStringname
Returns
Imagelist matching name

References Isis::ImageList::name(), and name().

Referenced by activeImageList(), Isis::ExportImagesWorkOrder::execute(), removeImages(), and ~Project().

◆ imageListAdded

void Isis::Project::imageListAdded ( ImageList * images)
signal

Emitted when new ImageList added to Project receivers: ProjectTreeWidget.

◆ images() [1/2]

QList< ImageList * > Isis::Project::images ( )

Return projects imagelist.

Returns
Imagelist

Referenced by addImagesToIdMap(), and clear().

◆ images() [2/2]

QStringList Isis::Project::images ( QStringList fileNames)
static

Verify that the input fileNames are image files.

Parameters
fileNamesnames of files on disk
Returns
the files that are images.

Referenced by Isis::RemoveImagesWorkOrder::execute(), Isis::ImportImagesWorkOrder::postExecution(), and Isis::ProjectItem::ProjectItem().

◆ imagesAdded

void Isis::Project::imagesAdded ( ImageList * images)
signal

Emitted when new images are available.

receivers: Directory, Project, WorkOrder

Referenced by Project().

◆ isClean()

bool Isis::Project::isClean ( )

Accessor to determine whether the current project is Unsaved.

This is used to determine how the program should react with things like opening a new project or closing he window.

Referenced by open().

◆ isOpen()

bool Isis::Project::isOpen ( )

Accessor to determine whether a current project is Open.

Referenced by open().

◆ isTemporaryProject()

bool Isis::Project::isTemporaryProject ( ) const

Returns if the project is a temp project or not.

Returns
bool true if the project is temporary false otherwise

◆ lastNotUndoneWorkOrder() [1/2]

WorkOrder * Isis::Project::lastNotUndoneWorkOrder ( )

Return the last not undone workorder.

Returns
WorkOrder

References Isis::WorkOrder::previous().

Referenced by addToProject().

◆ lastNotUndoneWorkOrder() [2/2]

const WorkOrder * Isis::Project::lastNotUndoneWorkOrder ( ) const

Return the last not undone workorder.

Returns
WorkOrder

References Isis::WorkOrder::previous().

◆ loadBundleSolutionInfo()

void Isis::Project::loadBundleSolutionInfo ( BundleSolutionInfo * bundleSolutionInfo)

Loads bundle solution info into project.

Parameters
BundleSolutionInfo

References bundleSolutionInfo(), and bundleSolutionInfoAdded().

Referenced by addBundleSolutionInfo().

◆ mapTemplates()

QList< TemplateList * > Isis::Project::mapTemplates ( )

Return map template FileNames.

Returns
QList of FileName

Referenced by clear().

◆ maxRecentProjects()

static int Isis::Project::maxRecentProjects ( )
inlinestatic

Return max number of recent projects to be displayed.

Returns
Max number of recent Projects

Referenced by Isis::Directory::updateRecentProjects().

◆ mutex()

QMutex * Isis::Project::mutex ( )

Return mutex used for Naif calls.

This method is thread-safe.

Author
2012-09-11 Tracie Sucharski
Returns
QMutex*

Referenced by Isis::Control::openControlNet().

◆ name()

◆ nameChanged

void Isis::Project::nameChanged ( QString newName)
signal

Emitted when project name is changed receivers: ProjectTreeWidget.

Referenced by setName().

◆ newProjectRoot()

QString Isis::Project::newProjectRoot ( ) const

Get the top-level folder of the new project.

This is where the project is opened from/saved to. This is set when a Save As operation is in progress.

Referenced by Isis::Image::copyToNewProjectRoot(), relocateProjectRoot(), Isis::BundleSolutionInfo::save(), Isis::ControlList::save(), and Isis::ImageList::save().

◆ open

void Isis::Project::open ( QString projectPathStr)
slot

◆ progress()

QProgressBar * Isis::Project::progress ( )

◆ projectLoaded

void Isis::Project::projectLoaded ( Project * )
signal

Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget.

Referenced by open().

◆ projectRelocated

void Isis::Project::projectRelocated ( Project * )
signal

Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody.

Referenced by addBundleSolutionInfo(), addControl(), addTemplates(), and relocateProjectRoot().

◆ projectRoot()

◆ projectSaved

void Isis::Project::projectSaved ( Project * )
signal

Emitted when project is saved.

receivers: IpceMainWindow

Referenced by save().

◆ readProjectXml()

void Isis::Project::readProjectXml ( QXmlStreamReader * xmlReader)

◆ regTemplates()

QList< TemplateList * > Isis::Project::regTemplates ( )

Return registration template FileNames.

Returns
QList of FileName

Referenced by clear().

◆ relocateProjectRoot()

void Isis::Project::relocateProjectRoot ( QString newProjectRoot)

This is called when the project is moved.

Parameters
newProjectRootThe new root directory for the project.

References newProjectRoot(), and projectRelocated().

Referenced by save().

◆ removeImages()

void Isis::Project::removeImages ( ImageList & imageList)

◆ removeTemplate()

void Isis::Project::removeTemplate ( FileName file)

◆ resultsRoot() [1/2]

QString Isis::Project::resultsRoot ( ) const

Accessor for the root directory of the results data.

Returns
The path to the root directory of the results data.

References resultsRoot().

Referenced by deleteAllProjectFiles(), and resultsRoot().

◆ resultsRoot() [2/2]

QString Isis::Project::resultsRoot ( QString projectRoot)
static

Appends the root directory name 'results' to the project.

Returns
The path to the root directory of bundleresults data.

References projectRoot().

◆ save() [1/2]

bool Isis::Project::save ( )

Generic save method to save the state of the project.

This method is used to save the state of the project. If the project is currently a temporary project, this method will create a file dialog to prompt the user for a place/name to save the project as. Otherwise, the existing project state will be saved. This method also informs the caller whether or not the save occurred. It is possible for a save to NOT occur if the project is a temporary project and the user cancels/closes the dialog prompt.

Returns
bool Returns true if the save completed. The save is considered incomplete if the project is a temporary project and the user either cancels or closes the file dialog prompt that is created.

References cnetSaved(), control(), controlList(), deleteAllProjectFiles(), Isis::Control::isModified(), open(), relocateProjectRoot(), save(), and Isis::Control::write().

Referenced by Isis::SaveProjectAsWorkOrder::execute(), save(), save(), and Isis::SaveProjectWorkOrder::setupExecution().

◆ save() [2/2]

void Isis::Project::save ( FileName newPath,
bool verifyPathDoesntExist = true )

Project::save Saves the project state out to an XML file.

Parameters
projectPathThe path to the project directory.
verifyPathDoesntExistA boolean variable which is set to true if we wish to check that we are not overwriting a pre-existing save.

XML Serialization. Below is a tree listing the XML tag hiearchy.

@startsalt{projectXMLTagHierarchy.png}"Project::Save XML Tag Hierarchy"

{ {T +project (project.xml) ++controlNets +++controlList 1 (controls.xml) ++++controls +++++controlNet +++controlList 2 ++++controls +++++controlNet ++imageLists +++imageList 1 (images.xml) ++++images +++++image +++imageList 2 (images.xml) ++++images +++++image ++shapeLists +++shapeList 1 (shapes.xml) ++++shapes +++++shape +++shapeList 2 (shapes.xml) ++bundleRuns (currently the tag is output, but not run times) ++activeImageList ++activeControl } } @endsalt

The figure below represents a flow chart for XML code generation which starts with a call to this function:

References _FILEINFO_, Isis::IException::Io, projectSaved(), and save().

◆ setActiveControl()

void Isis::Project::setActiveControl ( QString displayName)

◆ setActiveImageList()

void Isis::Project::setActiveImageList ( QString displayName)

Set the Active ImageList from the displayName which is saved in project.xml.

Set the active ImageList for views which need to operate on the same list of images, ie. Footprint2dView, CubeDnView, ControlPointEditView. This version of the setActiveImageList method is used when loading a project which has an activeImageList saved.

References activeControl(), activeImageListSet(), Isis::Control::controlNet(), directory(), Isis::ProjectItemModel::findItemData(), Isis::ProjectItem::imageList(), Isis::ProjectItem::isImageList(), Isis::Directory::model(), name(), Isis::ControlNet::SetImages(), and Isis::ProjectItem::setTextColor().

Referenced by activeImageList(), Isis::SetActiveImageListWorkOrder::execute(), and readProjectXml().

◆ setClean

◆ setName()

void Isis::Project::setName ( QString newName)

Change the project's name (GUI only, doesn't affect location on disk).

References nameChanged().

Referenced by Isis::RenameProjectWorkOrder::execute(), readProjectXml(), and Isis::RenameProjectWorkOrder::undoExecution().

◆ shape()

Shape * Isis::Project::shape ( QString id)

Return a shape given its id.

Parameters
QStringid
Returns
Shape matching id

Referenced by Isis::WorkOrder::shapeList(), and ~Project().

◆ shapeDataRoot() [1/2]

QString Isis::Project::shapeDataRoot ( ) const

Accessor for the root directory of the shape model data.

Returns
The path to the root directory of the shape model data.

References shapeDataRoot().

Referenced by addShapeFolder(), Isis::Shape::copyToNewProjectRoot(), deleteAllProjectFiles(), Isis::ShapeList::save(), and shapeDataRoot().

◆ shapeDataRoot() [2/2]

QString Isis::Project::shapeDataRoot ( QString projectRoot)
static

Appends the root directory name 'shapes' to the project .

Returns
The path to the root directory of the shape models data.

References projectRoot().

Referenced by Isis::ShapeList::deleteFromDisk(), and Isis::Shape::updateFileName().

◆ shapeList()

ShapeList * Isis::Project::shapeList ( QString name)

Return a shapelist given its name.

Parameters
QStringname
Returns
Shapelist matching name

References name(), and Isis::ShapeList::name().

Referenced by ~Project().

◆ shapes() [1/2]

QList< ShapeList * > Isis::Project::shapes ( )

Return the projects shapelist.

Returns
Qlist of Shapelist

Referenced by clear().

◆ shapes() [2/2]

◆ shapesAdded

void Isis::Project::shapesAdded ( ShapeList * shapes)
signal

Emitted when new shape model images are available.

receivers: Directory, Project, WorkOrder

◆ targetBodies()

TargetBodyList Isis::Project::targetBodies ( )

◆ targetBodyRoot() [1/2]

QString Isis::Project::targetBodyRoot ( ) const

Accessor for the root directory of the target body data.

Returns
The path to the root directory of the target body data.

References targetBodyRoot().

Referenced by targetBodyRoot().

◆ targetBodyRoot() [2/2]

QString Isis::Project::targetBodyRoot ( QString projectRoot)
static

Appends the root directory name 'targets' to the project .

Returns
The path to the root directory of the target body data.

References projectRoot().

◆ targetsAdded

void Isis::Project::targetsAdded ( TargetBodyList * targets)
signal

Emitted when new TargetBody objects added to project receivers: Directory.

Referenced by addImages().

◆ templateRoot() [1/2]

QString Isis::Project::templateRoot ( ) const

Accessor for the root directory of the template data.

Returns
The path to the root directory of the template data.

References templateRoot().

Referenced by addTemplateFolder(), deleteAllProjectFiles(), Isis::TemplateList::save(), and templateRoot().

◆ templateRoot() [2/2]

QString Isis::Project::templateRoot ( QString projectRoot)
static

Appends the root directory name 'templates' to the project .

Returns
The path to the root directory of the templates data.

References projectRoot().

Referenced by Isis::TemplateList::deleteFromDisk(), and Isis::Template::updateFileName().

◆ templates()

QList< TemplateList * > Isis::Project::templates ( )

Return all template FileNames.

Returns
QList of FileName

Referenced by Isis::ProjectItem::ProjectItem().

◆ templatesAdded

void Isis::Project::templatesAdded ( TemplateList * newTemplates)
signal

Referenced by addTemplates().

◆ undoStack()

QUndoStack * Isis::Project::undoStack ( )

◆ userPreferenceActions()

QList< QAction * > Isis::Project::userPreferenceActions ( )

Get a list of configuration/settings actions related to reading images into this Project.

These are things like default opacity, default filled, etc.

References Isis::ImageDisplayProperties::FootprintViewProperties.

◆ waitForImageReaderFinished()

void Isis::Project::waitForImageReaderFinished ( )

Locks program if another spot in code is still running and called this function.

Referenced by Isis::ImportImagesWorkOrder::undoExecution().

◆ waitForShapeReaderFinished()

void Isis::Project::waitForShapeReaderFinished ( )

Locks program if another spot in code is still running and called this function.

Referenced by Isis::ImportShapesWorkOrder::undoExecution().

◆ warn() [1/2]

void Isis::Project::warn ( QString text)

◆ warn() [2/2]

◆ workOrderFinished

void Isis::Project::workOrderFinished ( WorkOrder * )
signal

Emitted when work order ends.

Referenced by addToProject().

◆ workOrderHistory()

QList< WorkOrder * > Isis::Project::workOrderHistory ( )

Get the entire list of work orders that have executed.

◆ workOrderMutex()

QMutex * Isis::Project::workOrderMutex ( )

This function returns a QMutex.

This was needed to be able to deal with a threading issue with Work Order functions returning a member variable. This is used by creating a QMutexLocker inside of a function accessing a member variable and using the returned QMutex from this function as a parameter. Because the QMutexLocker was created in the function accessing the member variable when the function exits the QMutexLocker is destroyed and the QMutex is unlocked.

Returns
QMutex

◆ workOrderStarting

void Isis::Project::workOrderStarting ( WorkOrder * )
signal

Emitted when work order starts.

Referenced by addToProject().

◆ writeSettings()

void Isis::Project::writeSettings ( FileName projName) const

Referenced by cnetSaved().


The documentation for this class was generated from the following files: