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

RS_LayerList Class Reference

A list of layers. More...

#include <rs_layerlist.h>

List of all members.

Public Member Functions

 RS_LayerList ()
 Default constructor.
void clear ()
 Removes all layers in the layerlist.
int count () const
RS_Layerat (int i)
void activate (const RS_String &name, bool notify=false)
 Activates the given layer.
void activate (RS_Layer *layer, bool notify=false)
 Activates the given layer.
RS_LayergetActive ()
virtual void add (RS_Layer *layer)
 Adds a layer to the layer list.
virtual void remove (RS_Layer *layer)
 Removes a layer from the list.
virtual void edit (RS_Layer *layer, const RS_Layer &source)
 Changes a layer's attributes.
RS_Layerfind (const RS_String &name)
int getIndex (const RS_String &name)
int getIndex (RS_Layer *layer)
void toggle (const RS_String &name)
 Switches on / off the given layer.
void toggle (RS_Layer *layer)
 Switches on / off the given layer.
void toggleLock (RS_Layer *layer)
 Locks or unlocks the given layer.
void freezeAll (bool freeze)
 Freezes or defreezes all layers.
void addListener (RS_LayerListListener *listener)
 adds a LayerListListener to the list of listeners.
void removeListener (RS_LayerListListener *listener)
 removes a LayerListListener from the list of listeners.
void setModified (bool m)
 Sets the layer lists modified status to 'm'.
virtual bool isModified () const


Detailed Description

A list of layers.

Author:
Andrew Mustun


Member Function Documentation

void RS_LayerList::activate RS_Layer layer,
bool  notify = false
 

Activates the given layer.

Parameters:
notify Notify listeners.

void RS_LayerList::activate const RS_String &  name,
bool  notify = false
 

Activates the given layer.

Parameters:
notify Notify listeners.

void RS_LayerList::add RS_Layer layer  )  [virtual]
 

Adds a layer to the layer list.

If there is already a layer with the same name, no layer is added. In that case the layer passed to the methode will be deleted! If no layer was active so far, the new layer becomes the active one.

Listeners are notified.

void RS_LayerList::addListener RS_LayerListListener listener  ) 
 

adds a LayerListListener to the list of listeners.

Returns:
Next layer from the list after calling firstLayer() or nextLayer().

RS_Layer* RS_LayerList::at int  i  )  [inline]
 

Returns:
Layer at given position or NULL if i is out of range.

int RS_LayerList::count  )  const [inline]
 

Returns:
Number of layers in the list.

void RS_LayerList::edit RS_Layer layer,
const RS_Layer source
[virtual]
 

Changes a layer's attributes.

The attributes of layer 'layer' are copied from layer 'source'. Listeners are notified.

RS_Layer * RS_LayerList::find const RS_String &  name  ) 
 

Returns:
Pointer to the layer with the given name or NULL if no such layer was found.

void RS_LayerList::freezeAll bool  freeze  ) 
 

Freezes or defreezes all layers.

Parameters:
freeze true: freeze, false: defreeze

RS_Layer* RS_LayerList::getActive  )  [inline]
 

Returns:
The active layer of NULL if no layer is activated.

int RS_LayerList::getIndex RS_Layer layer  ) 
 

Returns:
Index of the given layer in the layer list or -1 if the layer was not found.

int RS_LayerList::getIndex const RS_String &  name  ) 
 

Returns:
Index of the given layer in the layer list or -1 if the layer was not found.

virtual bool RS_LayerList::isModified  )  const [inline, virtual]
 

Return values:
true The layer list has been modified.
false The layer list has not been modified.

void RS_LayerList::remove RS_Layer layer  )  [virtual]
 

Removes a layer from the list.

Listeners are notified after the layer was removed from the list but before it gets deleted.

void RS_LayerList::toggle RS_Layer layer  ) 
 

Switches on / off the given layer.

Listeners are notified.

void RS_LayerList::toggle const RS_String &  name  ) 
 

Switches on / off the given layer.

Listeners are notified.

void RS_LayerList::toggleLock RS_Layer layer  ) 
 

Locks or unlocks the given layer.

Listeners are notified.


The documentation for this class was generated from the following files:
Generated on Sat Jan 6 13:48:23 2007 for qcadlib by  doxygen 1.4.4