![]() |
Isis 3 Developer Reference
|
Maintains a list of Controls so that control nets can easily be copied from one Project to another, saved to disk, or deleted from disk. More...
#include <ControlList.h>


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). More... | |
| ControlList (QObject *parent=NULL) | |
| Create a blank control list. More... | |
| ControlList (QList< Control *>, QObject *parent=NULL) | |
| Create an control list from a list of controls. More... | |
| ControlList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL) | |
| Create an control list from XML. More... | |
| ControlList (QStringList &) | |
| Create an control list from a list of control net file names. More... | |
| ControlList (const ControlList &) | |
| Copy constructor. More... | |
| ~ControlList () | |
| Destructor. More... | |
| void | append (Control *const &value) |
| Appends a control pointer to the control list. More... | |
| void | append (const QList< Control *> &value) |
| Appends a list of control pointers to the control list. More... | |
| void | clear () |
| Clears the control list. More... | |
| iterator | erase (iterator pos) |
| Erases a control pointer from the control list at the specified position. More... | |
| iterator | erase (iterator begin, iterator end) |
| Erases all control pointers starting at "begin" up to (but not including) end. More... | |
| void | insert (int i, Control *const &value) |
| Inserts a control pointer at the specified position in the control list. More... | |
| iterator | insert (iterator before, Control *const &value) |
| Inserts a control pointer before the specified iterator position. More... | |
| void | prepend (Control *const &value) |
| Prepends a control pointer to the control list. More... | |
| void | push_back (Control *const &value) |
| Equivalent to append(value) More... | |
| void | push_front (Control *const &value) |
| Equivalent to prepend(value) More... | |
| int | removeAll (Control *const &value) |
| Removes all occurences of the control pointer in the control list. More... | |
| void | removeAt (int i) |
| Removes the control pointer at the specified index. More... | |
| void | removeFirst () |
| Removes the first control pointer from the control list. More... | |
| void | removeLast () |
| Removes the last control pointer from the control list. More... | |
| bool | removeOne (Control *const &value) |
| Removes the first occurence of the control pointer from the control list. More... | |
| void | swap (QList< Control *> &other) |
| Swaps this control list's control pointers with the other list of control pointers. More... | |
| Control * | takeAt (int i) |
| Remove the control pointer at the specified index and returns it. More... | |
| Control * | takeFirst () |
| Removes the first control pointer from the control list and returns it. More... | |
| Control * | takeLast () |
| Removes the last control pointer from the control list and returns it. More... | |
| ControlList & | operator+= (const QList< Control *> &other) |
| Appends control pointers from the other list to this control list. More... | |
| ControlList & | operator+= (Control *const &other) |
| Appends a control pointer to this control list. More... | |
| ControlList & | operator<< (const QList< Control *> &other) |
| Appends a list of other control pointers to this control list. More... | |
| ControlList & | operator<< (Control *const &other) |
| Appends a control pointer to this control list. More... | |
| ControlList & | operator= (const QList< Control *> &rhs) |
| Assigns another list of control pointers to this control list. More... | |
| ControlList & | operator= (const ControlList &rhs) |
| Assignment operator. More... | |
| QList< QAction * > | supportedActions (Project *project=NULL) |
| bool | allSupport (ControlDisplayProperties::Property prop) |
| void | setName (QString newName) |
| Set the human-readable name of this control list. More... | |
| void | setPath (QString newPath) |
| Set the relative path (from the project root) to this control list's folder. More... | |
| QString | name () const |
| Get the human-readable name of this control list. More... | |
| QString | path () const |
| Get the path to these controls in the control list (relative to project root). More... | |
| void | deleteFromDisk (Project *project) |
| Delete all of the contained Controls from disk. More... | |
| void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
| Convert this control list into XML format for saving/restoring capabilities. More... | |
Maintains a list of Controls so that control nets can easily be copied from one Project to another, saved to disk, or deleted from disk.
Overrides several common QList methods for managing a list of Controls as well. Adapted from ImageList
| 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 |
|
explicit |
Create a blank control list.
| parent | The Qt-relationship parent |
Create an control list from a list of controls.
| controls | The list of controls |
| parent | The Qt-relationship parent |
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 |
References Isis::XmlStackedHandlerReader::pushContentHandler().
|
explicit |
| Isis::ControlList::ControlList | ( | const ControlList & | other | ) |
Copy constructor.
| other | The ControlList to copy |
| Isis::ControlList::~ControlList | ( | ) |
| bool Isis::ControlList::allSupport | ( | ControlDisplayProperties::Property | prop | ) |
| void Isis::ControlList::append | ( | Control *const & | value | ) |
Appends a control pointer to the control list.
| value | The control pointer to append |
References countChanged().
Referenced by ControlList().
Appends a list of control pointers to the control list.
| value | The list of control pointers to append |
References countChanged().
| void Isis::ControlList::clear | ( | ) |
|
signal |
Referenced by append(), clear(), erase(), insert(), operator+=(), operator<<(), operator=(), prepend(), push_back(), push_front(), removeAll(), removeAt(), removeFirst(), removeLast(), removeOne(), swap(), takeAt(), takeFirst(), and takeLast().
| void Isis::ControlList::deleteFromDisk | ( | Project * | project | ) |
Delete all of the contained Controls from disk.
| project | Project to delete controls from |
References Isis::Project::cnetRoot(), and Isis::Control::deleteFromDisk().
Referenced by Isis::Project::deleteAllProjectFiles().
|
signal |
Referenced by ~ControlList().
Erases a control pointer from the control list at the specified position.
| pos | The position to erase at |
References countChanged().
Erases all control pointers starting at "begin" up to (but not including) end.
| begin | Iterator to the first control pointer to erase from the list |
| end | Iterator to the end control pointer (which will not be erased) |
References countChanged().
| void Isis::ControlList::insert | ( | int | i, |
| Control *const & | value | ||
| ) |
Inserts a control pointer at the specified position in the control list.
| i | The index to insert at |
| value | The control pointer to insert |
References countChanged().
Inserts a control pointer before the specified iterator position.
| before | Iterator to the item to insert the control pointer before |
| value | The control pointer to insert |
References countChanged().
| QString Isis::ControlList::name | ( | ) | const |
Get the human-readable name of this control list.
Referenced by ControlList(), Isis::Project::controlList(), Isis::ProjectItem::setControlList(), and Isis::ExportControlNetWorkOrder::setupExecution().
| ControlList & Isis::ControlList::operator+= | ( | const QList< Control *> & | other | ) |
Appends control pointers from the other list to this control list.
| The | list of other control pointers to append |
References countChanged().
| ControlList & Isis::ControlList::operator+= | ( | Control *const & | other | ) |
Appends a control pointer to this control list.
| other | The control pointer to append |
References countChanged().
| ControlList & Isis::ControlList::operator<< | ( | const QList< Control *> & | other | ) |
Appends a list of other control pointers to this control list.
| other | The list of other control pointers to append |
References operator<<().
| ControlList & Isis::ControlList::operator<< | ( | Control *const & | other | ) |
Appends a control pointer to this control list.
| other | The control pointer to append |
References countChanged(), and operator<<().
| ControlList & Isis::ControlList::operator= | ( | const QList< Control *> & | rhs | ) |
Assigns another list of control pointers to this control list.
| rhs | The other list of control pointers to assign |
References countChanged().
| ControlList & Isis::ControlList::operator= | ( | const ControlList & | rhs | ) |
Assignment operator.
| rhs | The right hand side of the '=' operator |
References countChanged().
| 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.
Referenced by ControlList().
| void Isis::ControlList::prepend | ( | Control *const & | value | ) |
Prepends a control pointer to the control list.
| value | The control pointer to prepend to the control list |
References countChanged().
| void Isis::ControlList::push_back | ( | Control *const & | value | ) |
Equivalent to append(value)
| value | The control pointer to append to the control list |
References countChanged().
| void Isis::ControlList::push_front | ( | Control *const & | value | ) |
Equivalent to prepend(value)
| value | The control pointer to prepend to the control list |
References countChanged().
| int Isis::ControlList::removeAll | ( | Control *const & | value | ) |
Removes all occurences of the control pointer in the control list.
| value | The control pointer value to remove |
References countChanged().
| void Isis::ControlList::removeAt | ( | int | i | ) |
Removes the control pointer at the specified index.
| i | The index of the control pointer to remove |
References countChanged().
| void Isis::ControlList::removeFirst | ( | ) |
Removes the first control pointer from the control list.
References countChanged().
| void Isis::ControlList::removeLast | ( | ) |
Removes the last control pointer from the control list.
References countChanged().
| bool Isis::ControlList::removeOne | ( | Control *const & | value | ) |
Removes the first occurence of the control pointer from the control list.
| value | The control pointer to remove |
References countChanged().
| 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>
| stream | XML stream that contains the control list data |
| project | Project to save control list from |
| newProjectRoot | Filename root to save control list to |
| IException::Io | "Unable Failed to create directory" |
| IException::Io | "Unable to save control information, could not be opened for writing" |
References _FILEINFO_, Isis::Project::cnetRoot(), Isis::FileName::dir(), Isis::IException::Io, Isis::Project::newProjectRoot(), Isis::FileName::original(), Isis::FileName::path(), Isis::Project::projectRoot(), Isis::ReadWrite, Isis::Control::save(), and Isis::FileName::toString().
| 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 |
Referenced by Isis::ProjectItemModel::setData().
| 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 |
Swaps this control list's control pointers with the other list of control pointers.
| other | The list of control pointers to swap |
References countChanged().
| Control * Isis::ControlList::takeAt | ( | int | i | ) |
Remove the control pointer at the specified index and returns it.
| i | The index of the control pointer to take |
References countChanged().
| Control * Isis::ControlList::takeFirst | ( | ) |
Removes the first control pointer from the control list and returns it.
References countChanged().
| Control * Isis::ControlList::takeLast | ( | ) |
Removes the last control pointer from the control list and returns it.
References countChanged().