This represents an ISIS control net in a project-based GUI interface. More...
#include <Control.h>
Inherits QObject.
Public Slots | |
void | updateFileName (Project *) |
Change the on-disk file name for this control to be where the control ought to be in the given project. More... | |
Public Member Functions | |
Control (QString cnetFileName, QObject *parent=0) | |
Create a Control from control net located on disk. More... | |
Control (ControlNet *controlNet, QString cnetFileName, QObject *parent=0) | |
Create a Control from a control network that has already been created and read from disk. More... | |
Control (FileName cnetFolder, XmlStackedHandlerReader *xmlReader, QObject *parent=0) | |
Construct this control from XML. More... | |
~Control () | |
Destroys Control object. More... | |
ControlNet * | controlNet () |
Open and return a pointer to the ControlNet for this Control. More... | |
void | openControlNet () |
Sets the ControlNet from the control net file name provided in the constructor. More... | |
void | closeControlNet () |
Cleans up the ControlNet pointer. More... | |
ControlDisplayProperties * | displayProperties () |
Access a pointer to the display properties for the control network. More... | |
const ControlDisplayProperties * | displayProperties () const |
Access a const pointer to the display properties for the control network. More... | |
QString | fileName () const |
Access the name of the control network file associated with this Control. More... | |
QString | id () const |
Access the unique ID associated with this Control. More... | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Method to write this Control object's member data to an XML stream. More... | |
void | copyToNewProjectRoot (const Project *project, FileName newProjectRoot) |
Copies the files of the given Project to the given location. More... | |
void | deleteFromDisk () |
Delete the control net from disk. More... | |
This represents an ISIS control net in a project-based GUI interface.
This encapsulates ideas about a control net such as it's filename and display properties.
|
explicit |
Create a Control from control net located on disk.
cNetFileName | The name of the control net on disk |
parent | The Qt-relationship parent |
References openControlNet().
|
explicit |
Create a Control from a control network that has already been created and read from disk.
controlNet | The actual control network |
cnetFileName | The name of the control net on disk |
parent | The Qt-relationship parent |
References controlNet().
Isis::Control::Control | ( | FileName | cnetFolder, |
XmlStackedHandlerReader * | xmlReader, | ||
QObject * | parent = 0 |
||
) |
Construct this control from XML.
cnetFolder | Location of control xml |
xmlReader | An XML reader that's up to an <control> tag. |
parent | The Qt-relationship parent |
References Isis::XmlStackedHandlerReader::pushContentHandler().
Isis::Control::~Control | ( | ) |
Destroys Control object.
void Isis::Control::closeControlNet | ( | ) |
Cleans up the ControlNet pointer.
This method should be called once there is no more need for this network because the OS will limit how many of these can be open.
Referenced by updateFileName().
ControlNet * Isis::Control::controlNet | ( | ) |
Open and return a pointer to the ControlNet for this Control.
References openControlNet().
Referenced by Isis::Directory::addCnetEditorView(), Isis::Directory::addControlPointEditView(), Isis::ExportControlNetWorkOrder::asyncRedo(), Control(), copyToNewProjectRoot(), Isis::CubeDnView::CubeDnView(), Isis::SetActiveControlWorkOrder::execute(), and Isis::ControlPointEditWidget::setControl().
Copies the files of the given Project to the given location.
project | A pointer to the Project. |
newProjectRoot | The name of the new root directory where the project will be copied. |
References Isis::Project::cnetRoot(), controlNet(), Isis::FileName::dir(), Isis::FileName::name(), Isis::Project::projectRoot(), Isis::FileName::toString(), and Isis::ControlNet::Write().
void Isis::Control::deleteFromDisk | ( | ) |
Delete the control net from disk.
The control net will no longer be accessible until you call updateFileName().
IException::Io | "Could not remove file." |
References _FILEINFO_, and Isis::IException::Io.
Referenced by Isis::ControlList::deleteFromDisk().
ControlDisplayProperties * Isis::Control::displayProperties | ( | ) |
Access a pointer to the display properties for the control network.
Referenced by Isis::Directory::addCnetEditorView(), Isis::ExportControlNetWorkOrder::execute(), and Isis::JigsawSetupDialog::JigsawSetupDialog().
const ControlDisplayProperties * Isis::Control::displayProperties | ( | ) | const |
Access a const pointer to the display properties for the control network.
QString Isis::Control::fileName | ( | ) | const |
Access the name of the control network file associated with this Control.
Referenced by Isis::Project::addControl(), Isis::Directory::addControlPointEditView(), Isis::BundleAdjust::BundleAdjust(), Isis::ExportControlNetWorkOrder::execute(), Isis::ControlPointEditWidget::setControl(), and Isis::ProjectItem::setControl().
QString Isis::Control::id | ( | ) | const |
Access the unique ID associated with this Control.
Referenced by Isis::Project::addControl(), and Isis::ExportControlNetWorkOrder::execute().
void Isis::Control::openControlNet | ( | ) |
Sets the ControlNet from the control net file name provided in the constructor.
IException::Programmer | "Error opening control net." |
References _FILEINFO_, and Isis::IException::Programmer.
Referenced by Control(), and controlNet().
void Isis::Control::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot | ||
) | const |
Method to write this Control object's member data to an XML stream.
stream | The stream to which the Control will be saved. |
project | The Project to which this Control will be added. |
newProjectRoot | The location of the project root directory. |
References Isis::ControlDisplayProperties::save().
Referenced by Isis::ControlList::save().
|
slot |
Change the on-disk file name for this control to be where the control ought to be in the given project.
project | The project that this control is stored in |
References closeControlNet(), Isis::Project::cnetRoot(), Isis::FileName::dir(), and Isis::FileName::name().
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:35:10 |