USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::ControlList Class Reference

Adapted from ImageList. More...

#include <ControlList.h>

Inherits QObject, and QList< Control * >.

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)
 
ControltakeAt (int i)
 
ControltakeFirst ()
 
ControltakeLast ()
 
ControlListoperator+= (const QList< Control * > &other)
 
ControlListoperator+= (Control *const &other)
 
ControlListoperator<< (const QList< Control * > &other)
 
ControlListoperator<< (Control *const &other)
 
ControlListoperator= (const QList< Control * > &rhs)
 
ControlListoperator= (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.
 

Detailed Description

Adapted from ImageList.

Author
2012-09-01 Tracie Sucharski

Constructor & Destructor Documentation

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

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

References name(), and path().

Isis::ControlList::ControlList ( QObject parent = NULL)
explicit

Create a blank control list.

Parameters
parentThe Qt-relationship parent
Isis::ControlList::ControlList ( QList< Control * >  controls,
QObject parent = NULL 
)
explicit

Create an control list from a list of controls.

Parameters
controlsThe list of controls
parentThe Qt-relationship parent

References append().

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

Create an control list from XML.

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

References Isis::XmlStackedHandlerReader::pushContentHandler().

Isis::ControlList::ControlList ( QStringList fileNames)
explicit

Create an control list from a list of control net file names.

This is slow (serial) and not recommended.

References append().

Isis::ControlList::ControlList ( const ControlList other)

Copy constructor.

Parameters
otherThe ControlList to copy
Isis::ControlList::~ControlList ( )

Destructor.

This does not free the Controls from memory.

References deletingList().

Member Function Documentation

bool Isis::ControlList::allSupport ( ControlDisplayProperties::Property  prop)
void Isis::ControlList::append ( Control *const &  value)
See Also
QList<Control *>::append()

References countChanged().

Referenced by ControlList().

void Isis::ControlList::append ( const QList< Control * > &  value)
See Also
QList<Control *>::append()

References countChanged().

void Isis::ControlList::clear ( )
See Also
QList<Control *>::clear()

References countChanged().

void Isis::ControlList::deleteFromDisk ( Project project)

Delete all of the contained Controls from disk (see Control::deleteFromDisk())

References Isis::Project::cnetRoot(), and Isis::Control::deleteFromDisk().

Referenced by Isis::ImportControlNetWorkOrder::syncUndo().

void Isis::ControlList::deletingList ( ControlList list)
signal

Referenced by ~ControlList().

QList< Control * >::iterator Isis::ControlList::erase ( iterator  pos)
See Also
QList<Control *>::erase()

References countChanged().

QList< Control * >::iterator Isis::ControlList::erase ( iterator  begin,
iterator  end 
)
See Also
QList<Control *>::erase()

References countChanged().

void Isis::ControlList::insert ( int  i,
Control *const &  value 
)
See Also
QList<Control *>::insert()

References countChanged().

QList< Control * >::iterator Isis::ControlList::insert ( iterator  before,
Control *const &  value 
)
See Also
QList<Control *>::insert()

References countChanged().

QString Isis::ControlList::name ( ) const

Get the human-readable name of this control list.

Returns
The name of the control list (or an empty string if anonymous).

Referenced by Isis::ControlGroupTreeWidgetItem::ControlGroupTreeWidgetItem(), ControlList(), Isis::Project::controlList(), and Isis::ExportControlNetWorkOrder::execute().

ControlList & Isis::ControlList::operator+= ( const QList< Control * > &  other)
See Also
QList<Control *>::operator+=()

References countChanged().

ControlList & Isis::ControlList::operator+= ( Control *const &  other)
See Also
QList<Control *>::operator+=()

References countChanged().

ControlList & Isis::ControlList::operator<< ( const QList< Control * > &  other)
See Also
QList<Control *>::operator<<()

References operator<<().

ControlList & Isis::ControlList::operator<< ( Control *const &  other)
See Also
QList<Control *>::operator<<()

References countChanged(), and operator<<().

ControlList & Isis::ControlList::operator= ( const QList< Control * > &  rhs)
See Also
QList<Control *>::operator=()

References countChanged().

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

Assignment operator.

Parameters
rhsThe right hand side of the '=' operator
Returns
*this

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.

Returns
The path to the controls in the control list (or an empty string if unknown).

Referenced by ControlList().

void Isis::ControlList::prepend ( Control *const &  value)
See Also
QList<Control *>::prepend()

References countChanged().

void Isis::ControlList::push_back ( Control *const &  value)
See Also
QList<Control *>::push_back()

References countChanged().

void Isis::ControlList::push_front ( Control *const &  value)
See Also
QList<Control *>::push_front()

References countChanged().

int Isis::ControlList::removeAll ( Control *const &  value)
See Also
QList<Control *>::removeAll()

References countChanged().

void Isis::ControlList::removeAt ( int  i)
See Also
QList<Control *>::removeAt()

References countChanged().

void Isis::ControlList::removeFirst ( )
See Also
QList<Control *>::removeFirst()

References countChanged().

void Isis::ControlList::removeLast ( )
See Also
QList<Control *>::removeLast()

References countChanged().

bool Isis::ControlList::removeOne ( Control *const &  value)
See Also
QList<Control *>::removeOne()

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>

References _FILEINFO_, Isis::Project::cnetRoot(), Isis::FileName::dir(), Isis::IException::Io, Isis::FileName::original(), Isis::FileName::path(), 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).

Parameters
newNameThe name to give this control list
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).

Parameters
newPathThe path to the controls in this control list
QList<QAction *> Isis::ControlList::supportedActions ( Project project = NULL)
void Isis::ControlList::swap ( QList< Control * > &  other)
See Also
QList<Control *>::swap()

References countChanged().

Control * Isis::ControlList::takeAt ( int  i)
See Also
QList<Control *>::takeAt()

References countChanged().

Control * Isis::ControlList::takeFirst ( )
See Also
QList<Control *>::takeFirst()

References countChanged().

Control * Isis::ControlList::takeLast ( )
See Also
QList<Control *>::takeLast()

References countChanged().


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