USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ControlList Class Reference

Adapted from ImageList. More...

#include <ControlList.h>

Inheritance diagram for Isis::ControlList:
Inheritance graph
Collaboration diagram for Isis::ControlList:
Collaboration graph

Classes

class  CopyControlDataFunctor
 This functor is used for copying the control nets between two projects quickly. More...
class  XmlHandler

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.

Private Attributes

QString m_name
QString m_path
 This stores the directory name that contains the controls in this control list.

Detailed Description

Adapted from ImageList.

Author
2012-09-01 Tracie Sucharski
History:
2012-09-01 Tracie Sucharski - Original version.

Definition at line 29 of file ControlList.h.

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

Definition at line 52 of file ControlList.cpp.

References m_path, name(), and path().

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

Create a blank control list.

Parameters
parentThe Qt-relationship parent

Definition at line 63 of file ControlList.cpp.

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

Definition at line 73 of file ControlList.cpp.

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

Definition at line 85 of file ControlList.cpp.

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.

Definition at line 107 of file ControlList.cpp.

References append().

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

Copy constructor.

Parameters
otherThe ControlList to copy

Definition at line 96 of file ControlList.cpp.

References m_path.

Isis::ControlList::~ControlList ( )

Destructor.

This does not free the Controls from memory.

Definition at line 122 of file ControlList.cpp.

Member Function Documentation

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

Definition at line 130 of file ControlList.cpp.

Referenced by append(), and ControlList().

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

Definition at line 139 of file ControlList.cpp.

References append().

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

Definition at line 148 of file ControlList.cpp.

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

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

Definition at line 451 of file ControlList.cpp.

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

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

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

Definition at line 160 of file ControlList.cpp.

Referenced by erase().

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

Definition at line 170 of file ControlList.cpp.

References erase().

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

Definition at line 180 of file ControlList.cpp.

Referenced by insert().

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

Definition at line 190 of file ControlList.cpp.

References insert().

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

Definition at line 432 of file ControlList.cpp.

Referenced by Isis::ControlGroupTreeWidgetItem::ControlGroupTreeWidgetItem(), ControlList(), Isis::ExportControlNetWorkOrder::execute(), Isis::MosaicControlNetTool::openControlNet(), and Isis::ControlList::XmlHandler::startElement().

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

Definition at line 324 of file ControlList.cpp.

Referenced by operator+=().

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

Definition at line 338 of file ControlList.cpp.

References operator+=().

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

Definition at line 348 of file ControlList.cpp.

References Isis::operator<<().

Referenced by operator<<().

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

Definition at line 362 of file ControlList.cpp.

References operator<<().

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

Definition at line 372 of file ControlList.cpp.

Referenced by operator=().

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

Assignment operator.

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

Definition at line 390 of file ControlList.cpp.

References m_path, and operator=().

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

Definition at line 443 of file ControlList.cpp.

References m_path.

Referenced by ControlList(), and Isis::ControlList::XmlHandler::startElement().

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

Definition at line 200 of file ControlList.cpp.

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

Definition at line 209 of file ControlList.cpp.

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

Definition at line 218 of file ControlList.cpp.

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

Definition at line 227 of file ControlList.cpp.

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

Definition at line 241 of file ControlList.cpp.

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

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

Definition at line 250 of file ControlList.cpp.

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

Definition at line 259 of file ControlList.cpp.

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

Definition at line 268 of file ControlList.cpp.

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>

Definition at line 481 of file ControlList.cpp.

References _FILEINFO_, Isis::Project::cnetRoot(), Isis::IException::Io, m_path, and Isis::FileName::path().

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

Definition at line 411 of file ControlList.cpp.

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

Definition at line 422 of file ControlList.cpp.

References m_path.

void Isis::ControlList::swap ( QList< Control * > &  other)
See Also
QList<Control *>::swap()

Definition at line 282 of file ControlList.cpp.

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

Definition at line 294 of file ControlList.cpp.

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

Definition at line 304 of file ControlList.cpp.

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

Definition at line 314 of file ControlList.cpp.

Member Data Documentation

QString Isis::ControlList::m_path
private

This stores the directory name that contains the controls in this control list.

For example: import1 or import2

This path is relative to Project::controlNetRoot()

Definition at line 162 of file ControlList.h.

Referenced by ControlList(), deleteFromDisk(), operator=(), path(), save(), and setPath().


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