Isis Developer Reference
Isis::GuiCameraList Class Reference

List of GuiCameras saved as QSharedPointers. More...

#include <GuiCameraList.h>

Inheritance diagram for Isis::GuiCameraList:
Inheritance graph
Collaboration diagram for Isis::GuiCameraList:
Collaboration graph

Signals

void countChanged (int newCount)
 Emitted when the number of GuiCameras in the list changes.
 

Public Member Functions

 GuiCameraList (QString name, QString path, QObject *parent=NULL)
 Create an gui camera list from a gui camera list name and path (does not read GuiCamera objects).
 
 GuiCameraList (QObject *parent=NULL)
 Create a blank gui camera list.
 
 GuiCameraList (QList< GuiCameraQsp >, QObject *parent=NULL)
 Create a gui camera list from a list of GuiCamera's.
 
 GuiCameraList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL)
 Create an image list from XML.
 
 GuiCameraList (const GuiCameraList &)
 Copy constructor.
 
 ~GuiCameraList ()
 Create a gui camera list from a list of gui camera file names.
 
void append (GuiCameraQsp const &value)
 Appends a single GuiCamera to the list.
 
void append (const QList< GuiCameraQsp > &value)
 Appends another GuiCameraList to the list.
 
void clear ()
 Clears the list.
 
iterator erase (iterator pos)
 Removes the GuiCamera associated with an iterator.
 
iterator erase (iterator begin, iterator end)
 Removes all GuiCameras from begin up to, but not inclusing end.
 
void insert (int i, GuiCameraQsp const &value)
 Inserts a GuiCamera into the list at a given index.
 
iterator insert (iterator before, GuiCameraQsp const &value)
 Inserts a GuiCamera in front of the GuiCamera associated with an iterator.
 
void prepend (GuiCameraQsp const &value)
 Inserts a GuiCamera at the beginning of the list.
 
void push_back (GuiCameraQsp const &value)
 Inserts a GuiCamera at the end of the list.
 
void push_front (GuiCameraQsp const &value)
 Inserts a GuiCamera at the front of the list.
 
int removeAll (GuiCameraQsp const &value)
 Removes all occurances of a GuiCamera from the list.
 
void removeAt (int i)
 Removes the GuiCamera at a specific index.
 
void removeFirst ()
 Removes the first GuiCamera in the list.
 
void removeLast ()
 Removes the last GuiCamera in the list.
 
bool removeOne (GuiCameraQsp const &value)
 Removes the first occurance of a GuiCamera from the list.
 
void swap (QList< GuiCameraQsp > &other)
 Swaps the list with another GuiCameraList.
 
GuiCameraQsp takeAt (int i)
 Removes and returns the GuiCamera at a specific index.
 
GuiCameraQsp takeFirst ()
 Removes and returns the first GuiCamera in the list.
 
GuiCameraQsp takeLast ()
 Removes and returns the last GuiCamera in the list.
 
GuiCameraListoperator+= (const QList< GuiCameraQsp > &other)
 Appends another GuiCameraList to the list and returns a reference to this.
 
GuiCameraListoperator+= (GuiCameraQsp const &other)
 Appends a GuiCamera to the list and returns a reference to this.
 
GuiCameraListoperator<< (const QList< GuiCameraQsp > &other)
 Appends another GuiVameraList to the list and returns a reference to this.
 
GuiCameraListoperator<< (GuiCameraQsp const &other)
 Appends a GuiCamera to the list and returns a reference to this.
 
GuiCameraListoperator= (const QList< GuiCameraQsp > &rhs)
 Assigns a list of GuiCameras to the list.
 
GuiCameraListoperator= (const GuiCameraList &rhs)
 Assignment operator.
 
QList< QAction * > supportedActions (Project *project=NULL)
 
bool allSupport (GuiCameraDisplayProperties::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 gui camera list's folder.
 
QString name () const
 Get the human-readable name of this gui cameray list.
 
QString path () const
 Get the path to these gui camera objects in the list (relative to project root).
 
void save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
 Delete all of the contained GuiCamera objects from disk (see GuiCamera::deleteFromDisk())
 

Detailed Description

List of GuiCameras saved as QSharedPointers.

Overrides many QList methods in order to emit signals about that status of the list.

List of GuiCameras.

Author
2015-06-11 Ken Edmundson

Constructor & Destructor Documentation

◆ GuiCameraList() [1/5]

Isis::GuiCameraList::GuiCameraList ( QString name,
QString path,
QObject * parent = NULL )

Create an gui camera list from a gui camera list name and path (does not read GuiCamera objects).

Parameters
nameThe GuiCameraList's name (i.e. import1, import2, ...)
pathThe GuiCameraList's folder name (i.e. import1, import2, ...)
parentThe Qt-relationship parent

References name(), and path().

◆ GuiCameraList() [2/5]

Isis::GuiCameraList::GuiCameraList ( QObject * parent = NULL)
explicit

Create a blank gui camera list.

Parameters
parentThe Qt-relationship parent

◆ GuiCameraList() [3/5]

Isis::GuiCameraList::GuiCameraList ( QList< GuiCameraQsp > guiCameras,
QObject * parent = NULL )
explicit

Create a gui camera list from a list of GuiCamera's.

Parameters
guiCamerasThe list of guiCamera's
parentThe Qt-relationship parent

References append().

◆ GuiCameraList() [4/5]

Isis::GuiCameraList::GuiCameraList ( Project * project,
XmlStackedHandlerReader * xmlReader,
QObject * parent = NULL )
explicit

Create an image list from XML.

Parameters
projectThe project with the gui camera list
xmlReaderThe XML reader currently at an <GuiCameraList > tag.
parentThe Qt-relationship parent

◆ GuiCameraList() [5/5]

Isis::GuiCameraList::GuiCameraList ( const GuiCameraList & src)

Copy constructor.

Parameters
otherThe GuiCameraList to copy

◆ ~GuiCameraList()

Isis::GuiCameraList::~GuiCameraList ( )

Create a gui camera list from a list of gui camera file names.

This is slow (serial) and not recommended. Destructor. This does not free the GuiCamera objects from memory.

Member Function Documentation

◆ allSupport()

bool Isis::GuiCameraList::allSupport ( GuiCameraDisplayProperties::Property prop)

◆ append() [1/2]

void Isis::GuiCameraList::append ( const QList< GuiCameraQsp > & value)

Appends another GuiCameraList to the list.

Parameters
valueThe GuiCameraList to be appened
See also
QList<GuiCameraQsp>::append()

References countChanged().

◆ append() [2/2]

void Isis::GuiCameraList::append ( GuiCameraQsp const & value)

Appends a single GuiCamera to the list.

Parameters
valueThe GuiCamera to be appened
See also
QList<GuiCameraQsp>::append()

References countChanged().

Referenced by Isis::Project::addCamera(), and GuiCameraList().

◆ clear()

void Isis::GuiCameraList::clear ( )

Clears the list.

See also
QList<GuiCameraQsp>::clear()

References countChanged().

Referenced by Isis::Project::clear().

◆ countChanged

void Isis::GuiCameraList::countChanged ( int newCount)
signal

Emitted when the number of GuiCameras in the list changes.

Not currently connected to anything.

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().

◆ erase() [1/2]

QList< GuiCameraQsp >::iterator Isis::GuiCameraList::erase ( iterator begin,
iterator end )

Removes all GuiCameras from begin up to, but not inclusing end.

Returns an iterator associated with GuiCamera that was associated with end.

Parameters
beginAn iterator associated with the first GuiCamera to be removed
endAn iterator associated with the GuiCamera after the last GuiCamera to be removed
Returns
QList<GuiCameraQsp>::iteraror Iterator associated with the GuiCamera that was associated with end.
See also
QList<GuiCameraQsp>::erase()

References countChanged().

◆ erase() [2/2]

QList< GuiCameraQsp >::iterator Isis::GuiCameraList::erase ( iterator pos)

Removes the GuiCamera associated with an iterator.

Returns an iterator associated with the next GuiCamera in the list.

Parameters
posAn iterator associated with the GuiCamera to be erased
Returns
QList<GuiCameraQsq>::iteraror Iterator associated with the next GuiCamera
See also
QList<GuiCameraQsp>::erase()

References countChanged().

◆ insert() [1/2]

void Isis::GuiCameraList::insert ( int i,
GuiCameraQsp const & value )

Inserts a GuiCamera into the list at a given index.

Parameters
iThe index the GuiCamera will be inserted at
valueThe GuiCamera to be inserted
See also
QList<GuiCameraQsp>::insert()

References countChanged().

◆ insert() [2/2]

QList< GuiCameraQsp >::iterator Isis::GuiCameraList::insert ( iterator before,
GuiCameraQsp const & value )

Inserts a GuiCamera in front of the GuiCamera associated with an iterator.

Returns an iterator associated with the inserted GuiCamera.

Parameters
beforeAn iterator associated with the GuiCamera that value will be inserted in front of
valueThe GuiCamera to be inserted.
Returns
QList<GuiCameraQsp>::iterator Iterator associated with the inserted GuiCamera
See also
QList<GuiCameraQsp>::insert()

References countChanged().

◆ name()

QString Isis::GuiCameraList::name ( ) const

Get the human-readable name of this gui cameray list.

Returns
QString The name of the gui camera list (or an empty string if anonymous).

Referenced by GuiCameraList().

◆ operator+=() [1/2]

GuiCameraList & Isis::GuiCameraList::operator+= ( const QList< GuiCameraQsp > & other)

Appends another GuiCameraList to the list and returns a reference to this.

Parameters
otherThe GuiCameraList to be appended
Returns
QuiCameraList & A reference to this
See also
QList<GuiCameraQsp>::operator+=()

References countChanged().

◆ operator+=() [2/2]

GuiCameraList & Isis::GuiCameraList::operator+= ( GuiCameraQsp const & other)

Appends a GuiCamera to the list and returns a reference to this.

Parameters
otherThe GuiCamera to be appended
Returns
GuiCameraList & A reference to this
See also
QList<GuiCameraQsp>::operator+=()

References countChanged().

◆ operator<<() [1/2]

GuiCameraList & Isis::GuiCameraList::operator<< ( const QList< GuiCameraQsp > & other)

Appends another GuiVameraList to the list and returns a reference to this.

Parameters
otherThe GuiCameraList to be appened
Returns
GuiCameraList & A reference to this
See also
QList<GuiCameraQsp>::operator<<()

References countChanged().

◆ operator<<() [2/2]

GuiCameraList & Isis::GuiCameraList::operator<< ( GuiCameraQsp const & other)

Appends a GuiCamera to the list and returns a reference to this.

Parameters
otherThe GuiCamera to be appended
Returns
GuiCameraList & A reference to this
See also
QList<GuiCameraQsp>::operator<<()

References countChanged().

◆ operator=() [1/2]

GuiCameraList & Isis::GuiCameraList::operator= ( const GuiCameraList & rhs)

Assignment operator.

Parameters
rhsThe right hand side of the '=' operator
Returns
GuiCameraList & A reference to this

References countChanged().

◆ operator=() [2/2]

GuiCameraList & Isis::GuiCameraList::operator= ( const QList< GuiCameraQsp > & rhs)

Assigns a list of GuiCameras to the list.

Does not modify m_name or m_path.

Parameters
rhsthe list being assigned from
Returns
GuiCameraList & A reference to this
See also
QList<GuiCameraQsp>::operator=()

References countChanged().

◆ path()

QString Isis::GuiCameraList::path ( ) const

Get the path to these gui camera objects in the list (relative to project root).

This only applies to a gui camera list from the project.

Returns
Qstring The path to the gui camera objects in the list (or an empty string if unknown).

Referenced by GuiCameraList().

◆ prepend()

void Isis::GuiCameraList::prepend ( GuiCameraQsp const & value)

Inserts a GuiCamera at the beginning of the list.

Parameters
valueThe GuiCamera to be inserted.
See also
QList<GuiCameraQsp>::prepend()

References countChanged().

◆ push_back()

void Isis::GuiCameraList::push_back ( GuiCameraQsp const & value)

Inserts a GuiCamera at the end of the list.

Equivalent to append.

Parameters
valueThe GuiCamera to be inserted.
See also
QList<GuiCameraQsp>::push_back()

References countChanged().

◆ push_front()

void Isis::GuiCameraList::push_front ( GuiCameraQsp const & value)

Inserts a GuiCamera at the front of the list.

Equivalent to prepend.

Parameters
valueThe GuiCamera to be inserted.
See also
QList<GuiCameraQsp>::push_front()

References countChanged().

◆ removeAll()

int Isis::GuiCameraList::removeAll ( GuiCameraQsp const & value)

Removes all occurances of a GuiCamera from the list.

Returns the number removed.

Parameters
valueThe GuiCamera to be removed
Returns
int The number of GuiCameras removed
See also
QList<GuiCameraQsp>::removeAll()

References countChanged().

◆ removeAt()

void Isis::GuiCameraList::removeAt ( int i)

Removes the GuiCamera at a specific index.

Parameters
iThe index of the GuiCamera to be removed
See also
QList<GuiCameraQsp>::removeAt()

References countChanged().

◆ removeFirst()

void Isis::GuiCameraList::removeFirst ( )

Removes the first GuiCamera in the list.

See also
QList<GuiCameraQsp>::removeFirst()

References countChanged().

◆ removeLast()

void Isis::GuiCameraList::removeLast ( )

Removes the last GuiCamera in the list.

See also
QList<GuiCameraQsp>::removeLast()

References countChanged().

◆ removeOne()

bool Isis::GuiCameraList::removeOne ( GuiCameraQsp const & value)

Removes the first occurance of a GuiCamera from the list.

Returns whether or not it succeeded.

Parameters
valueThe GuiCamera to be removed
Returns
bool True if successful
See also
QList<GuiCameraQsp>::removeOne()

References countChanged().

◆ save()

void Isis::GuiCameraList::save ( QXmlStreamWriter & stream,
const Project * project,
FileName newProjectRoot ) const

Delete all of the contained GuiCamera objects from disk (see GuiCamera::deleteFromDisk())

Convert this gui camera list into XML format for saving/restoring capabilities. Not currently implemented

This writes:

  <GuiCameraList 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>

◆ setName()

void Isis::GuiCameraList::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

Parameters
propThe property we're testing for support for
displaysThe displays we're doing the test on Set the human-readable name of this gui camera list. This is really only useful for project gui camera lists (not anonymous temporary ones).
newNameThe name to give this gui camera list

◆ setPath()

void Isis::GuiCameraList::setPath ( QString newPath)

Set the relative path (from the project root) to this gui camera list's folder.

This is really only useful for project gui camera lists (not anonymous temporary ones).

Parameters
newPathThe path to the gui camera objects in this gui camera list

◆ supportedActions()

QList< QAction * > Isis::GuiCameraList::supportedActions ( Project * project = NULL)

◆ swap()

void Isis::GuiCameraList::swap ( QList< GuiCameraQsp > & other)

Swaps the list with another GuiCameraList.

Parameters
otherThe GuiCameraList to swap with
See also
QList<GuiCameraQsp>::swap()

References countChanged().

◆ takeAt()

GuiCameraQsp Isis::GuiCameraList::takeAt ( int i)

Removes and returns the GuiCamera at a specific index.

Parameters
iThe index of GuiCamera to be removed
Returns
QuiCameraQsp The GuiCamera removed
See also
QList<GuiCameraQsp>::takeAt()

References countChanged().

◆ takeFirst()

GuiCameraQsp Isis::GuiCameraList::takeFirst ( )

Removes and returns the first GuiCamera in the list.

Returns
GuiCameraQsp The GuiCamera removed
See also
QList<GuiCameraQsp>::takeFirst()

References countChanged().

◆ takeLast()

GuiCameraQsp Isis::GuiCameraList::takeLast ( )

Removes and returns the last GuiCamera in the list.

Returns
GuiCameraQsp The GuiCamera removed
See also
QList<GuiCameraQsp>::takeLast()

References countChanged().


The documentation for this class was generated from the following files: