Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgLayerSet Class Reference
[Library]

#include <omglayerset.h>

Inheritance diagram for OmgLayerSet:

Inheritance graph
[legend]
Collaboration diagram for OmgLayerSet:

Collaboration graph
[legend]
List of all members.

Detailed Description

A layerset is a container for a collection of layer objects.

Author:
Tim Sutton

Definition at line 31 of file omglayerset.h.

Public Types

typedef QMap< QString, OmgLayerLayersMap

Public Member Functions

 OmgLayerSet ()
 ~OmgLayerSet ()
bool addLayer (OmgLayer theLayer)
bool removeLayer (OmgLayer theLayer)
bool removeLayer (QString theLayer)
QString name () const
QString description () const
OmgLayer mask () const
QStringList nameList () const
LayersMap layers () const
void setName (QString theName)
void setDescription (QString theDescription)
void setMask (OmgLayer theMask)
QString maskName () const
int count () const
QString toString () const
QString toXml () const
bool fromXml (const QString)
QString toHtml () const
bool save (QString theFileName="") const

Private Attributes

QString mName
QString mDescription
OmgLayer mMask
LayersMap mLayersMap


Member Typedef Documentation

typedef QMap<QString,OmgLayer> OmgLayerSet::LayersMap
 

Definition at line 65 of file omglayerset.h.


Constructor & Destructor Documentation

OmgLayerSet::OmgLayerSet  ) 
 

Constructor .

Definition at line 28 of file omglayerset.cpp.

OmgLayerSet::~OmgLayerSet  ) 
 

Desctructor .

Definition at line 32 of file omglayerset.cpp.


Member Function Documentation

bool OmgLayerSet::addLayer OmgLayer  theLayer  ) 
 

Add a layer to the layerset

See also:
OmgLayer

Definition at line 36 of file omglayerset.cpp.

References mLayersMap, and OmgLayer::name().

Referenced by fromXml(), OmgLayerSetManager::on_pbnApply_clicked(), OmgModel::setCreationLayerNames(), and OmgModel::setProjectionLayerNames().

Here is the call graph for this function:

int OmgLayerSet::count  )  const
 

Retrun the count of layers in the layerset - excluding the mask

Definition at line 98 of file omglayerset.cpp.

References mLayersMap.

Referenced by toXml().

QString OmgLayerSet::description  )  const
 

Definition at line 61 of file omglayerset.cpp.

References mDescription.

Referenced by OmgLayerSetManager::on_pbnImport_clicked(), and OmgLayerSetManager::selectLayerSet().

bool OmgLayerSet::fromXml const   QString  ) 
 

Initialise this layerset from an xml representation of this LayerSet

See also:
OmgSerialisable

Definition at line 173 of file omglayerset.cpp.

References addLayer(), mDescription, mName, OmgLayer::setCategorical(), OmgGuid::setGuid(), setMask(), OmgLayer::setName(), and Omgui::xmlDecode().

Referenced by OmgModel::fromXml().

Here is the call graph for this function:

OmgLayerSet::LayersMap OmgLayerSet::layers  )  const
 

Return a copy of the internal qmap with all associated layers in it

Definition at line 116 of file omglayerset.cpp.

References mLayersMap.

Referenced by OmgLayerSetManager::selectLayerSet().

OmgLayer OmgLayerSet::mask  )  const
 

Definition at line 65 of file omglayerset.cpp.

References mMask.

Referenced by OmgLayerSetManager::selectLayerSet().

QString OmgLayerSet::maskName  )  const
 

Return the name of the mask layer

Definition at line 93 of file omglayerset.cpp.

References mMask, and OmgLayer::name().

Referenced by OmgModel::creationMaskLayerName(), OmgModel::projectionMaskLayerName(), and OmgModel::toString().

Here is the call graph for this function:

QString OmgLayerSet::name  )  const
 

The name of this layer - usually a full pathname and file name though this may vary depending on the OmgModellerAdapter implementations

Definition at line 57 of file omglayerset.cpp.

References mName.

Referenced by Omgui::getAvailableLayerSets(), OmgExperimentDesigner::OmgExperimentDesigner(), OmgLayerSetManager::on_pbnApply_clicked(), OmgLayerSetManager::on_pbnImport_clicked(), OmgLayerSetManager::on_toolCopy_clicked(), OmgLayerSetManager::refreshLayerSetTable(), OmgLayerSetManager::selectLayerSet(), and OmgModel::toPrintHtml().

QStringList OmgLayerSet::nameList  )  const
 

Helper method to return a name list of all the non mask layer names.

Definition at line 120 of file omglayerset.cpp.

References mLayersMap, and OmgLayer::name().

Referenced by OmgModel::creationLayerNames(), OmgModel::projectionLayerNames(), and OmgExperimentDesigner::refreshMapFormatCombo().

Here is the call graph for this function:

bool OmgLayerSet::removeLayer QString  theLayer  ) 
 

Overloaded method to remove a layer from the layerset given only its layername.

Definition at line 47 of file omglayerset.cpp.

References mLayersMap.

bool OmgLayerSet::removeLayer OmgLayer  theLayer  ) 
 

Remove a layer from the layerset

See also:
OmgLayer

Definition at line 42 of file omglayerset.cpp.

References mLayersMap, and OmgLayer::name().

Here is the call graph for this function:

bool OmgLayerSet::save QString  theFileName = ""  )  const
 

Save the layerset to disk. If no filename is specified it will save itself into the users layersets dir using guid as the base for its filename.

Parameters:
theFileName - a name for the file (not required)
Returns:
bool - true if save succeeded

Definition at line 220 of file omglayerset.cpp.

References OmgGuid::guid(), toXml(), and Omgui::userLayersetDirPath().

Referenced by OmgLayerSetManager::on_pbnApply_clicked(), OmgLayerSetManager::on_pbnImport_clicked(), and OmgLayerSetManager::on_toolCopy_clicked().

Here is the call graph for this function:

void OmgLayerSet::setDescription QString  theDescription  ) 
 

Set a description for the layerset

See also:
description()

Definition at line 78 of file omglayerset.cpp.

References mDescription.

Referenced by OmgLayerSetManager::on_pbnApply_clicked(), and OmgLayerSetManager::on_pbnImport_clicked().

void OmgLayerSet::setMask OmgLayer  theMask  ) 
 

Set the mask layer for this layerset. A mask is defined by the non null cells in a gdal dataset.

Definition at line 82 of file omglayerset.cpp.

References mMask.

Referenced by fromXml(), OmgLayerSetManager::on_pbnApply_clicked(), OmgModel::setcreationMaskLayerName(), and OmgModel::setProjectionMaskLayerName().

void OmgLayerSet::setName QString  theName  ) 
 

Set the layerSet Name

See also:
name()

Definition at line 74 of file omglayerset.cpp.

References mName.

Referenced by OmgLayerSetManager::on_pbnApply_clicked(), OmgLayerSetManager::on_pbnImport_clicked(), and OmgLayerSetManager::on_toolCopy_clicked().

QString OmgLayerSet::toHtml  )  const
 

Return an html representation of this LayerSet e.g.

Definition at line 155 of file omglayerset.cpp.

References mDescription, mLayersMap, mMask, mName, and OmgLayer::name().

Referenced by OmgExperimentPrinter::run(), and OmgModel::toHtml().

Here is the call graph for this function:

QString OmgLayerSet::toString  )  const
 

Return a string representation of this LayerSet

Definition at line 103 of file omglayerset.cpp.

References OmgGuid::guid(), mDescription, mLayersMap, mName, and OmgLayer::name().

Referenced by OmgModel::toString().

Here is the call graph for this function:

QString OmgLayerSet::toXml  )  const [virtual]
 

Return an xml representation of this LayerSet

See also:
OmgSerialisable

Implements OmgSerialisable.

Definition at line 133 of file omglayerset.cpp.

References count(), OmgGuid::guid(), mDescription, mLayersMap, mMask, mName, OmgLayer::name(), and OmgLayer::toXml().

Referenced by OmgModel::projectionLayersXml(), save(), OmgModel::toModelCreationXml(), OmgModel::toModelProjectionXml(), and OmgModel::toXml().

Here is the call graph for this function:


Member Data Documentation

QString OmgLayerSet::mDescription [private]
 

Definition at line 133 of file omglayerset.h.

Referenced by description(), fromXml(), setDescription(), toHtml(), toString(), and toXml().

LayersMap OmgLayerSet::mLayersMap [private]
 

Definition at line 135 of file omglayerset.h.

Referenced by addLayer(), count(), layers(), nameList(), removeLayer(), toHtml(), toString(), and toXml().

OmgLayer OmgLayerSet::mMask [private]
 

Definition at line 134 of file omglayerset.h.

Referenced by mask(), maskName(), setMask(), toHtml(), and toXml().

QString OmgLayerSet::mName [private]
 

Definition at line 132 of file omglayerset.h.

Referenced by fromXml(), name(), setName(), toHtml(), toString(), and toXml().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:13:19 2008 for openModellerDesktop by  doxygen 1.4.1-20050210