Isis 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). | |
TargetBodyList (QObject *parent=NULL) | |
Create a blank target body list. | |
TargetBodyList (QList< TargetBodyQsp >, QObject *parent=NULL) | |
Create a target body list from a list of TargetBody's. | |
TargetBodyList (const TargetBodyList &) | |
Copy constructor. | |
~TargetBodyList () | |
Create an target body list from a list of target body file names. | |
void | append (TargetBodyQsp const &value) |
Appends a TargetBody to the list. | |
void | append (const QList< TargetBodyQsp > &value) |
Appends a TargetBodyList to the list. | |
void | clear () |
clears the list. | |
iterator | erase (iterator pos) |
Erases the TargetBody associated with an iterator. | |
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. | |
void | insert (int i, TargetBodyQsp const &value) |
Inserts a TargetBody at a specific index. | |
iterator | insert (iterator before, TargetBodyQsp const &value) |
Inserts a TargetBody after the TargetBody associated with an iterator. | |
void | prepend (TargetBodyQsp const &value) |
Inserts a TargetBody at the front of the list. | |
void | push_back (TargetBodyQsp const &value) |
Appends a TargetBody to the end of the list. | |
void | push_front (TargetBodyQsp const &value) |
Insertes a TargetBody at the front of the list. | |
int | removeAll (TargetBodyQsp const &value) |
Removes all occurrences of a TargetBody and returns the number removed. | |
void | removeAt (int i) |
Removes the TargetBody at a specific index. | |
void | removeFirst () |
Removes the first TargetBody from the list. | |
void | removeLast () |
Removes the last TargetBody from the list. | |
bool | removeOne (TargetBodyQsp const &value) |
Removes the first occurrence of a TargetBody from the list. | |
void | swap (QList< TargetBodyQsp > &other) |
Swaps the list with another TargetBodyList. | |
TargetBodyQsp | takeAt (int i) |
Removes and returns the TargetBody at a specific index. | |
TargetBodyQsp | takeFirst () |
Removes and returns the first TargetBody in the list. | |
TargetBodyQsp | takeLast () |
Removes and returns the last TargetBody in the list. | |
TargetBodyList & | operator+= (const QList< TargetBodyQsp > &other) |
Appends another TargetBodyList to the list. | |
TargetBodyList & | operator+= (TargetBodyQsp const &other) |
Appends a TargetBody to the list. | |
TargetBodyList & | operator<< (const QList< TargetBodyQsp > &other) |
Appends another TargetBodyList to the list. | |
TargetBodyList & | operator<< (TargetBodyQsp const &other) |
Appends a TargetBody to the list. | |
TargetBodyList & | operator= (const QList< TargetBodyQsp > &rhs) |
Assignment operator for a QList of TargetBodyQsp. | |
TargetBodyList & | operator= (const TargetBodyList &rhs) |
Assignment operator. | |
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. | |
void | setPath (QString newPath) |
Set the relative path (from the project root) to this target body list's folder. | |
QString | name () const |
Get the human-readable name of this target body list. | |
QString | path () const |
Get the path to these target body objects in the list (relative to project root). | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Delete all of the contained TargetBody objects from disk (see TargetBody::deleteFromDisk()) | |
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().
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 | ( | const QList< TargetBodyQsp > & | value | ) |
Appends a TargetBodyList to the list.
value | the TargetBodyList to append |
References countChanged().
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::clear | ( | ) |
clears the list.
References countChanged().
Referenced by Isis::Project::clear().
|
signal |
Referenced by append(), append(), clear(), erase(), erase(), insert(), insert(), operator+=(), operator+=(), operator<<(), 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 | 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().
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().
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 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 > & | 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().