Isis 3 Developer Reference
|
List for holding TargetBodies. More...
#include <TargetBodyList.h>
Signals | |
void | countChanged (int newCount) |
Public Member Functions | |
TargetBodyList (QString name, QString path, QObject *parent=NULL) | |
Create an target body list from an target body list name and path (does not read TargetBody objects). More... | |
TargetBodyList (QObject *parent=NULL) | |
Create a blank target body list. More... | |
TargetBodyList (QList< TargetBodyQsp >, QObject *parent=NULL) | |
Create a target body list from a list of TargetBody's. More... | |
TargetBodyList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL) | |
Create an image list from XML. More... | |
TargetBodyList (const TargetBodyList &) | |
Copy constructor. More... | |
~TargetBodyList () | |
Create an target body list from a list of target body file names. More... | |
void | append (TargetBodyQsp const &value) |
Appends a TargetBody to the list. More... | |
void | append (const QList< TargetBodyQsp > &value) |
Appends a TargetBodyList to the list. More... | |
void | clear () |
clears the list. More... | |
iterator | erase (iterator pos) |
Erases the TargetBody associated with an iterator. More... | |
iterator | erase (iterator begin, iterator end) |
Erases all TargetBodies starting with the TargetBody associated with begin up to, but not including, the TargetBody associated with end. More... | |
void | insert (int i, TargetBodyQsp const &value) |
Inserts a TargetBody at a specific index. More... | |
iterator | insert (iterator before, TargetBodyQsp const &value) |
Inserts a TargetBody after the TargetBody associated with an iterator. More... | |
void | prepend (TargetBodyQsp const &value) |
Inserts a TargetBody at the front of the list. More... | |
void | push_back (TargetBodyQsp const &value) |
Appends a TargetBody to the end of the list. More... | |
void | push_front (TargetBodyQsp const &value) |
Insertes a TargetBody at the front of the list. More... | |
int | removeAll (TargetBodyQsp const &value) |
Removes all occurrences of a TargetBody and returns the number removed. More... | |
void | removeAt (int i) |
Removes the TargetBody at a specific index. More... | |
void | removeFirst () |
Removes the first TargetBody from the list. More... | |
void | removeLast () |
Removes the last TargetBody from the list. More... | |
bool | removeOne (TargetBodyQsp const &value) |
Removes the first occurrence of a TargetBody from the list. More... | |
void | swap (QList< TargetBodyQsp > &other) |
Swaps the list with another TargetBodyList. More... | |
TargetBodyQsp | takeAt (int i) |
Removes and returns the TargetBody at a specific index. More... | |
TargetBodyQsp | takeFirst () |
Removes and returns the first TargetBody in the list. More... | |
TargetBodyQsp | takeLast () |
Removes and returns the last TargetBody in the list. More... | |
TargetBodyList & | operator+= (const QList< TargetBodyQsp > &other) |
Appends another TargetBodyList to the list. More... | |
TargetBodyList & | operator+= (TargetBodyQsp const &other) |
Appends a TargetBody to the list. More... | |
TargetBodyList & | operator<< (const QList< TargetBodyQsp > &other) |
Appends another TargetBodyList to the list. More... | |
TargetBodyList & | operator<< (TargetBodyQsp const &other) |
Appends a TargetBody to the list. More... | |
TargetBodyList & | operator= (const QList< TargetBodyQsp > &rhs) |
Assignment operator for a QList of TargetBodyQsp. More... | |
TargetBodyList & | operator= (const TargetBodyList &rhs) |
Assignment operator. More... | |
QList< QAction * > | supportedActions (Project *project=NULL) |
bool | allSupport (TargetBodyDisplayProperties::Property prop) |
void | setName (QString newName) |
Gets a list of pre-connected actions that have to do with display, such as color, alpha, outline, fill, etc. More... | |
void | setPath (QString newPath) |
Set the relative path (from the project root) to this target body list's folder. More... | |
QString | name () const |
Get the human-readable name of this target body list. More... | |
QString | path () const |
Get the path to these target body objects in the list (relative to project root). More... | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Delete all of the contained TargetBody objects from disk (see TargetBody::deleteFromDisk()) More... | |
List for holding TargetBodies.
Overrides several QList methods in order to emit signals about the list changing. TargetBodies are stored as QSharedPointer<TargetBody>.
Isis::TargetBodyList::TargetBodyList | ( | QString | name, |
QString | path, | ||
QObject * | parent = NULL |
||
) |
Create an target body list from an target body list name and path (does not read TargetBody objects).
name | The TargetBodyList's name (i.e. import1, import2, ...) |
path | The TargetBodyList's folder name (i.e. import1, import2, ...) |
parent | The Qt-relationship parent |
|
explicit |
Create a blank target body list.
parent | The Qt-relationship parent |
|
explicit |
Create a target body list from a list of TargetBody's.
targetBodys | The list of targetBody's |
parent | The Qt-relationship parent |
References append().
|
explicit |
Create an image list from XML.
project | The project with the target body list |
xmlReader | The XML reader currently at an <TargetBodyList> tag. |
parent | The Qt-relationship parent |
References Isis::XmlStackedHandlerReader::pushContentHandler().
Isis::TargetBodyList::TargetBodyList | ( | const TargetBodyList & | other | ) |
Copy constructor.
other | The TargetBodyList to copy |
Isis::TargetBodyList::~TargetBodyList | ( | ) |
Create an target body list from a list of target body file names.
This is slow (serial) and not recommended. Destructor. This does not free the TargetBody objects from memory.
bool Isis::TargetBodyList::allSupport | ( | TargetBodyDisplayProperties::Property | prop | ) |
void Isis::TargetBodyList::append | ( | TargetBodyQsp const & | value | ) |
Appends a TargetBody to the list.
value | The TargetBody to append |
References countChanged().
Referenced by Isis::Project::addTarget(), and TargetBodyList().
void Isis::TargetBodyList::append | ( | const QList< TargetBodyQsp > & | value | ) |
Appends a TargetBodyList to the list.
value | the TargetBodyList to append |
References countChanged().
void Isis::TargetBodyList::clear | ( | ) |
clears the list.
References countChanged().
Referenced by Isis::Project::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().
QList< TargetBodyQsp >::iterator Isis::TargetBodyList::erase | ( | iterator | pos | ) |
Erases the TargetBody associated with an iterator.
pos | An iterator associated with the TaretBody to be erased |
References countChanged().
QList< TargetBodyQsp >::iterator Isis::TargetBodyList::erase | ( | iterator | begin, |
iterator | end | ||
) |
Erases all TargetBodies starting with the TargetBody associated with begin up to, but not including, the TargetBody associated with end.
begin | An iterator associated with the first TargetBody to be erased. |
end | An iterator associated with the TargetBody after the last TargetBody to be erased |
References countChanged().
void Isis::TargetBodyList::insert | ( | int | i, |
TargetBodyQsp const & | value | ||
) |
Inserts a TargetBody at a specific index.
i | The index at which to insert the TargetBody |
value | The TargetBody to insert |
References countChanged().
QList< TargetBodyQsp >::iterator Isis::TargetBodyList::insert | ( | iterator | before, |
TargetBodyQsp const & | value | ||
) |
Inserts a TargetBody after the TargetBody associated with an iterator.
before | An iterator associated with the TargetBody that will be before the inserted TargetBody |
value | The TargetBody to be inserted |
References countChanged().
QString Isis::TargetBodyList::name | ( | ) | const |
Get the human-readable name of this target body list.
Referenced by TargetBodyList().
TargetBodyList & Isis::TargetBodyList::operator+= | ( | const QList< TargetBodyQsp > & | other | ) |
Appends another TargetBodyList to the list.
other | The TargetBodyList to be appended |
References countChanged().
TargetBodyList & Isis::TargetBodyList::operator+= | ( | TargetBodyQsp const & | other | ) |
Appends a TargetBody to the list.
other | The TargetBody to be appended |
References countChanged().
TargetBodyList & Isis::TargetBodyList::operator<< | ( | const QList< TargetBodyQsp > & | other | ) |
Appends another TargetBodyList to the list.
other | The TargetBodyList to be appended |
References operator<<().
TargetBodyList & Isis::TargetBodyList::operator<< | ( | TargetBodyQsp const & | other | ) |
Appends a TargetBody to the list.
other | The TargetBody to be appended |
References countChanged(), and operator<<().
TargetBodyList & Isis::TargetBodyList::operator= | ( | const QList< TargetBodyQsp > & | rhs | ) |
Assignment operator for a QList of TargetBodyQsp.
rhs | The right hand side of the '=' operator |
References countChanged().
TargetBodyList & Isis::TargetBodyList::operator= | ( | const TargetBodyList & | rhs | ) |
Assignment operator.
rhs | The right hand side of the '=' operator |
References countChanged().
QString Isis::TargetBodyList::path | ( | ) | const |
Get the path to these target body objects in the list (relative to project root).
This only applies to a target body list from the project.
Referenced by TargetBodyList().
void Isis::TargetBodyList::prepend | ( | TargetBodyQsp const & | value | ) |
Inserts a TargetBody at the front of the list.
value | the TargetBody to be inserted |
References countChanged().
void Isis::TargetBodyList::push_back | ( | TargetBodyQsp const & | value | ) |
Appends a TargetBody to the end of the list.
value | The TargetBody to be append |
References countChanged().
void Isis::TargetBodyList::push_front | ( | TargetBodyQsp const & | value | ) |
Insertes a TargetBody at the front of the list.
value | The TargetBody to be prepend |
References countChanged().
int Isis::TargetBodyList::removeAll | ( | TargetBodyQsp const & | value | ) |
Removes all occurrences of a TargetBody and returns the number removed.
value | The TargetBody to be removed. |
References countChanged().
void Isis::TargetBodyList::removeAt | ( | int | i | ) |
Removes the TargetBody at a specific index.
i | The index of the TargetBody to be removed |
References countChanged().
void Isis::TargetBodyList::removeFirst | ( | ) |
Removes the first TargetBody from the list.
References countChanged().
void Isis::TargetBodyList::removeLast | ( | ) |
Removes the last TargetBody from the list.
References countChanged().
bool Isis::TargetBodyList::removeOne | ( | TargetBodyQsp const & | value | ) |
Removes the first occurrence of a TargetBody from the list.
value | the TargetBody to be removed |
References countChanged().
void Isis::TargetBodyList::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot | ||
) | const |
Delete all of the contained TargetBody objects from disk (see TargetBody::deleteFromDisk())
Convert this target body list into XML format for saving/restoring capabilities.
This writes:
<TargetBodyList name="..." path="...">
to the given xml stream, and creates a 'targets.xml' inside the folder with the target body objects. Inside the images.xml, this writes:
<targets> ... </targets>
stream | The QXmlStreamWriter that will be used to convert the TargetBodyList |
project | The Project the TargetBodyList belongs to |
newProjectRoot | The root of the project folder where the TargetBodyList will be saved |
void Isis::TargetBodyList::setName | ( | QString | newName | ) |
Gets a list of pre-connected actions that have to do with display, such as color, alpha, outline, fill, etc.
Returns true if all of the given displays support the property
prop | The property we're testing for support for |
displays | The displays we're doing the test on Set the human-readable name of this target body list. This is really only useful for project target body lists (not anonymous temporary ones). |
newName | The name to give this target body list |
void Isis::TargetBodyList::setPath | ( | QString | newPath | ) |
Set the relative path (from the project root) to this target body list's folder.
This is really only useful for project target body lists (not anonymous temporary ones).
newPath | The path to the target body objects in this target body list |
void Isis::TargetBodyList::swap | ( | QList< TargetBodyQsp > & | other | ) |
Swaps the list with another TargetBodyList.
other | The TargetBodyList to swap with |
References countChanged().
TargetBodyQsp Isis::TargetBodyList::takeAt | ( | int | i | ) |
Removes and returns the TargetBody at a specific index.
i | The index of the TargetBody to takeAt |
References countChanged().
TargetBodyQsp Isis::TargetBodyList::takeFirst | ( | ) |
Removes and returns the first TargetBody in the list.
References countChanged().
TargetBodyQsp Isis::TargetBodyList::takeLast | ( | ) |
Removes and returns the last TargetBody in the list.
References countChanged().