The main project for cnetsuite. More...
#include <Project.h>
Inherits QObject.
Public Slots | |
void | open (QString) |
Open the project at the given path. 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 | imagesAdded (ImageList *images) |
Emitted when new images are available. 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: CNetSuiteMainWindow, Directory, HistoryTreeWidget. More... | |
void | projectRelocated (Project *) |
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody. More... | |
void | workOrderStarting (WorkOrder *) |
void | workOrderFinished (WorkOrder *) |
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... | |
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) |
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) |
void | addBundleSolutionInfo (BundleSolutionInfo *bundleSolutionInfo) |
Add the given BundleSolutionInfo to the current project. More... | |
void | loadBundleSolutionInfo (BundleSolutionInfo *bundleSolutionInfo) |
Control * | control (QString id) |
Directory * | directory () const |
Returns the directory associated with this Project. More... | |
Image * | image (QString id) |
ImageList * | imageList (QString name) |
Shape * | shape (QString id) |
ShapeList * | shapeList (QString name) |
bool | isTemporaryProject () const |
WorkOrder * | lastNotUndoneWorkOrder () |
const WorkOrder * | lastNotUndoneWorkOrder () const |
QString | name () const |
Get the project's GUI name. More... | |
QMutex * | mutex () |
Return mutex used for Naif calls. More... | |
QString | projectRoot () const |
Get the top-level folder of the project. More... | |
void | setName (QString newName) |
Change the project's name (GUI only, doesn't affect location on disk). More... | |
QUndoStack * | undoStack () |
void | waitForImageReaderFinished () |
void | waitForShapeReaderFinished () |
QList< WorkOrder * > | workOrderHistory () |
Get the entire list of work orders that have executed. More... | |
void | setActiveControl (Control *) |
Set the Active Control (control network) More... | |
Control * | activeControl () |
Return the Active Control (control network) More... | |
void | setActiveImageList (ImageList *) |
Set the Active ImageList. 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 () |
ControlList * | controlList (QString name) |
QString | imageDataRoot () const |
Accessor for the root directory of the image data. More... | |
QList< ImageList * > | images () |
QString | shapeDataRoot () const |
Accessor for the root directory of the shape model data. More... | |
QList< ShapeList * > | shapes () |
QString | targetBodyRoot () const |
Accessor for the root directory of the target body data. More... | |
TargetBodyList | targetBodies () |
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 () |
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 () |
QProgressBar * | progress () |
void | removeImages (ImageList &imageList) |
void | save () |
void | save (FileName newPath, bool verifyPathDoesntExist=true) |
void | addToProject (WorkOrder *) |
Run the work order 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... | |
The main project for cnetsuite.
Create a new Project.
This creates a project on disk at /tmp/username_appname_pid.
References _FILEINFO_, directory(), Isis::FileName::expanded(), imagesAdded(), Isis::IException::Programmer, 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(), deleteAllProjectFiles(), image(), imageList(), Isis::WorkOrder::modifiesDiskState(), 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.
Referenced by Isis::Directory::addControlPointEditView(), Isis::CubeDnView::CubeDnView(), Isis::SetActiveControlWorkOrder::execute(), and Isis::SetActiveControlWorkOrder::isExecutable().
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.
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 addBundleSolutionInfoFolder(), Isis::BundleSolutionInfo::bundleSettings(), Isis::BundleSolutionInfo::createH5File(), loadBundleSolutionInfo(), projectRelocated(), and Isis::BundleSolutionInfo::runTime().
Referenced by Isis::JigsawDialog::bundleFinished().
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.
Referenced by addBundleSolutionInfo().
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::syncRedo().
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.
Referenced by Isis::ImportImagesWorkOrder::postSyncRedo().
void Isis::Project::addImages | ( | ImageList | newImages | ) |
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.
Referenced by Isis::ImportShapesWorkOrder::postSyncRedo().
void Isis::Project::addShapes | ( | ShapeList | newShapes | ) |
void Isis::Project::addToProject | ( | WorkOrder * | workOrder | ) |
Run the work order and stores it in the project.
If WorkOrder::execute() returns true then the work order's redo is called. This takes ownership of workOrder.
The order of events is: 1) WorkOrder::execute() 2) emit workOrderStarting() 3) WorkOrder::redo() [optional - see WorkOrder]
workOrder | The work order to be executed. This work order must not already be in the project. |
References Isis::WorkOrder::createsCleanState(), Isis::WorkOrder::execute(), lastNotUndoneWorkOrder(), Isis::WorkOrder::previous(), Isis::WorkOrder::setNext(), Isis::WorkOrder::setPrevious(), workOrderFinished(), and workOrderStarting().
Referenced by Isis::WorkOrder::addCloneToProject().
|
inline |
QList< BundleSolutionInfo * > Isis::Project::bundleSolutionInfo | ( | ) |
|
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.
QString Isis::Project::bundleSolutionInfoRoot | ( | ) | const |
Accessor for the root directory of the results data.
Referenced by addBundleSolutionInfoFolder(), and open().
|
static |
Appends the root directory name 'cnets' to the project.
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().
Control * Isis::Project::control | ( | QString | id | ) |
Referenced by addControl(), Isis::ExportControlNetWorkOrder::asyncRedo(), setActiveControl(), and ~Project().
|
signal |
Emitted when new Control added to Project receivers: ProjectTreeWidget.
Referenced by addControl().
ControlList * Isis::Project::controlList | ( | QString | name | ) |
References Isis::ControlList::name(), and name().
Referenced by ~Project().
|
signal |
apparently not used?
Emitted when new ControlList added to Project receivers: ProjectTreeWidget
QList< ControlList * > Isis::Project::controls | ( | ) |
void Isis::Project::deleteAllProjectFiles | ( | ) |
Delete all of the files, that this project stores, from disk.
References cnetRoot(), Isis::ImageList::deleteFromDisk(), imageDataRoot(), resultsRoot(), shapeDataRoot(), and warn().
Referenced by save(), and ~Project().
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 Isis::WorkOrder::directory(), Isis::MatrixViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::CubeDnViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::SensorGetInfoWorkOrder::isExecutable(), Isis::TargetGetInfoWorkOrder::isExecutable(), open(), Project(), Isis::CnetEditorViewWorkOrder::syncRedo(), Isis::RemoveImagesWorkOrder::syncRedo(), Isis::MatrixViewWorkOrder::syncRedo(), Isis::ImageFileListViewWorkOrder::syncRedo(), Isis::SensorGetInfoWorkOrder::syncRedo(), Isis::TargetGetInfoWorkOrder::syncRedo(), Isis::CubeDnViewWorkOrder::syncRedo(), Isis::Footprint2DViewWorkOrder::syncRedo(), Isis::CnetEditorViewWorkOrder::syncUndo(), Isis::MatrixViewWorkOrder::syncUndo(), Isis::ImageFileListViewWorkOrder::syncUndo(), Isis::Footprint2DViewWorkOrder::syncUndo(), and warn().
|
signal |
Image * Isis::Project::image | ( | QString | id | ) |
Referenced by Isis::WorkOrder::imageList(), removeImages(), and ~Project().
|
static |
Appends the root directory name 'images' to the project .
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 | ) |
References Isis::ImageList::name(), and name().
Referenced by Isis::ExportImagesWorkOrder::asyncRedo(), setActiveImageList(), and ~Project().
|
static |
Verify that the input fileNames are image files.
fileNames | names of files on disk |
Referenced by Isis::ImportImagesWorkOrder::asyncUndo(), Isis::ImportImagesWorkOrder::postSyncUndo(), and Isis::ProjectItem::ProjectItem().
|
signal |
bool Isis::Project::isTemporaryProject | ( | ) | const |
Referenced by Isis::ImportImagesWorkOrder::execute().
WorkOrder * Isis::Project::lastNotUndoneWorkOrder | ( | ) |
References Isis::WorkOrder::isUndoing(), Isis::WorkOrder::isUndone(), and Isis::WorkOrder::previous().
Referenced by addToProject().
const WorkOrder * Isis::Project::lastNotUndoneWorkOrder | ( | ) | const |
void Isis::Project::loadBundleSolutionInfo | ( | BundleSolutionInfo * | bundleSolutionInfo | ) |
References bundleSolutionInfo(), bundleSolutionInfoAdded(), and Isis::BundleSolutionInfo::id().
Referenced by addBundleSolutionInfo(), and open().
QMutex * Isis::Project::mutex | ( | ) |
Return mutex used for Naif calls.
This method is thread-safe.
QString Isis::Project::name | ( | ) | const |
Get the project's GUI name.
Referenced by controlList(), Isis::RenameProjectWorkOrder::execute(), imageList(), Isis::RenameProjectWorkOrder::RenameProjectWorkOrder(), Isis::ProjectItem::setProject(), and shapeList().
|
signal |
Emitted when project name is changed receivers: ProjectTreeWidget.
Referenced by setName().
|
slot |
Open the project at the given path.
The | path to the project folder |
References _FILEINFO_, bundleSolutionInfoRoot(), directory(), Isis::FileName::expanded(), Isis::IException::Io, loadBundleSolutionInfo(), Isis::FileName::original(), projectLoaded(), Isis::XmlStackedHandlerReader::pushContentHandler(), Isis::Directory::showWarning(), Isis::FileName::toString(), Isis::IException::toString(), and warn().
Referenced by Isis::OpenProjectWorkOrder::execute(), and Isis::OpenRecentProjectWorkOrder::execute().
QProgressBar * Isis::Project::progress | ( | ) |
|
signal |
Emitted when project loaded receivers: CNetSuiteMainWindow, Directory, HistoryTreeWidget.
Referenced by open().
|
signal |
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image, TargetBody.
Referenced by addBundleSolutionInfo(), addControl(), 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 Isis::Control::copyToNewProjectRoot(), Isis::Shape::copyToNewProjectRoot(), Isis::Image::copyToNewProjectRoot(), and Isis::Directory::updateRecentProjects().
void Isis::Project::relocateProjectRoot | ( | QString | newProjectRoot | ) |
This is called when the project is moved.
newProjectRoot | The new root directory for the project. |
References projectRelocated().
Referenced by save().
|
static |
Appends the root directory name 'results' to the project.
QString Isis::Project::resultsRoot | ( | ) | const |
Accessor for the root directory of the results data.
Referenced by deleteAllProjectFiles().
void Isis::Project::save | ( | ) |
References deleteAllProjectFiles(), and relocateProjectRoot().
Referenced by Isis::SaveProjectAsWorkOrder::execute(), Isis::SaveProjectWorkOrder::execute(), and save().
void Isis::Project::save | ( | FileName | newPath, |
bool | verifyPathDoesntExist = true |
||
) |
References _FILEINFO_, Isis::IException::Io, Isis::FileName::original(), Isis::ReadWrite, save(), and Isis::FileName::toString().
void Isis::Project::setActiveControl | ( | Control * | control | ) |
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 control().
Referenced by Isis::SetActiveControlWorkOrder::execute().
void Isis::Project::setActiveImageList | ( | ImageList * | imageList | ) |
Set the Active ImageList.
Set the active ImageList for views which need to operate on the same list of images, ie. Footprint2dView, CubeDnView, ControlPointEditView.
References imageList().
Referenced by Isis::SetActiveImageListWorkOrder::execute().
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::syncRedo(), and Isis::RenameProjectWorkOrder::syncUndo().
Shape * Isis::Project::shape | ( | QString | id | ) |
Referenced by Isis::WorkOrder::shapeList(), and ~Project().
|
static |
Appends the root directory name 'shapes' to the project .
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 | ) |
References Isis::ShapeList::name(), and name().
Referenced by ~Project().
|
static |
|
signal |
TargetBodyList Isis::Project::targetBodies | ( | ) |
Referenced by Isis::JigsawSetupDialog::JigsawSetupDialog().
|
static |
Appends the root directory name 'targets' to the project .
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.
QUndoStack * Isis::Project::undoStack | ( | ) |
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 | ( | ) |
Referenced by Isis::ImportImagesWorkOrder::asyncUndo().
void Isis::Project::waitForShapeReaderFinished | ( | ) |
Referenced by Isis::ImportShapesWorkOrder::asyncUndo().
void Isis::Project::warn | ( | QString | text, |
Data | relevantData | ||
) |
void Isis::Project::warn | ( | QString | text | ) |
References directory(), and Isis::Directory::showWarning().
|
signal |
Referenced by addToProject().
Get the entire list of work orders that have executed.
|
signal |
Referenced by addToProject().
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the ISIS Support Center File Modified: 07/12/2023 23:43:32 |