Isis 3 Developer Reference
|
The main project for ipce. More...
#include <Project.h>
Public Slots | |
void | open (QString) |
Open the project at the given path. More... | |
void | setClean (bool value) |
Function to change the clean state of the project. More... | |
void | cnetModified () |
When a cnet is modified, set the project state to not clean. More... | |
Signals | |
void | controlListAdded (ControlList *controls) |
apparently not used? More... | |
void | controlAdded (Control *control) |
Emitted when new Control added to Project receivers: ProjectTreeWidget. More... | |
void | activeControlSet (bool boolean) |
Emitted when an active control is set. More... | |
void | allControlsRemoved () |
Emitted when all controls have been removed from the Project. More... | |
void | imageListAdded (ImageList *images) |
Emitted when new ImageList added to Project receivers: ProjectTreeWidget. More... | |
void | imagesAdded (ImageList *images) |
Emitted when new images are available. More... | |
void | activeImageListSet () |
Emitted when an active image list is set. More... | |
void | activeControlAndImageListSet () |
Emitted when both an active control and active image list have been set. More... | |
void | controlsAndImagesAvailable () |
Emitted when at least one cnet and image have been added to the project. More... | |
void | shapesAdded (ShapeList *shapes) |
Emitted when new shape model images are available. More... | |
void | bundleSolutionInfoAdded (BundleSolutionInfo *bundleSolutionInfo) |
Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should this be the Directory?) More... | |
void | targetsAdded (TargetBodyList *targets) |
Emitted when new TargetBody objects added to project receivers: Directory. More... | |
void | guiCamerasAdded (GuiCameraList *targets) |
Emitted when new GuiCamera objects added to project receivers: Directory. More... | |
void | nameChanged (QString newName) |
Emitted when project name is changed receivers: ProjectTreeWidget. More... | |
void | projectLoaded (Project *) |
Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget. More... | |
void | projectSaved (Project *) |
Emitted when project is saved. More... | |
void | projectRelocated (Project *) |
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody. More... | |
void | workOrderStarting (WorkOrder *) |
Emitted when work order starts. More... | |
void | workOrderFinished (WorkOrder *) |
Emitted when work order ends. More... | |
void | templatesAdded (TemplateList *newTemplates) |
void | discardActiveControlEdits () |
void | activeControlModified () |
Emmited in cnetModified() when the actice control is modified. More... | |
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. More... | |
Public Member Functions | |
Project (Directory &directory, QObject *parent=0) | |
Create a new Project. More... | |
~Project () | |
Clean up the project. More... | |
QList< QAction * > | userPreferenceActions () |
Get a list of configuration/settings actions related to reading images into this Project. More... | |
bool | hasTarget (QString id) |
This method checks for the existence of a target based on TargetName. More... | |
bool | hasCamera (QString id) |
This method checks for the existence of a camera based on InstrumentId. More... | |
QDir | addBundleSolutionInfoFolder (QString folder) |
Create and return the name of a folder for placing BundleSolutionInfo. More... | |
QDir | addCnetFolder (QString prefix) |
Create and return the name of a folder for placing control networks. More... | |
void | addControl (Control *control) |
Add the given Control's to the current project. More... | |
QDir | addImageFolder (QString prefix) |
Create and return the name of a folder for placing images. More... | |
void | addImages (QStringList imageFiles) |
Read the given cube file names as Images and add them to the project. More... | |
void | addImages (ImageList newImages) |
Read the given cube file names as Images and add them to the project. More... | |
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. More... | |
QDir | addShapeFolder (QString prefix) |
Create and return the name of a folder for placing shape models. More... | |
void | addShapes (QStringList shapeFiles) |
Read the given shape model cube file names as Images and add them to the project. More... | |
void | addShapes (ShapeList newShapes) |
Read the given shape model cube file names as Images and add them to the project. More... | |
void | addTemplates (TemplateList *templateFiles) |
Add new templates to m_mapTemplates or m_regTemplates and update project item model. More... | |
QDir | addTemplateFolder (QString prefix) |
Create and navigate to the appropriate template type folder in the project directory. More... | |
void | addBundleSolutionInfo (BundleSolutionInfo *bundleSolutionInfo) |
Add the given BundleSolutionInfo to the current project. More... | |
void | addTarget (Target *target) |
Adds a new target to the project. More... | |
void | addCamera (Camera *camera) |
Adds a new camera to the project. More... | |
void | loadBundleSolutionInfo (BundleSolutionInfo *bundleSolutionInfo) |
Loads bundle solution info into project. More... | |
void | clear () |
Function to clear out all values in a project essentially making it a new project object. More... | |
bool | clearing () |
Control * | control (QString id) |
Accessor for if the project is clearing or not. More... | |
Directory * | directory () const |
Returns the directory associated with this Project. More... | |
Image * | image (QString id) |
Return an image given its id. More... | |
ImageList * | imageList (QString name) |
Return an imagelist given its name. More... | |
Shape * | shape (QString id) |
Return a shape given its id. More... | |
ShapeList * | shapeList (QString name) |
Return a shapelist given its name. More... | |
bool | isTemporaryProject () const |
Returns if the project is a temp project or not. More... | |
bool | isOpen () |
Accessor to determine whether a current project is Open. More... | |
bool | isClean () |
Accessor to determine whether the current project is Unsaved. More... | |
WorkOrder * | lastNotUndoneWorkOrder () |
Return the last not undone workorder. More... | |
const WorkOrder * | lastNotUndoneWorkOrder () const |
Return the last not undone workorder. More... | |
QString | name () const |
Get the project's GUI name. More... | |
QMutex * | workOrderMutex () |
This function returns a QMutex. More... | |
QMutex * | mutex () |
Return mutex used for Naif calls. More... | |
QString | projectRoot () const |
Get the top-level folder of the project. More... | |
QString | newProjectRoot () const |
Get the top-level folder of the new project. More... | |
void | setName (QString newName) |
Change the project's name (GUI only, doesn't affect location on disk). More... | |
QUndoStack * | undoStack () |
Returns the Projects stack of QUndoCommands. More... | |
void | waitForImageReaderFinished () |
Locks program if another spot in code is still running and called this function. More... | |
void | waitForShapeReaderFinished () |
Locks program if another spot in code is still running and called this function. More... | |
QList< WorkOrder * > | workOrderHistory () |
Get the entire list of work orders that have executed. More... | |
void | writeSettings (FileName projName) const |
void | setActiveControl (QString displayName) |
Set the Active Control (control network) More... | |
Control * | activeControl () |
Return the Active Control (control network) More... | |
void | setActiveImageList (QString displayName) |
Set the Active ImageList from the displayName which is saved in project.xml. More... | |
ImageList * | activeImageList () |
Returns the active ImageList. More... | |
QString | cnetRoot () const |
Get where control networks ought to be stored inside the project. More... | |
QList< ControlList * > | controls () |
Return controls in project. More... | |
ControlList * | controlList (QString name) |
Return controlslist matching name in Project. More... | |
QString | imageDataRoot () const |
Accessor for the root directory of the image data. More... | |
QList< ImageList * > | images () |
Return projects imagelist. More... | |
QString | shapeDataRoot () const |
Accessor for the root directory of the shape model data. More... | |
QList< ShapeList * > | shapes () |
Return the projects shapelist. More... | |
QString | targetBodyRoot () const |
Accessor for the root directory of the target body data. More... | |
TargetBodyList | targetBodies () |
Return TargetBodyList in Project. More... | |
QString | resultsRoot () const |
Accessor for the root directory of the results data. More... | |
QString | bundleSolutionInfoRoot () const |
Accessor for the root directory of the results data. More... | |
QList< BundleSolutionInfo * > | bundleSolutionInfo () |
Return BundleSolutionInfo objects in Project. More... | |
QString | templateRoot () const |
Accessor for the root directory of the template data. More... | |
QList< TemplateList * > | templates () |
Return all template FileNames. More... | |
QList< TemplateList * > | mapTemplates () |
Return map template FileNames. More... | |
QList< TemplateList * > | regTemplates () |
Return registration template FileNames. More... | |
void | removeTemplate (FileName file) |
void | deleteAllProjectFiles () |
Delete all of the files, that this project stores, from disk. More... | |
void | relocateProjectRoot (QString newRoot) |
This is called when the project is moved. More... | |
BundleSettings * | bundleSettings () |
Return BundleSettings objects in Project. More... | |
QProgressBar * | progress () |
void | removeImages (ImageList &imageList) |
bool | save () |
Generic save method to save the state of the project. More... | |
void | save (FileName projectPath, bool verifyPathDoesntExist=true) |
Project::save Saves the project state out to an XML file. More... | |
void | addToProject (WorkOrder *) |
This executes the WorkOrder and stores it in the project. More... | |
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. More... | |
static QStringList | shapes (QStringList) |
static QString | cnetRoot (QString projectRoot) |
Appends the root directory name 'cnets' to the project. More... | |
static QString | imageDataRoot (QString projectRoot) |
Appends the root directory name 'images' to the project . More... | |
static QString | shapeDataRoot (QString projectRoot) |
Appends the root directory name 'shapes' to the project . More... | |
static QString | targetBodyRoot (QString projectRoot) |
Appends the root directory name 'targets' to the project . More... | |
static QString | resultsRoot (QString projectRoot) |
Appends the root directory name 'results' to the project. More... | |
static QString | bundleSolutionInfoRoot (QString projectRoot) |
Appends the root directory name 'bundle' to the project results directory. More... | |
static QString | templateRoot (QString projectRoot) |
Appends the root directory name 'templates' to the project . More... | |
static int | maxRecentProjects () |
Return max number of recent projects to be displayed. More... | |
The main project for ipce.
Create a new Project.
This creates a project on disk at /tmp/username_appname_pid.
References _FILEINFO_, controlListAdded(), directory(), Isis::FileName::expanded(), 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)
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::SetActiveControlWorkOrder::isExecutable(), 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(), Isis::SetActiveImageListWorkOrder::isExecutable(), 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 control(), controlAdded(), 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 | ( | 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::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::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::ImportRegistrationTemplateWorkOrder::execute(), Isis::ImportMapTemplateWorkOrder::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::ImportRegistrationTemplateWorkOrder::execute(), Isis::ImportMapTemplateWorkOrder::execute(), and Isis::TemplateEditorWidget::saveAsText().
void Isis::Project::addToProject | ( | WorkOrder * | workOrder | ) |
This executes the WorkOrder and stores it in the project.
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 Isis::WorkOrder::createsCleanState(), Isis::WorkOrder::execute(), Isis::WorkOrder::isSavedToHistory(), Isis::WorkOrder::isUndoable(), lastNotUndoneWorkOrder(), Isis::WorkOrder::previous(), Isis::WorkOrder::redo(), Isis::WorkOrder::setNext(), Isis::WorkOrder::setPrevious(), Isis::WorkOrder::setupExecution(), 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().
|
static |
Appends the root directory name 'bundle' to the project results directory.
References projectRoot().
Referenced by Isis::BundleSolutionInfo::save().
QString Isis::Project::bundleSolutionInfoRoot | ( | ) | const |
Accessor for the root directory of the results data.
Referenced by addBundleSolutionInfoFolder(), open(), and 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::TargetBodyList::clear(), Isis::GuiCameraList::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().
|
static |
Appends the root directory name 'cnets' to the project.
References projectRoot().
Referenced by Isis::Control::copyToNewProjectRoot(), Isis::ControlList::deleteFromDisk(), Isis::Control::updateFileName(), and Isis::BundleSolutionInfo::updateFileName().
QString Isis::Project::cnetRoot | ( | ) | const |
Get where control networks ought to be stored inside the project.
This is a full path.
Referenced by addCnetFolder(), deleteAllProjectFiles(), and Isis::ControlList::save().
|
signal |
Emmited in save() when the project is being saved Connected to Directory so that ControlPointEditWidget can recolor the save net button.
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(), Isis::ExportControlNetWorkOrder::setupExecution(), 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(), Isis::ShapeList::deleteFromDisk(), Isis::ControlList::deleteFromDisk(), Isis::ImageList::deleteFromDisk(), 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::ControlHealthMonitorWorkOrder::execute(), Isis::TemplateEditViewWorkOrder::execute(), Isis::BundleObservationViewWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::execute(), Isis::TargetGetInfoWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::RemoveImagesWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::JigsawWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::TemplateEditViewWorkOrder::isExecutable(), Isis::SensorGetInfoWorkOrder::isExecutable(), Isis::TargetGetInfoWorkOrder::isExecutable(), Isis::JigsawSetupDialog::JigsawSetupDialog(), open(), Project(), setActiveControl(), setActiveImageList(), Isis::MatrixViewWorkOrder::setupExecution(), Isis::ImageFileListViewWorkOrder::setupExecution(), Isis::RemoveImagesWorkOrder::setupExecution(), Isis::CubeDnViewWorkOrder::setupExecution(), Isis::Footprint2DViewWorkOrder::setupExecution(), Isis::ImportRegistrationTemplateWorkOrder::undoExecution(), Isis::ImportMapTemplateWorkOrder::undoExecution(), Isis::MatrixViewWorkOrder::undoExecution(), Isis::CnetEditorViewWorkOrder::undoExecution(), Isis::ImportShapesWorkOrder::undoExecution(), Isis::ImportImagesWorkOrder::undoExecution(), 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().
|
static |
Appends the root directory name 'images' to the project .
References projectRoot().
Referenced by Isis::ImageList::deleteFromDisk(), and Isis::Image::updateFileName().
QString Isis::Project::imageDataRoot | ( | ) | const |
Accessor for the root directory of the image data.
Referenced by addImageFolder(), Isis::Image::copyToNewProjectRoot(), deleteAllProjectFiles(), and Isis::ImageList::save().
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.
Referenced by Isis::ImportImagesWorkOrder::setupExecution().
WorkOrder * Isis::Project::lastNotUndoneWorkOrder | ( | ) |
Return the last not undone workorder.
References Isis::WorkOrder::isUndoing(), Isis::WorkOrder::isUndone(), and Isis::WorkOrder::previous().
Referenced by addToProject().
const WorkOrder * Isis::Project::lastNotUndoneWorkOrder | ( | ) | const |
Return the last not undone workorder.
References Isis::WorkOrder::isUndoing(), Isis::WorkOrder::isUndone(), and Isis::WorkOrder::previous().
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::ControlList::save(), Isis::ImageList::save(), and Isis::BundleSolutionInfo::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(), Isis::IException::toString(), and warn().
Referenced by Isis::SaveProjectAsWorkOrder::execute(), Isis::OpenProjectWorkOrder::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::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), imageDataRoot(), resultsRoot(), Isis::ControlList::save(), Isis::ImageList::save(), Isis::BundleSolutionInfo::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 | ) |
|
static |
Appends the root directory name 'results' to the project.
References projectRoot().
QString Isis::Project::resultsRoot | ( | ) | const |
Accessor for the root directory of the results data.
Referenced by deleteAllProjectFiles().
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(), and Isis::Control::write().
Referenced by Isis::SaveProjectAsWorkOrder::execute(), 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.
{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 } }
The figure below represents a flow chart for XML code generation which starts with a call to this function:
References _FILEINFO_, Isis::IException::Io, Isis::FileName::name(), Isis::FileName::original(), projectSaved(), Isis::ReadWrite, save(), and Isis::FileName::toString().
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::ImportRegistrationTemplateWorkOrder::execute(), Isis::ImportMapTemplateWorkOrder::execute(), Isis::RenameProjectWorkOrder::execute(), Isis::BundleObservationViewWorkOrder::execute(), Isis::CloseProjectWorkOrder::execute(), Isis::MatrixViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::SaveProjectAsWorkOrder::execute(), Isis::CnetEditorViewWorkOrder::execute(), Isis::OpenProjectWorkOrder::execute(), Isis::RemoveImagesWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImportShapesWorkOrder::execute(), Isis::ImportImagesWorkOrder::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().
|
static |
Appends the root directory name 'shapes' to the project .
References projectRoot().
Referenced by Isis::ShapeList::deleteFromDisk(), and Isis::Shape::updateFileName().
QString Isis::Project::shapeDataRoot | ( | ) | const |
Accessor for the root directory of the shape model data.
Referenced by addShapeFolder(), Isis::Shape::copyToNewProjectRoot(), deleteAllProjectFiles(), and Isis::ShapeList::save().
ShapeList * Isis::Project::shapeList | ( | QString | name | ) |
Return a shapelist given its name.
QString | name |
References Isis::ShapeList::name(), and 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().
|
static |
Appends the root directory name 'targets' to the project .
References projectRoot().
QString Isis::Project::targetBodyRoot | ( | ) | const |
Accessor for the root directory of the target body data.
|
signal |
Emitted when new TargetBody objects added to project receivers: Directory.
Referenced by addImages().
|
static |
Appends the root directory name 'templates' to the project .
References projectRoot().
Referenced by Isis::TemplateList::deleteFromDisk(), and Isis::Template::updateFileName().
QString Isis::Project::templateRoot | ( | ) | const |
Accessor for the root directory of the template data.
Referenced by addTemplateFolder(), deleteAllProjectFiles(), and Isis::TemplateList::save().
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, |
Data | relevantData | ||
) |
References directory(), and Isis::Directory::showWarning().
Referenced by deleteAllProjectFiles(), open(), Isis::ExportImagesWorkOrder::postExecution(), Isis::ExportControlNetWorkOrder::postExecution(), Isis::ImportShapesWorkOrder::postExecution(), Isis::ImportControlNetWorkOrder::postExecution(), Isis::ImportImagesWorkOrder::postExecution(), and Isis::ImportImagesWorkOrder::setupExecution().
void Isis::Project::warn | ( | QString | text | ) |
References directory(), and Isis::Directory::showWarning().
|
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 |