Isis 3.0 Object Programmers' Reference |
Home |
#include <ImageList.h>
Classes | |
class | CopyImageDataFunctor |
This functor is used for copying the images between two projects quickly. More... | |
class | XmlHandler |
Signals | |
void | countChanged (int newCount) |
Public Member Functions | |
ImageList (QString name, QString path, QObject *parent=NULL) | |
Create an image list from an image list name and path (does not read Images). | |
ImageList (QObject *parent=NULL) | |
Create a blank image list. | |
ImageList (QList< Image * >, QObject *parent=NULL) | |
Create an image list from a list of images. | |
ImageList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL) | |
Create an image list from XML. | |
ImageList (QStringList &) | |
Create an image list from a list of cube file names. | |
ImageList (const ImageList &) | |
Copy constructor. | |
~ImageList () | |
Destructor. | |
void | append (Image *const &value) |
void | append (const QList< Image * > &value) |
void | clear () |
iterator | erase (iterator pos) |
iterator | erase (iterator begin, iterator end) |
void | insert (int i, Image *const &value) |
iterator | insert (iterator before, Image *const &value) |
void | prepend (Image *const &value) |
void | push_back (Image *const &value) |
void | push_front (Image *const &value) |
int | removeAll (Image *const &value) |
void | removeAt (int i) |
void | removeFirst () |
void | removeLast () |
bool | removeOne (Image *const &value) |
void | swap (QList< Image * > &other) |
Image * | takeAt (int i) |
Image * | takeFirst () |
Image * | takeLast () |
ImageList & | operator+= (const QList< Image * > &other) |
ImageList & | operator+= (Image *const &other) |
ImageList & | operator<< (const QList< Image * > &other) |
ImageList & | operator<< (Image *const &other) |
ImageList & | operator= (const QList< Image * > &rhs) |
ImageList & | operator= (const ImageList &rhs) |
Assignment operator. | |
QList< QAction * > | supportedActions (Project *project=NULL) |
Gets a list of pre-connected actions that have to do with display, such as color, alpha, outline, fill, etc. | |
bool | allSupport (ImageDisplayProperties::Property prop) |
Returns true if all of the given displays support the property. | |
void | setName (QString newName) |
Set the human-readable name of this image list. | |
void | setPath (QString newPath) |
Set the relative path (from the project root) to this image list's folder. | |
QString | name () const |
Get the human-readable name of this image list. | |
QString | path () const |
Get the path to these images in the image list (relative to project root). | |
void | deleteFromDisk (Project *project) |
Delete all of the contained Images from disk (see Image::deleteFromDisk()) | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Convert this image list into XML format for saving/restoring capabilities. | |
Private Slots | |
void | askAndUpdateAlpha () |
Prompt the user for a new alpha value. | |
void | askAndUpdateColor () |
Prompt the user for a new color. | |
void | showRandomColor () |
This applies a new semi-random color to every image's display property for every image in this image list. | |
QStringList | saveAndToggleShowDNs () |
Change the visibility of DNs. | |
QStringList | saveAndToggleShowFill () |
Change the visibility of the fill area. | |
QStringList | saveAndToggleShowLabel () |
Change the visibility of the display name. | |
QStringList | saveAndToggleShowOutline () |
Change the visibility of the outline. | |
Private Member Functions | |
QAction * | createWorkOrder (Project *project, ImageListActionWorkOrder::Action action) |
void | applyAlphas (QStringList alphaValues) |
void | applyColors (QStringList colorValues, int column=0) |
void | applyShowLabel (QStringList showLabelValues) |
void | applyShowFill (QStringList showFillValues) |
void | applyShowDNs (QStringList showDNsValues) |
void | applyShowOutline (QStringList showOutlineValues) |
bool | askAlpha (int *alphaResult) const |
Prompt the user for a new alpha value. | |
bool | askNewColor (QColor *colorResult) const |
QStringList | saveAndApplyAlpha (int newAlpha) |
QStringList | saveAndApplyColor (QColor newColor) |
QStringList | saveAndApplyRandomColor () |
Private Attributes | |
QString | m_name |
QString | m_path |
This stores the directory name that contains the images in this image list. | |
Friends | |
class | ImageListActionWorkOrder |
Definition at line 29 of file ImageList.h.
Isis::ImageList::ImageList | ( | QString | name, |
QString | path, | ||
QObject * | parent = NULL |
||
) |
Create an image list from an image list name and path (does not read Images).
name | The ImageList's name (i.e. import1, import2, ...) |
path | The ImageList's folder name (i.e. import1, import2, ...) |
parent | The Qt-relationship parent |
Definition at line 52 of file ImageList.cpp.
|
explicit |
Create a blank image list.
parent | The Qt-relationship parent |
Definition at line 63 of file ImageList.cpp.
Create an image list from a list of images.
images | The list of images |
parent | The Qt-relationship parent |
Definition at line 73 of file ImageList.cpp.
References append().
|
explicit |
Create an image list from XML.
project | The project with the image list |
xmlReader | The XML reader currently at an <imageList> tag. |
parent | The Qt-relationship parent |
Definition at line 85 of file ImageList.cpp.
|
explicit |
Create an image list from a list of cube file names.
This is slow (serial) and not recommended.
Definition at line 106 of file ImageList.cpp.
References append().
Isis::ImageList::ImageList | ( | const ImageList & | other | ) |
Copy constructor.
other | The ImageList to copy |
Definition at line 96 of file ImageList.cpp.
References m_path.
Isis::ImageList::~ImageList | ( | ) |
Destructor.
This does not free the Images from memory.
Definition at line 121 of file ImageList.cpp.
bool Isis::ImageList::allSupport | ( | ImageDisplayProperties::Property | prop | ) |
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 |
Definition at line 527 of file ImageList.cpp.
References Isis::Image::displayProperties(), and Isis::DisplayProperties::supports().
Referenced by supportedActions().
void Isis::ImageList::append | ( | Image *const & | value | ) |
Definition at line 128 of file ImageList.cpp.
Referenced by Isis::MosaicSceneItem::contextMenuEvent(), Isis::MosaicSceneWidget::contextMenuEvent(), Isis::MosaicSceneWidget::getSelectedCubes(), ImageList(), Isis::Footprint2DViewWorkOrder::syncRedo(), and Isis::MosaicSceneWidgetTester::testBasicFunctionality().
Definition at line 137 of file ImageList.cpp.
|
private |
Prompt the user for a new alpha value.
If the user selects a new alpha then this sets alphaResult and returns true.
Definition at line 785 of file ImageList.cpp.
References Isis::ImageDisplayProperties::Color, and Isis::DisplayProperties::getValue().
Referenced by askAndUpdateAlpha(), and Isis::ImageListActionWorkOrder::execute().
|
privateslot |
Prompt the user for a new alpha value.
If the user selects a new alpha then every image's display properties is updated.
Definition at line 884 of file ImageList.cpp.
References askAlpha().
Referenced by supportedActions().
|
privateslot |
Prompt the user for a new color.
If the user selects a new color then every image's display properties is updated.
Definition at line 898 of file ImageList.cpp.
Referenced by supportedActions().
void Isis::ImageList::clear | ( | ) |
Definition at line 146 of file ImageList.cpp.
void Isis::ImageList::deleteFromDisk | ( | Project * | project | ) |
Delete all of the contained Images from disk (see Image::deleteFromDisk())
Definition at line 586 of file ImageList.cpp.
References Isis::Image::deleteFromDisk(), Isis::Project::imageDataRoot(), and m_path.
Referenced by Isis::Project::deleteAllProjectFiles().
Definition at line 158 of file ImageList.cpp.
Referenced by Isis::MosaicController::imageClosed().
Definition at line 168 of file ImageList.cpp.
void Isis::ImageList::insert | ( | int | i, |
Image *const & | value | ||
) |
Definition at line 178 of file ImageList.cpp.
Definition at line 188 of file ImageList.cpp.
QString Isis::ImageList::name | ( | ) | const |
Get the human-readable name of this image list.
Definition at line 567 of file ImageList.cpp.
Referenced by Isis::ExportImagesWorkOrder::execute(), Isis::CubeViewportViewWorkOrder::execute(), Isis::Footprint2DViewWorkOrder::execute(), Isis::ImageFileListViewWorkOrder::execute(), Isis::ImageGroupTreeWidgetItem::ImageGroupTreeWidgetItem(), ImageList(), and Isis::ImageList::XmlHandler::startElement().
Definition at line 322 of file ImageList.cpp.
Definition at line 336 of file ImageList.cpp.
Definition at line 346 of file ImageList.cpp.
References operator<<().
Definition at line 360 of file ImageList.cpp.
References operator<<().
Definition at line 370 of file ImageList.cpp.
Assignment operator.
rhs | The right hand side of the '=' operator |
Definition at line 388 of file ImageList.cpp.
References m_path.
QString Isis::ImageList::path | ( | ) | const |
Get the path to these images in the image list (relative to project root).
This only applies to an image list from the project.
Definition at line 578 of file ImageList.cpp.
References m_path.
Referenced by ImageList(), and Isis::ImageList::XmlHandler::startElement().
void Isis::ImageList::prepend | ( | Image *const & | value | ) |
Definition at line 198 of file ImageList.cpp.
void Isis::ImageList::push_back | ( | Image *const & | value | ) |
Definition at line 207 of file ImageList.cpp.
void Isis::ImageList::push_front | ( | Image *const & | value | ) |
Definition at line 216 of file ImageList.cpp.
int Isis::ImageList::removeAll | ( | Image *const & | value | ) |
Definition at line 225 of file ImageList.cpp.
void Isis::ImageList::removeAt | ( | int | i | ) |
Definition at line 239 of file ImageList.cpp.
Referenced by Isis::Project::imageClosed().
void Isis::ImageList::removeFirst | ( | ) |
Definition at line 248 of file ImageList.cpp.
void Isis::ImageList::removeLast | ( | ) |
Definition at line 257 of file ImageList.cpp.
bool Isis::ImageList::removeOne | ( | Image *const & | value | ) |
Definition at line 266 of file ImageList.cpp.
void Isis::ImageList::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot | ||
) | const |
Convert this image list into XML format for saving/restoring capabilities.
This writes:
<imageList name="..." path="...">
to the given xml stream, and creates an 'images.xml' inside the folder with the images. Inside the images.xml, this writes:
<images> ... </images>
Definition at line 616 of file ImageList.cpp.
References _FILEINFO_, Isis::Project::imageDataRoot(), Isis::IException::Io, m_path, Isis::FileName::path(), and Isis::Image::save().
|
privateslot |
Change the visibility of DNs.
This synchronizes all of the values where at least one is guaranteed to be toggled.
Definition at line 921 of file ImageList.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowDNs(), and Isis::ImageDisplayProperties::ShowDNs.
Referenced by supportedActions().
|
privateslot |
Change the visibility of the fill area.
This synchronizes all of the values where at least one is guaranteed to be toggled.
Definition at line 946 of file ImageList.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowFill(), and Isis::ImageDisplayProperties::ShowFill.
Referenced by supportedActions().
|
privateslot |
Change the visibility of the display name.
This synchronizes all of the values where at least one is guaranteed to be toggled.
Definition at line 971 of file ImageList.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowLabel(), and Isis::ImageDisplayProperties::ShowLabel.
Referenced by supportedActions().
|
privateslot |
Change the visibility of the outline.
This synchronizes all of the values where at least one is guaranteed to be toggled.
Definition at line 996 of file ImageList.cpp.
References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowOutline(), and Isis::ImageDisplayProperties::ShowOutline.
Referenced by supportedActions().
void Isis::ImageList::setName | ( | QString | newName | ) |
Set the human-readable name of this image list.
This is really only useful for project image lists (not anonymous temporary ones).
newName | The name to give this image list |
Definition at line 546 of file ImageList.cpp.
void Isis::ImageList::setPath | ( | QString | newPath | ) |
Set the relative path (from the project root) to this image list's folder.
This is really only useful for project image lists (not anonymous temporary ones).
newPath | The path to the images in this image list |
Definition at line 557 of file ImageList.cpp.
References m_path.
|
privateslot |
This applies a new semi-random color to every image's display property for every image in this image list.
Definition at line 909 of file ImageList.cpp.
References Isis::Image::displayProperties(), Isis::ImageDisplayProperties::randomColor(), and Isis::ImageDisplayProperties::setColor().
Referenced by supportedActions().
Gets a list of pre-connected actions that have to do with display, such as color, alpha, outline, fill, etc.
Definition at line 407 of file ImageList.cpp.
References allSupport(), askAndUpdateAlpha(), askAndUpdateColor(), Isis::ImageDisplayProperties::Color, Isis::Image::displayProperties(), saveAndToggleShowDNs(), saveAndToggleShowFill(), saveAndToggleShowLabel(), saveAndToggleShowOutline(), Isis::ImageDisplayProperties::ShowDNs, Isis::ImageDisplayProperties::ShowFill, Isis::ImageDisplayProperties::ShowLabel, Isis::ImageDisplayProperties::ShowOutline, showRandomColor(), Isis::ImageDisplayProperties::Zooming, and Isis::ImageDisplayProperties::ZOrdering.
Referenced by Isis::MosaicSceneItem::contextMenuEvent(), and Isis::MosaicSceneWidget::contextMenuEvent().
Definition at line 280 of file ImageList.cpp.
Image * Isis::ImageList::takeAt | ( | int | i | ) |
Definition at line 292 of file ImageList.cpp.
Image * Isis::ImageList::takeFirst | ( | ) |
Definition at line 302 of file ImageList.cpp.
Image * Isis::ImageList::takeLast | ( | ) |
Definition at line 312 of file ImageList.cpp.
|
private |
This stores the directory name that contains the images in this image list.
For example: import1 or import2
This path is relative to Project::imageDataRoot()
Definition at line 196 of file ImageList.h.
Referenced by deleteFromDisk(), ImageList(), operator=(), path(), save(), and setPath().