Isis Developer Reference
|
The main project for ipce. More...
#include <Project.h>
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 () |
Control * | control (QString id) |
Accessor for if the project is clearing or not. | |
Directory * | directory () const |
Returns the directory associated with this Project. | |
Image * | image (QString id) |
Return an image given its id. | |
ImageList * | imageList (QString name) |
Return an imagelist given its name. | |
Shape * | shape (QString id) |
Return a shape given its id. | |
ShapeList * | shapeList (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. | |
WorkOrder * | lastNotUndoneWorkOrder () |
Return the last not undone workorder. | |
const WorkOrder * | lastNotUndoneWorkOrder () 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 | setActiveControl (QString displayName) |
Set the Active Control (control network) | |
Control * | activeControl () |
Return the Active Control (control network) | |
void | setActiveImageList (QString displayName) |
Set the Active ImageList from the displayName which is saved in project.xml. | |
ImageList * | activeImageList () |
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. | |
ControlList * | controlList (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. | |
BundleSettings * | bundleSettings () |
Return BundleSettings objects in Project. | |
QProgressBar * | progress () |
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. | |
The main project for ipce.
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().
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().
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.
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().
|
signal |
Emitted when both an active control and active image list have been set.
receivers: WorkOrder::enableWorkOrder
|
signal |
Emmited in cnetModified() when the actice control is modified.
Connected to Directory so that other views can redraw measures.
Referenced by cnetModified().
|
signal |
Emitted when an active control is set.
receivers: Project::checkActiveControlAndImageList
Referenced by setActiveControl().
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().
|
signal |
Emitted when an active image list is set.
receivers: Project::checkActiveControlAndImageList
Referenced by setActiveImageList().
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().
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.
void Isis::Project::addCamera | ( | Camera * | camera | ) |
Adds a new camera to the project.
camera | The camera to be added. |
References Isis::GuiCameraList::append().
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().
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().
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.
void Isis::Project::addImages | ( | ImageList | newImages | ) |
Read the given cube file names as Images and add them to the project.
ImageList |
References guiCamerasAdded(), and targetsAdded().
void Isis::Project::addImages | ( | QStringList | imageFiles | ) |
Read the given cube file names as Images and add them to the project.
QStringList | names of imageFiles |
Referenced by Isis::ImportImagesWorkOrder::postExecution().
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.
ImagesList | of images |
References Isis::Image::id(), image(), and images().
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().
void Isis::Project::addShapes | ( | QStringList | shapeFiles | ) |
Read the given shape model cube file names as Images and add them to the project.
QStringList | of shape Files names |
Referenced by Isis::ImportShapesWorkOrder::postExecution().
void Isis::Project::addShapes | ( | ShapeList | newShapes | ) |
Read the given shape model cube file names as Images and add them to the project.
ShapeList |
void Isis::Project::addTarget | ( | Target * | target | ) |
Adds a new target to the project.
target | The target to be added. |
References Isis::TargetBodyList::append().
QDir Isis::Project::addTemplateFolder | ( | QString | prefix | ) |
Create and navigate to the appropriate template type folder in the project directory.
prefix | The 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().
void Isis::Project::addTemplates | ( | TemplateList * | templateList | ) |
Add new templates to m_mapTemplates or m_regTemplates and update project item model.
newFileList | QList 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().
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()
workOrder | The 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().
|
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).
|
inline |
Return BundleSettings objects in Project.
QList< BundleSolutionInfo * > Isis::Project::bundleSolutionInfo | ( | ) |
Return BundleSolutionInfo objects in Project.
Referenced by addBundleSolutionInfo(), Isis::JigsawRunWidget::init(), Isis::JigsawSetupDialog::JigsawSetupDialog(), loadBundleSolutionInfo(), Isis::ProjectItem::ProjectItem(), and ~Project().
|
signal |
Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should this be the Directory?)
Referenced by loadBundleSolutionInfo().
QString Isis::Project::bundleSolutionInfoRoot | ( | ) | const |
Accessor for the root directory of the results data.
References bundleSolutionInfoRoot().
Referenced by addBundleSolutionInfoFolder(), bundleSolutionInfoRoot(), open(), and Isis::BundleSolutionInfo::save().
|
static |
Appends the root directory name 'bundle' to the project results directory.
References projectRoot().
Referenced by Isis::BundleSolutionInfo::save().
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().
bool Isis::Project::clearing | ( | ) |
|
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().
QString Isis::Project::cnetRoot | ( | ) | const |
Get where control networks ought to be stored inside the project.
This is a full path.
References cnetRoot().
Referenced by addCnetFolder(), cnetRoot(), deleteAllProjectFiles(), and Isis::ControlList::save().
|
static |
Appends the root directory name 'cnets' to the project.
References projectRoot().
Referenced by Isis::Control::copyToNewProjectRoot(), Isis::ControlList::deleteFromDisk(), Isis::BundleSolutionInfo::updateFileName(), and Isis::Control::updateFileName().
|
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 * Isis::Project::control | ( | QString | id | ) |
Accessor for if the project is clearing or not.
Given the id return the corrsponding control net.
QString | id of control net |
Referenced by addControl(), Isis::ExportControlNetWorkOrder::execute(), save(), and ~Project().
|
signal |
Emitted when new Control added to Project receivers: ProjectTreeWidget.
Referenced by addControl().
ControlList * Isis::Project::controlList | ( | QString | name | ) |
Return controlslist matching name in Project.
QString | name of controllist to be returned |
References Isis::ControlList::name(), and name().
Referenced by save(), and ~Project().
|
signal |
apparently not used?
Emitted when new ControlList added to Project receivers: ProjectTreeWidget
Referenced by Project().
QList< ControlList * > Isis::Project::controls | ( | ) |
Return controls in project.
Referenced by clear(), Isis::JigsawSetupDialog::JigsawSetupDialog(), Isis::ProjectItem::ProjectItem(), and Isis::ControlNetTool::toolPadAction().
|
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
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 * 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.
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().
|
signal |
Referenced by setActiveControl().
|
signal |
Emitted when new GuiCamera objects added to project receivers: Directory.
Referenced by addImages().
bool Isis::Project::hasCamera | ( | QString | id | ) |
This method checks for the existence of a camera based on InstrumentId.
id | The instrument string to be compared. |
bool Isis::Project::hasTarget | ( | QString | id | ) |
This method checks for the existence of a target based on TargetName.
id | The target string to be compared. |
Image * Isis::Project::image | ( | QString | id | ) |
Return an image given its id.
QString | id |
Referenced by addImagesToIdMap(), Isis::WorkOrder::imageList(), removeImages(), and ~Project().
QString Isis::Project::imageDataRoot | ( | ) | const |
Accessor for the root directory of the image data.
References imageDataRoot().
Referenced by addImageFolder(), Isis::Image::copyToNewProjectRoot(), deleteAllProjectFiles(), imageDataRoot(), and Isis::ImageList::save().
|
static |
Appends the root directory name 'images' to the project .
References projectRoot().
Referenced by Isis::ImageList::deleteFromDisk(), and Isis::Image::updateFileName().
ImageList * Isis::Project::imageList | ( | QString | name | ) |
Return an imagelist given its name.
QString | name |
References Isis::ImageList::name(), and name().
Referenced by activeImageList(), Isis::ExportImagesWorkOrder::execute(), removeImages(), and ~Project().
|
signal |
|
static |
Verify that the input fileNames are image files.
fileNames | names of files on disk |
Referenced by Isis::RemoveImagesWorkOrder::execute(), Isis::ImportImagesWorkOrder::postExecution(), and Isis::ProjectItem::ProjectItem().
|
signal |
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().
bool Isis::Project::isOpen | ( | ) |
Accessor to determine whether a current project is Open.
Referenced by open().
bool Isis::Project::isTemporaryProject | ( | ) | const |
Returns if the project is a temp project or not.
WorkOrder * Isis::Project::lastNotUndoneWorkOrder | ( | ) |
Return the last not undone workorder.
References Isis::WorkOrder::previous().
Referenced by addToProject().
const WorkOrder * Isis::Project::lastNotUndoneWorkOrder | ( | ) | const |
void Isis::Project::loadBundleSolutionInfo | ( | BundleSolutionInfo * | bundleSolutionInfo | ) |
Loads bundle solution info into project.
BundleSolutionInfo |
References bundleSolutionInfo(), and bundleSolutionInfoAdded().
Referenced by addBundleSolutionInfo().
QList< TemplateList * > Isis::Project::mapTemplates | ( | ) |
|
inlinestatic |
Return max number of recent projects to be displayed.
Referenced by Isis::Directory::updateRecentProjects().
QMutex * Isis::Project::mutex | ( | ) |
Return mutex used for Naif calls.
This method is thread-safe.
Referenced by Isis::Control::openControlNet().
QString Isis::Project::name | ( | ) | const |
Get the project's GUI name.
Referenced by controlList(), imageList(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), setActiveImageList(), Isis::ProjectItem::setProject(), Isis::RenameProjectWorkOrder::setupExecution(), and shapeList().
|
signal |
Emitted when project name is changed receivers: ProjectTreeWidget.
Referenced by setName().
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().
|
slot |
Open the project at the given path.
The | path to the project folder |
References _FILEINFO_, bundleSolutionInfoRoot(), clear(), directory(), Isis::IException::Io, isClean(), isOpen(), projectLoaded(), Isis::XmlStackedHandlerReader::pushContentHandler(), setClean(), Isis::Directory::showWarning(), and warn().
Referenced by Isis::OpenProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), and save().
QProgressBar * Isis::Project::progress | ( | ) |
|
signal |
Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget.
Referenced by open().
|
signal |
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody.
Referenced by addBundleSolutionInfo(), addControl(), addTemplates(), and relocateProjectRoot().
QString Isis::Project::projectRoot | ( | ) | const |
Get the top-level folder of the project.
This is where the project is opened from/saved to.
Referenced by bundleSolutionInfoRoot(), clear(), cnetRoot(), Isis::Control::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), Isis::Shape::copyToNewProjectRoot(), imageDataRoot(), resultsRoot(), Isis::BundleSolutionInfo::save(), Isis::ControlList::save(), Isis::ImageList::save(), Isis::ProjectItem::setProject(), shapeDataRoot(), targetBodyRoot(), templateRoot(), and Isis::Directory::updateRecentProjects().
|
signal |
QList< TemplateList * > Isis::Project::regTemplates | ( | ) |
void Isis::Project::relocateProjectRoot | ( | QString | newProjectRoot | ) |
This is called when the project is moved.
newProjectRoot | The new root directory for the project. |
References newProjectRoot(), and projectRelocated().
Referenced by save().
void Isis::Project::removeImages | ( | ImageList & | imageList | ) |
References image(), imageList(), and Isis::ImageList::name().
Referenced by Isis::RemoveImagesWorkOrder::execute().
void Isis::Project::removeTemplate | ( | FileName | file | ) |
QString Isis::Project::resultsRoot | ( | ) | const |
Accessor for the root directory of the results data.
References resultsRoot().
Referenced by deleteAllProjectFiles(), and resultsRoot().
|
static |
Appends the root directory name 'results' to the project.
References projectRoot().
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.
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().
void Isis::Project::save | ( | FileName | newPath, |
bool | verifyPathDoesntExist = true ) |
Project::save Saves the project state out to an XML file.
projectPath | The path to the project directory. |
verifyPathDoesntExist | A 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().
void Isis::Project::setActiveControl | ( | QString | displayName | ) |
Set the Active Control (control network)
Set the active control (control network) for views which need to operate on the same control, ie. Footprint2dView, CubeDnView, ControlPointEditView.
References activeControlSet(), activeImageList(), Isis::ProjectItem::control(), directory(), discardActiveControlEdits(), Isis::ProjectItemModel::findItemData(), Isis::ProjectItem::isControl(), Isis::Directory::model(), and Isis::ProjectItem::setTextColor().
Referenced by activeControl(), and Isis::SetActiveControlWorkOrder::execute().
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(), and Isis::SetActiveImageListWorkOrder::execute().
|
slot |
Function to change the clean state of the project.
This is needed because not every action that changes the project is a workorder. This needs to be called everytime a user would consider an action changing the project. This also explicitely sets the undoStack to the same value passed.
the | boolean value to set the clean state to |
Referenced by clear(), cnetModified(), Isis::BundleObservationViewWorkOrder::execute(), Isis::CloseProjectWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImportImagesWorkOrder::execute(), Isis::ImportMapTemplateWorkOrder::execute(), Isis::ImportRegistrationTemplateWorkOrder::execute(), Isis::ImportShapesWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::OpenProjectWorkOrder::execute(), Isis::RemoveImagesWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), open(), Project(), Isis::TemplateEditorWidget::saveAsText(), and Isis::SaveProjectWorkOrder::setupExecution().
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(), and Isis::RenameProjectWorkOrder::undoExecution().
Shape * Isis::Project::shape | ( | QString | id | ) |
Return a shape given its id.
QString | id |
Referenced by Isis::WorkOrder::shapeList(), and ~Project().
QString Isis::Project::shapeDataRoot | ( | ) | const |
Accessor for the root directory of the shape model data.
References shapeDataRoot().
Referenced by addShapeFolder(), Isis::Shape::copyToNewProjectRoot(), deleteAllProjectFiles(), Isis::ShapeList::save(), and shapeDataRoot().
|
static |
Appends the root directory name 'shapes' to the project .
References projectRoot().
Referenced by Isis::ShapeList::deleteFromDisk(), and Isis::Shape::updateFileName().
ShapeList * Isis::Project::shapeList | ( | QString | name | ) |
Return a shapelist given its name.
QString | name |
References name(), and Isis::ShapeList::name().
Referenced by ~Project().
|
static |
Referenced by Isis::ImportShapesWorkOrder::postExecution(), and Isis::ProjectItem::ProjectItem().
|
signal |
TargetBodyList Isis::Project::targetBodies | ( | ) |
Return TargetBodyList in Project.
Referenced by Isis::JigsawSetupDialog::JigsawSetupDialog().
QString Isis::Project::targetBodyRoot | ( | ) | const |
Accessor for the root directory of the target body data.
References targetBodyRoot().
Referenced by targetBodyRoot().
|
static |
Appends the root directory name 'targets' to the project .
References projectRoot().
|
signal |
Emitted when new TargetBody objects added to project receivers: Directory.
Referenced by addImages().
QString Isis::Project::templateRoot | ( | ) | const |
Accessor for the root directory of the template data.
References templateRoot().
Referenced by addTemplateFolder(), deleteAllProjectFiles(), Isis::TemplateList::save(), and templateRoot().
|
static |
Appends the root directory name 'templates' to the project .
References projectRoot().
Referenced by Isis::TemplateList::deleteFromDisk(), and Isis::Template::updateFileName().
QList< TemplateList * > Isis::Project::templates | ( | ) |
Return all template FileNames.
Referenced by Isis::ProjectItem::ProjectItem().
|
signal |
Referenced by addTemplates().
QUndoStack * Isis::Project::undoStack | ( | ) |
Returns the Projects stack of QUndoCommands.
Referenced by Isis::HistoryTreeWidget::HistoryTreeWidget(), Isis::ImportShapesWorkOrder::postExecution(), Isis::Directory::redoAction(), and Isis::Directory::undoAction().
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.
void Isis::Project::waitForImageReaderFinished | ( | ) |
Locks program if another spot in code is still running and called this function.
Referenced by Isis::ImportImagesWorkOrder::undoExecution().
void Isis::Project::waitForShapeReaderFinished | ( | ) |
Locks program if another spot in code is still running and called this function.
Referenced by Isis::ImportShapesWorkOrder::undoExecution().
void Isis::Project::warn | ( | QString | text | ) |
References directory(), and Isis::Directory::showWarning().
void Isis::Project::warn | ( | QString | text, |
Data | relevantData ) |
References directory(), and Isis::Directory::showWarning().
Referenced by deleteAllProjectFiles(), open(), Isis::ExportControlNetWorkOrder::postExecution(), Isis::ExportImagesWorkOrder::postExecution(), Isis::ImportControlNetWorkOrder::postExecution(), Isis::ImportImagesWorkOrder::postExecution(), Isis::ImportShapesWorkOrder::postExecution(), and Isis::ImportImagesWorkOrder::setupExecution().
|
signal |
Emitted when work order ends.
Referenced by addToProject().
Get the entire list of work orders that have executed.
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.
|
signal |
Emitted when work order starts.
Referenced by addToProject().
void Isis::Project::writeSettings | ( | FileName | projName | ) | const |
Referenced by cnetSaved().