Isis 3.0 Object Programmers' Reference |
Home |
Adapted from ImageList. More...
#include <ControlList.h>
Classes | |
class | CopyControlDataFunctor |
This functor is used for copying the control nets between two projects quickly. More... | |
class | XmlHandler |
Signals | |
void | countChanged (int newCount) |
void | deletingList (ControlList *list) |
Public Member Functions | |
ControlList (QString name, QString path, QObject *parent=NULL) | |
Create an control list from a control list name and path (does not read Controls). | |
ControlList (QObject *parent=NULL) | |
Create a blank control list. | |
ControlList (QList< Control * >, QObject *parent=NULL) | |
Create an control list from a list of controls. | |
ControlList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL) | |
Create an control list from XML. | |
ControlList (QStringList &) | |
Create an control list from a list of control net file names. | |
ControlList (const ControlList &) | |
Copy constructor. | |
~ControlList () | |
Destructor. | |
void | append (Control *const &value) |
void | append (const QList< Control * > &value) |
void | clear () |
iterator | erase (iterator pos) |
iterator | erase (iterator begin, iterator end) |
void | insert (int i, Control *const &value) |
iterator | insert (iterator before, Control *const &value) |
void | prepend (Control *const &value) |
void | push_back (Control *const &value) |
void | push_front (Control *const &value) |
int | removeAll (Control *const &value) |
void | removeAt (int i) |
void | removeFirst () |
void | removeLast () |
bool | removeOne (Control *const &value) |
void | swap (QList< Control * > &other) |
Control * | takeAt (int i) |
Control * | takeFirst () |
Control * | takeLast () |
ControlList & | operator+= (const QList< Control * > &other) |
ControlList & | operator+= (Control *const &other) |
ControlList & | operator<< (const QList< Control * > &other) |
ControlList & | operator<< (Control *const &other) |
ControlList & | operator= (const QList< Control * > &rhs) |
ControlList & | operator= (const ControlList &rhs) |
Assignment operator. | |
QList< QAction * > | supportedActions (Project *project=NULL) |
bool | allSupport (ControlDisplayProperties::Property prop) |
void | setName (QString newName) |
Set the human-readable name of this control list. | |
void | setPath (QString newPath) |
Set the relative path (from the project root) to this control list's folder. | |
QString | name () const |
Get the human-readable name of this control list. | |
QString | path () const |
Get the path to these controls in the control list (relative to project root). | |
void | deleteFromDisk (Project *project) |
Delete all of the contained Controls from disk (see Control::deleteFromDisk()) | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Convert this control list into XML format for saving/restoring capabilities. | |
Private Attributes | |
QString | m_name |
QString | m_path |
This stores the directory name that contains the controls in this control list. | |
Adapted from ImageList.
Definition at line 29 of file ControlList.h.
Isis::ControlList::ControlList | ( | QString | name, |
QString | path, | ||
QObject * | parent = NULL |
||
) |
Create an control list from a control list name and path (does not read Controls).
name | The ControlList's name (i.e. import1, import2, ...) |
path | The ControlList's folder name (i.e. import1, import2, ...) |
parent | The Qt-relationship parent |
Definition at line 52 of file ControlList.cpp.
|
explicit |
Create a blank control list.
parent | The Qt-relationship parent |
Definition at line 63 of file ControlList.cpp.
Create an control list from a list of controls.
controls | The list of controls |
parent | The Qt-relationship parent |
Definition at line 73 of file ControlList.cpp.
References append().
|
explicit |
Create an control list from XML.
project | The project with the control list |
xmlReader | The XML reader currently at an <controlList> tag. |
parent | The Qt-relationship parent |
Definition at line 85 of file ControlList.cpp.
|
explicit |
Create an control list from a list of control net file names.
This is slow (serial) and not recommended.
Definition at line 107 of file ControlList.cpp.
References append().
Isis::ControlList::ControlList | ( | const ControlList & | other | ) |
Copy constructor.
other | The ControlList to copy |
Definition at line 96 of file ControlList.cpp.
References m_path.
Isis::ControlList::~ControlList | ( | ) |
Destructor.
This does not free the Controls from memory.
Definition at line 122 of file ControlList.cpp.
void Isis::ControlList::append | ( | Control *const & | value | ) |
Definition at line 130 of file ControlList.cpp.
Referenced by ControlList().
Definition at line 139 of file ControlList.cpp.
void Isis::ControlList::clear | ( | ) |
Definition at line 148 of file ControlList.cpp.
void Isis::ControlList::deleteFromDisk | ( | Project * | project | ) |
Delete all of the contained Controls from disk (see Control::deleteFromDisk())
Definition at line 451 of file ControlList.cpp.
References Isis::Project::cnetRoot(), Isis::Control::deleteFromDisk(), and m_path.
Referenced by Isis::ImportControlNetWorkOrder::syncUndo().
Definition at line 160 of file ControlList.cpp.
Definition at line 170 of file ControlList.cpp.
void Isis::ControlList::insert | ( | int | i, |
Control *const & | value | ||
) |
Definition at line 180 of file ControlList.cpp.
Definition at line 190 of file ControlList.cpp.
QString Isis::ControlList::name | ( | ) | const |
Get the human-readable name of this control list.
Definition at line 432 of file ControlList.cpp.
Referenced by Isis::ControlGroupTreeWidgetItem::ControlGroupTreeWidgetItem(), ControlList(), Isis::ExportControlNetWorkOrder::execute(), Isis::MosaicControlNetTool::openControlNet(), and Isis::ControlList::XmlHandler::startElement().
ControlList & Isis::ControlList::operator+= | ( | const QList< Control * > & | other | ) |
Definition at line 324 of file ControlList.cpp.
ControlList & Isis::ControlList::operator+= | ( | Control *const & | other | ) |
Definition at line 338 of file ControlList.cpp.
ControlList & Isis::ControlList::operator<< | ( | const QList< Control * > & | other | ) |
Definition at line 348 of file ControlList.cpp.
References operator<<().
ControlList & Isis::ControlList::operator<< | ( | Control *const & | other | ) |
Definition at line 362 of file ControlList.cpp.
References operator<<().
ControlList & Isis::ControlList::operator= | ( | const QList< Control * > & | rhs | ) |
Definition at line 372 of file ControlList.cpp.
ControlList & Isis::ControlList::operator= | ( | const ControlList & | rhs | ) |
Assignment operator.
rhs | The right hand side of the '=' operator |
Definition at line 390 of file ControlList.cpp.
References m_path.
QString Isis::ControlList::path | ( | ) | const |
Get the path to these controls in the control list (relative to project root).
This only applies to a control list from the project.
Definition at line 443 of file ControlList.cpp.
References m_path.
Referenced by ControlList(), and Isis::ControlList::XmlHandler::startElement().
void Isis::ControlList::prepend | ( | Control *const & | value | ) |
Definition at line 200 of file ControlList.cpp.
void Isis::ControlList::push_back | ( | Control *const & | value | ) |
Definition at line 209 of file ControlList.cpp.
void Isis::ControlList::push_front | ( | Control *const & | value | ) |
Definition at line 218 of file ControlList.cpp.
int Isis::ControlList::removeAll | ( | Control *const & | value | ) |
Definition at line 227 of file ControlList.cpp.
void Isis::ControlList::removeAt | ( | int | i | ) |
Definition at line 241 of file ControlList.cpp.
Referenced by Isis::Project::controlClosed().
void Isis::ControlList::removeFirst | ( | ) |
Definition at line 250 of file ControlList.cpp.
void Isis::ControlList::removeLast | ( | ) |
Definition at line 259 of file ControlList.cpp.
bool Isis::ControlList::removeOne | ( | Control *const & | value | ) |
Definition at line 268 of file ControlList.cpp.
void Isis::ControlList::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot | ||
) | const |
Convert this control list into XML format for saving/restoring capabilities.
This writes:
<controlList name="..." path="...">
to the given xml stream, and creates an 'controls.xml' inside the folder with the controls. Inside the controlNetworks.xml, this writes:
<controls> ... </controls>
Definition at line 481 of file ControlList.cpp.
References _FILEINFO_, Isis::Project::cnetRoot(), Isis::IException::Io, m_path, and Isis::FileName::path().
void Isis::ControlList::setName | ( | QString | newName | ) |
Set the human-readable name of this control list.
This is really only useful for project control lists (not anonymous temporary ones).
newName | The name to give this control list |
Definition at line 411 of file ControlList.cpp.
void Isis::ControlList::setPath | ( | QString | newPath | ) |
Set the relative path (from the project root) to this control list's folder.
This is really only useful for project control lists (not anonymous temporary ones).
newPath | The path to the controls in this control list |
Definition at line 422 of file ControlList.cpp.
References m_path.
Definition at line 282 of file ControlList.cpp.
Control * Isis::ControlList::takeAt | ( | int | i | ) |
Definition at line 294 of file ControlList.cpp.
Control * Isis::ControlList::takeFirst | ( | ) |
Definition at line 304 of file ControlList.cpp.
Control * Isis::ControlList::takeLast | ( | ) |
Definition at line 314 of file ControlList.cpp.
|
private |
This stores the directory name that contains the controls in this control list.
For example: import1 or import2
This path is relative to Project::controlNetRoot()
Definition at line 162 of file ControlList.h.
Referenced by ControlList(), deleteFromDisk(), operator=(), path(), save(), and setPath().