TdkView Class Reference
[The Core Module]

Defines the class TdkView. More...

#include <TdkView.h>

Inheritance diagram for TdkView:

TdkObjectCollection TdkObject TdkEventHandler TdkPersistenceObject List of all members.

Public Member Functions

 TdkView (const TdkObjectGID &objectGID)
 Default constructor. Using TdkObject.
 TdkView (TeDatabase *db, int view_id=0)
 TdkView (TdkView &view)
virtual void operator= (TdkObject &object)
virtual TdkObjectcopy ()
 Creates a copy of the object.
virtual void import (TdkObject &object)
virtual ~TdkView ()
virtual void setGID (const TdkObjectGID &objectGID)
virtual void id (int id)
virtual int id ()
virtual void add (TeViewNode *node)
virtual int getSelectedObjects ()
virtual void getViewTreeThemeVector (std::vector< TdkTheme * > &themeVector)
virtual void getViewSubtreeThemeVector (TeViewTree *viewtree, std::vector< TdkTheme * > &themeVector)
void addTop (TeViewNode *node)
virtual TeViewNode * remove (int id)
virtual void loadVisualizationObjectsAttrs (TeViewTree *tree)
virtual bool needToLoad (TdkLoadParams &params)
 Verify if loads the object from the database is necessary.
void setAllAttrsInCache (bool allAttrsInCache)
bool getAllAttrsInCache ()
virtual void setChildren (TdkView &view)
 Sets the tree view from a given view.
virtual void unlinkThemes ()
 Unlinks the themes from the view.
virtual void unloadThemes ()
 Unlinks the themes from the view and unload from the cache.
virtual string errorMessage ()
 Returns the error message.
virtual bool isSaved ()
 Gets the map's saved state.
double getZoomFactor ()
 Gets the map's zoom factor.
void setZoomFactor (double zoomFactor)
 Sets the map's zoom factor.
virtual void setSavedState (bool isSaved)
 Sets the map's saved state.
virtual bool reload ()
 Reloads all the view information from the database.
virtual void setDescription (string desc)
 Sets the map description.
virtual string getDescription ()
 Returns the map description.
virtual bool isInScaleRange (TdkTheme *theme)
 Tells whether a theme should be drawn in the current scale.
virtual void updateVisibleRegion ()
 Updates the visible region from the display.
virtual void restoreVisibleRegion ()
 Restores (by zooming) the visible region.
virtual TeBox & getVisibleRegion ()
 Gets the visible region.
virtual void setVisibleRegion (TeBox box)
 Sets a new visible region.
virtual void setPickTol (int tol)
 Sets pick tolerance (in pixels).
virtual int getPickTol (void)
 Gets pick tolerance (in pixels).
virtual void setLegend (TdkTreeLegend *l)
 Sets the legend component associated with the map.
virtual TdkTreeLegendgetLegend ()
 Gets the legend component associated with the map.
virtual bool getTreeActivation (TeViewTree *viewtree)
 Returns true if any theme in the given view tree is active.
virtual TeViewTree * getViewTree ()
 Gets the TerraLib view tree associated with the map.
virtual void setDataView (TdkDataView *v)
 Sets the data view component associated with the map.
virtual TdkDataViewgetDataView ()
 Gets the data view component associated with the map.
virtual void setGraphDlg (TdkGraphDlg *v)
 Sets the graph component associated with the map.
virtual TdkGraphDlggetGraphDlg ()
 Gets the graph component associated with the map.
virtual TeViewNode * getSelectedNode ()
 Gets the map's selected theme.
virtual int getSelectedNodeId ()
virtual void selectNode (int themeID)
 Sets the map's selected theme.
virtual TeViewNode * getSelectedEnvolNode ()
 Gets the map's selected bounding theme.
virtual void selectEnvolNode (int themeID)
 Sets the map's selected bounding theme.
virtual bool conditionQuery (string condition)
 Selects a set of objects defined by a SQL query.
virtual void pickBox (double xc, double yc, double &xmin, double &ymin, double &xmax, double &ymax)
 Given a point, calculates the box used for picking objects (it uses the tollerance).
virtual TdkThemeObjectsTdkPickThemeObjects (TdkTheme *theme, double x0, double y0, double x1, double y1, unsigned int n=0)
 Given a box, returns all the objects in a theme that intersect that box.
virtual TdkThemeObjectsTdkCirclePickThemeObjects (TdkTheme *theme, double xc, double yc, double r, unsigned int n=0)
 Given a circle, returns all the objects in a theme that intersect that circle.
virtual TdkThemeObjectsTdkPickThemeObjects (TdkTheme *theme, TeLinearRing &ring, unsigned int n=0)
 Given a polygon, returns all the objects in a theme that intersect that polygon.
virtual TdkThemeObjectsTdkPickThemeObjectsConvert (TdkTheme *theme, TeLinearRing &ring, TeProjection *projection, unsigned int n=0)
 Given a polygon in a different projection, returns all the objects in a theme that intersect that polygon.
virtual TdkMapObjectsTdkPickViewObjects (double xc, double yc, unsigned int n=0)
 Given a point, returns all the objects in all themes that touch that point.
virtual TdkMapObjectsTdkPickViewObjects (double x0, double y0, double x1, double y1, unsigned int n=0)
 Given a box, returns all the objects in all themes that intersect that box.
virtual TdkMapObjectsTdkCirclePickViewObjects (double xc, double yc, double r, unsigned int n=0)
 Given a circle, returns all the objects in all themes that intersect that circle.
virtual TdkMapObjectsTdkPickViewObjects (TeLinearRing &ring, unsigned int n=0)
 Given a polygon, returns all the objects in all themes that intersect that polygon.
virtual TdkThemecreateThemeLayer (std::string name, int geomTypes, TeProjection *proj=NULL, bool top=false)
 Creates an empty layer and a theme in the map associated with it.
TdkThemecreateThemeLayer (std::string name, int geomTypes, bool top)
virtual TdkThemecreateTheme (std::string name, int layerID, string whereClause="", TeViewTree *group=NULL, bool top=false)
 Creates a theme in the map.
TdkThemecreateTheme (std::string name, int layerID, bool top)
virtual TeViewTree * createGroup (string name, TeViewTree *tree=NULL, bool top=false)
 Creates a theme group in the map.
virtual TdkThemegetTheme (int themeID)
 Tries to find a theme in the map given its id.
virtual TdkThemegetTheme (std::string themeName)
 Tries to find a theme in the map given its name.
virtual TeViewTree * getGroup (int themeID)
 Tries to find a group in the map given the id of the TerraLib view tree.
virtual TeViewTree * getGroup (string themeName)
 Tries to find a group in the map given its name.
virtual TeViewNode * getNode (int nodeID)
 Tries to find a node in the map given the id of the TerraLib view tree.
bool layerHasTheme (int layerID)
TdkThemegetLayerFirstTheme (int layerID)
virtual bool deleteThemeLayer (int themeID)
 Removes a theme from the map and deletes it and its layer from the database.
virtual bool deleteTheme (int themeID)
 Removes a theme from the map and deletes it from the database.
virtual bool deleteGroup (int groupID)
 Removes a group and averything inside it from the map and from the database.
virtual std::string getStringAttr (std::string attr_name)
 Returns the value for the given attribute. The attribute type must be string.
virtual void setStringAttr (std::string attr_name, std::string value)
 Sets the value for the given attribute. The attribute type must be string.
virtual int getIntegerAttr (std::string attr_name)
 Returns the value for the given attribute. The attribute type must be integer.
virtual void setIntegerAttr (std::string attr_name, int value)
 Gets the value for the given attribute. The attribute type must be integer.
virtual void clearThemesCaches ()

Protected Member Functions

virtual void getSelectedObjects (TeViewTree *viewtree, TdkObjectGIDMap &viewSelectedObjects)
 Gets the viewtree selected objects.
virtual bool insert (TeDatabase *dbCaller, TdkPersistenceParams &params)
 Inserts the object in the database.
virtual bool load (TeDatabase *dbCaller, TdkLoadParams &params)
 Updates the object in the database.
virtual bool update (TeDatabase *dbCaller, TdkPersistenceParams &params)
 Updates the object in the database.
virtual void remove (TeDatabase *dbCaller, TdkPersistenceParams &params)
 Removes the object from the database.
virtual void loadChildren (TeDatabase *dbCaller, TdkLoadParams &params)
virtual void loadCompleteViewTree (TeDatabase *dbCaller, TeViewTree *tree, TdkLoadParams params)
virtual void loadCompleteViewTree (TeDatabase *dbCaller, TdkLoadParams params)
virtual void handleVSEvent (TdkEvent &event)
virtual void handleVSEvent (TdkSelectObjectsEvent &event)
virtual void handleVSEvent (TdkSelectObjectsGIDVectorEvent &event)
virtual void handleVSEvent (TdkPickEvent &event)
virtual void handleVSEvent (TdkViewBBoxEvent &event)
virtual void handleVSEvent (TdkRestoreVisibleRegionEvent &event)
virtual void handleVSEvent (TdkRestoreInitialVisibleRegionEvent &event)
virtual void handleVSEvent (TdkVisibleRegionEvent &event)
void unlinkTreeThemes (TeViewTree *tree)
void unloadTreeThemes (TeViewTree *tree)

Protected Attributes

string errorMessage_
TdkTreeLegendlegend_
 associated legend
TdkDataViewdataView_
 associated dataview
TdkGraphDlggraphDlg_
 associated graphdlg
int selectedThemeId_
TeViewNode * selectedEnvolNode_
string desc_
TeBox visibleRegion_
TeBox currentVisibleRegion_
double zoomFactor_
 Zoom factor used by the zoomIn and zoomOut operations.
int pickTol_
 Pick tolerance in pixels.
bool isSaved_
bool allAttrsInCache_

Private Member Functions

void init ()
void updateDataView (TdkThemeObjects *thobjs, bool ctrl_pressed)
void updateGraph ()
void rebuildAll ()

Private Attributes

unsigned int maxPick_
 Maximun number of elements by the pick operation.

Detailed Description

Defines the class TdkView.

This class a crucial component in the tdk architecture. It is responsible for representing a map and controlling all the communication between components that are associated with one map (legend, map display, data view_ and graph dialog), for that reason it keeps pointers to all these classes. Every time one component modifies the map somehow, the other components must be warned and this is acomplished by the TdkView class.


Constructor & Destructor Documentation

TdkView::TdkView ( const TdkObjectGID objectGID  ) 

Default constructor. Using TdkObject.

TdkView::TdkView ( TeDatabase *  db,
int  view_id = 0 
)

TdkView::TdkView ( TdkView view  ) 

TdkView::~TdkView (  )  [virtual]


Member Function Documentation

void TdkView::getSelectedObjects ( TeViewTree *  viewtree,
TdkObjectGIDMap viewSelectedObjects 
) [protected, virtual]

Gets the viewtree selected objects.

bool TdkView::insert ( TeDatabase *  dbCaller,
TdkPersistenceParams params 
) [protected, virtual]

Inserts the object in the database.

Reimplemented from TdkObjectCollection.

bool TdkView::load ( TeDatabase *  dbCaller,
TdkLoadParams params 
) [protected, virtual]

Updates the object in the database.

Reimplemented from TdkObjectCollection.

bool TdkView::update ( TeDatabase *  dbCaller,
TdkPersistenceParams params 
) [protected, virtual]

Updates the object in the database.

Reimplemented from TdkObjectCollection.

void TdkView::remove ( TeDatabase *  dbCaller,
TdkPersistenceParams params 
) [protected, virtual]

Removes the object from the database.

Reimplemented from TdkObjectCollection.

void TdkView::loadChildren ( TeDatabase *  dbCaller,
TdkLoadParams params 
) [protected, virtual]

Reimplemented from TdkObjectCollection.

void TdkView::loadCompleteViewTree ( TeDatabase *  dbCaller,
TeViewTree *  tree,
TdkLoadParams  params 
) [protected, virtual]

void TdkView::loadCompleteViewTree ( TeDatabase *  dbCaller,
TdkLoadParams  params 
) [protected, virtual]

void TdkView::handleVSEvent ( TdkEvent event  )  [protected, virtual]

Reimplemented from TdkEventHandler.

void TdkView::handleVSEvent ( TdkSelectObjectsEvent event  )  [protected, virtual]

void TdkView::handleVSEvent ( TdkSelectObjectsGIDVectorEvent event  )  [protected, virtual]

void TdkView::handleVSEvent ( TdkPickEvent event  )  [protected, virtual]

void TdkView::handleVSEvent ( TdkViewBBoxEvent event  )  [protected, virtual]

void TdkView::handleVSEvent ( TdkRestoreVisibleRegionEvent event  )  [protected, virtual]

void TdkView::handleVSEvent ( TdkRestoreInitialVisibleRegionEvent event  )  [protected, virtual]

void TdkView::handleVSEvent ( TdkVisibleRegionEvent event  )  [protected, virtual]

void TdkView::unlinkTreeThemes ( TeViewTree *  tree  )  [protected]

void TdkView::unloadTreeThemes ( TeViewTree *  tree  )  [protected]

void TdkView::operator= ( TdkObject object  )  [virtual]

Reimplemented from TdkObjectCollection.

TdkObject * TdkView::copy (  )  [virtual]

Creates a copy of the object.

Reimplemented from TdkObjectCollection.

void TdkView::import ( TdkObject object  )  [virtual]

Reimplemented from TdkObjectCollection.

void TdkView::setGID ( const TdkObjectGID objectGID  )  [virtual]

Reimplemented from TdkObjectCollection.

void TdkView::id ( int  id  )  [virtual]

virtual int TdkView::id (  )  [inline, virtual]

void TdkView::add ( TeViewNode *  node  )  [virtual]

int TdkView::getSelectedObjects (  )  [virtual]

Returns the number of selected objects of the view themes

void TdkView::getViewTreeThemeVector ( std::vector< TdkTheme * > &  themeVector  )  [virtual]

Add the given node to at the top of the view tree.

Parameters:
node node to be added

void TdkView::getViewSubtreeThemeVector ( TeViewTree *  viewtree,
std::vector< TdkTheme * > &  themeVector 
) [virtual]

void TdkView::addTop ( TeViewNode *  node  ) 

Add the given node to at the top of the view tree.

Parameters:
node node to be added

TeViewNode * TdkView::remove ( int  id  )  [virtual]

void TdkView::loadVisualizationObjectsAttrs ( TeViewTree *  tree  )  [virtual]

bool TdkView::needToLoad ( TdkLoadParams params  )  [virtual]

Verify if loads the object from the database is necessary.

Reimplemented from TdkObjectCollection.

void TdkView::setAllAttrsInCache ( bool  allAttrsInCache  ) 

bool TdkView::getAllAttrsInCache (  ) 

void TdkView::setChildren ( TdkView view  )  [virtual]

Sets the tree view from a given view.

void TdkView::unlinkThemes (  )  [virtual]

Unlinks the themes from the view.

void TdkView::unloadThemes (  )  [virtual]

Unlinks the themes from the view and unload from the cache.

std::string TdkView::errorMessage (  )  [inline, virtual]

Returns the error message.

The error message is relative to the last error that occurred in any method of this class.

bool TdkView::isSaved (  )  [virtual]

Gets the map's saved state.

Returns:
If all the map information is saved returns true otherwise returns false.

double TdkView::getZoomFactor (  ) 

Gets the map's zoom factor.

void TdkView::setZoomFactor ( double  zoomFactor  ) 

Sets the map's zoom factor.

void TdkView::setSavedState ( bool  isSaved  )  [virtual]

Sets the map's saved state.

Parameters:
isSaved Whether the map is saved or not.

bool TdkView::reload (  )  [virtual]

Reloads all the view information from the database.

Returns:
If success returns true otherwise returns false.

void TdkView::setDescription ( string  desc  )  [virtual]

Sets the map description.

string TdkView::getDescription (  )  [virtual]

Returns the map description.

bool TdkView::isInScaleRange ( TdkTheme theme  )  [virtual]

Tells whether a theme should be drawn in the current scale.

Parameters:
theme The TerraLib theme.
Returns:
If the theme should be drawn returns true otherwise returns false.

void TdkView::updateVisibleRegion (  )  [virtual]

Updates the visible region from the display.

void TdkView::restoreVisibleRegion (  )  [virtual]

Restores (by zooming) the visible region.

TeBox & TdkView::getVisibleRegion (  )  [virtual]

Gets the visible region.

void TdkView::setVisibleRegion ( TeBox  box  )  [virtual]

Sets a new visible region.

void TdkView::setPickTol ( int  tol  )  [virtual]

Sets pick tolerance (in pixels).

int TdkView::getPickTol ( void   )  [virtual]

Gets pick tolerance (in pixels).

void TdkView::setLegend ( TdkTreeLegend l  )  [virtual]

Sets the legend component associated with the map.

TdkTreeLegend * TdkView::getLegend (  )  [virtual]

Gets the legend component associated with the map.

bool TdkView::getTreeActivation ( TeViewTree *  viewtree  )  [virtual]

Returns true if any theme in the given view tree is active.

TeViewTree * TdkView::getViewTree (  )  [virtual]

Gets the TerraLib view tree associated with the map.

void TdkView::setDataView ( TdkDataView v  )  [virtual]

Sets the data view component associated with the map.

TdkDataView * TdkView::getDataView (  )  [virtual]

Gets the data view component associated with the map.

void TdkView::setGraphDlg ( TdkGraphDlg v  )  [virtual]

Sets the graph component associated with the map.

TdkGraphDlg * TdkView::getGraphDlg (  )  [virtual]

Gets the graph component associated with the map.

TeViewNode * TdkView::getSelectedNode (  )  [virtual]

Gets the map's selected theme.

Returns:
The TerraLib TeViewNode pointer to the theme.

virtual int TdkView::getSelectedNodeId (  )  [inline, virtual]

void TdkView::selectNode ( int  themeID  )  [virtual]

Sets the map's selected theme.

Parameters:
themeID The theme's id.

TeViewNode * TdkView::getSelectedEnvolNode (  )  [virtual]

Gets the map's selected bounding theme.

Returns:
The TerraLib TeViewNode pointer to the theme.

void TdkView::selectEnvolNode ( int  themeID  )  [virtual]

Sets the map's selected bounding theme.

Parameters:
themeID The theme's id.

bool TdkView::conditionQuery ( string  condition  )  [virtual]

Selects a set of objects defined by a SQL query.

Parameters:
condition The where clause of the SQL.

void TdkView::pickBox ( double  xc,
double  yc,
double &  xmin,
double &  ymin,
double &  xmax,
double &  ymax 
) [virtual]

Given a point, calculates the box used for picking objects (it uses the tollerance).

Parameters:
xc The x world coordinate of the pick point.
yc The y world coordinate of the pick point.
xmin The returned top left x world coordinate of the box.
ymin The returned top left y world coordinate of the box.
xmax The returned bottom right x world coordinate of the box.
ymax The returned bottom right y world coordinate of the box.

TdkThemeObjects * TdkView::TdkPickThemeObjects ( TdkTheme theme,
double  x0,
double  y0,
double  x1,
double  y1,
unsigned int  n = 0 
) [virtual]

Given a box, returns all the objects in a theme that intersect that box.

Parameters:
theme The TerraLib theme.
x0 The top left x world coordinate of the box.
y0 The top left y world coordinate of the box.
x1 The bottom right x world coordinate of the box.
y1 The bottom right y world coordinate of the box.
n Maximum number of objects to be returned.
Returns:
The TdkThemeObjects object containing the list of object id's.

TdkThemeObjects * TdkView::TdkCirclePickThemeObjects ( TdkTheme theme,
double  xc,
double  yc,
double  r,
unsigned int  n = 0 
) [virtual]

Given a circle, returns all the objects in a theme that intersect that circle.

Parameters:
theme The TerraLib theme.
xc The x world coordinate of the circle's center.
yc The y world coordinate of the circle's center.
r The circle's radius in world coordinates.
n Maximum number of objects to be returned.
Returns:
The TdkThemeObjects object containing the list of object id's.

TdkThemeObjects * TdkView::TdkPickThemeObjects ( TdkTheme theme,
TeLinearRing &  ring,
unsigned int  n = 0 
) [virtual]

Given a polygon, returns all the objects in a theme that intersect that polygon.

Parameters:
theme The TerraLib theme.
ring The TerraLib ring defining the polygon.
n Maximum number of objects to be returned.
Returns:
The TdkThemeObjects object containing the list of object id's.

TdkThemeObjects * TdkView::TdkPickThemeObjectsConvert ( TdkTheme theme,
TeLinearRing &  ring,
TeProjection *  projection,
unsigned int  n = 0 
) [virtual]

Given a polygon in a different projection, returns all the objects in a theme that intersect that polygon.

Parameters:
theme The TerraLib theme.
ring The TerraLib ring defining the polygon.
projection The polygon's TerraLib projection.
n Maximum number of objects to be returned.
Returns:
The TdkThemeObjects object containing the list of object id's.

TdkMapObjects * TdkView::TdkPickViewObjects ( double  xc,
double  yc,
unsigned int  n = 0 
) [virtual]

Given a point, returns all the objects in all themes that touch that point.

Parameters:
xc The x world coordinate of the point.
xc The y world coordinate of the point.
n Maximum number of objects to be returned.
Returns:
The TdkMapObjects object containing the list of object id's in each theme.

TdkMapObjects * TdkView::TdkPickViewObjects ( double  x0,
double  y0,
double  x1,
double  y1,
unsigned int  n = 0 
) [virtual]

Given a box, returns all the objects in all themes that intersect that box.

Parameters:
x0 The top left x world coordinate of the box.
y0 The top left y world coordinate of the box.
x1 The bottom right x world coordinate of the box.
y1 The bottom right y world coordinate of the box.
n Maximum number of objects to be returned.
Returns:
The TdkMapObjects object containing the list of object id's in each theme.

TdkMapObjects * TdkView::TdkCirclePickViewObjects ( double  xc,
double  yc,
double  r,
unsigned int  n = 0 
) [virtual]

Given a circle, returns all the objects in all themes that intersect that circle.

Parameters:
xc The x world coordinate of the circle's center.
yc The y world coordinate of the circle's center.
r The circle's radius in world coordinates.
n Maximum number of objects to be returned.
Returns:
The TdkMapObjects object containing the list of object id's in each theme.

TdkMapObjects * TdkView::TdkPickViewObjects ( TeLinearRing &  ring,
unsigned int  n = 0 
) [virtual]

Given a polygon, returns all the objects in all themes that intersect that polygon.

Parameters:
ring The TerraLib ring defining the polygon.
n Maximum number of objects to be returned.
Returns:
The TdkMapObjects object containing the list of object id's in each theme.

virtual TdkTheme* TdkView::createThemeLayer ( std::string  name,
int  geomTypes,
TeProjection *  proj = NULL,
bool  top = false 
) [virtual]

Creates an empty layer and a theme in the map associated with it.

Parameters:
name The name of the theme and layer.
geomTypes The types of geometries (in TerraLib representation) supported by the layer.
projection The layer's data projection (TerraLib projection), if it is NULL the map projection is assumed.
top indicate if the created theme should be at the top of the view tree or at the bottom
Returns:
created theme

TdkTheme * TdkView::createThemeLayer ( std::string  name,
int  geomTypes,
bool  top 
) [inline]

virtual TdkTheme* TdkView::createTheme ( std::string  name,
int  layerID,
string  whereClause = "",
TeViewTree *  group = NULL,
bool  top = false 
) [virtual]

Creates a theme in the map.

Parameters:
name The name of the theme.
layerID The id of the layer to be associated with the theme.
whereClause SQL where clause defining the subset of objects of the layer represented by the theme (empty string to represent all the objects of the layer).
group The TerraLib TeViewTree object defining the group in which the theme should be created (NULL to be created in the root).
top indicate if the created theme should be at the top of the view tree or at the bottom
Returns:
created theme

TdkTheme * TdkView::createTheme ( std::string  name,
int  layerID,
bool  top 
) [inline]

TeViewTree * TdkView::createGroup ( string  name,
TeViewTree *  tree = NULL,
bool  top = false 
) [virtual]

Creates a theme group in the map.

Parameters:
name The name of the group.
tree The TerraLib TeViewTree object defining the group in which the group should be created (NULL to be created in the root).
Returns:
The TerraLib view tree representing the group just created or NULL in the case of an error.

TdkTheme * TdkView::getTheme ( int  themeID  )  [virtual]

Tries to find a theme in the map given its id.

Parameters:
themeID The id.
Returns:
The TerraLib theme or NULL in the case it was not found.

virtual TdkTheme* TdkView::getTheme ( std::string  themeName  )  [virtual]

Tries to find a theme in the map given its name.

Parameters:
themeName The name.
Returns:
The TerraLib theme or NULL in the case it was not found.

TeViewTree * TdkView::getGroup ( int  themeID  )  [virtual]

Tries to find a group in the map given the id of the TerraLib view tree.

Parameters:
themeID The id.
Returns:
The TerraLib view tree or NULL in the case it was not found.

TeViewTree * TdkView::getGroup ( string  themeName  )  [virtual]

Tries to find a group in the map given its name.

Parameters:
themeName The name.
Returns:
The TerraLib view tree or NULL in the case it was not found.

TeViewNode * TdkView::getNode ( int  nodeID  )  [virtual]

Tries to find a node in the map given the id of the TerraLib view tree.

Parameters:
nodeID The id.
Returns:
The TerraLib view tree or NULL in the case it was not found.

bool TdkView::layerHasTheme ( int  layerID  ) 

TdkTheme * TdkView::getLayerFirstTheme ( int  layerID  ) 

bool TdkView::deleteThemeLayer ( int  themeID  )  [virtual]

Removes a theme from the map and deletes it and its layer from the database.

Parameters:
themeID The theme's id.
Returns:
In the case of success returns true otherwise returns false.

bool TdkView::deleteTheme ( int  themeID  )  [virtual]

Removes a theme from the map and deletes it from the database.

Parameters:
themeID The theme's id.
Returns:
In the case of success returns true otherwise returns false.

bool TdkView::deleteGroup ( int  groupID  )  [virtual]

Removes a group and averything inside it from the map and from the database.

Parameters:
groupID The group's id (the id of the TerraLib view tree).
Returns:
In the case of success returns true otherwise returns false.

std::string TdkView::getStringAttr ( std::string  attr_name  )  [virtual]

Returns the value for the given attribute. The attribute type must be string.

Reimplemented from TdkObjectCollection.

void TdkView::setStringAttr ( std::string  attr_name,
std::string  value 
) [virtual]

Sets the value for the given attribute. The attribute type must be string.

Reimplemented from TdkObjectCollection.

int TdkView::getIntegerAttr ( std::string  attr_name  )  [virtual]

Returns the value for the given attribute. The attribute type must be integer.

Reimplemented from TdkObjectCollection.

void TdkView::setIntegerAttr ( std::string  attr_name,
int  value 
) [virtual]

Gets the value for the given attribute. The attribute type must be integer.

Reimplemented from TdkObjectCollection.

void TdkView::clearThemesCaches (  )  [virtual]

void TdkView::init (  )  [private]

void TdkView::updateDataView ( TdkThemeObjects thobjs,
bool  ctrl_pressed 
) [private]

void TdkView::updateGraph (  )  [private]

void TdkView::rebuildAll (  )  [private]


Member Data Documentation

string TdkView::errorMessage_ [protected]

TdkTreeLegend* TdkView::legend_ [protected]

associated legend

TdkDataView* TdkView::dataView_ [protected]

associated dataview

TdkGraphDlg* TdkView::graphDlg_ [protected]

associated graphdlg

int TdkView::selectedThemeId_ [protected]

TeViewNode* TdkView::selectedEnvolNode_ [protected]

string TdkView::desc_ [protected]

TeBox TdkView::visibleRegion_ [protected]

TeBox TdkView::currentVisibleRegion_ [protected]

double TdkView::zoomFactor_ [protected]

Zoom factor used by the zoomIn and zoomOut operations.

int TdkView::pickTol_ [protected]

Pick tolerance in pixels.

bool TdkView::isSaved_ [protected]

bool TdkView::allAttrsInCache_ [protected]

unsigned int TdkView::maxPick_ [private]

Maximun number of elements by the pick operation.


The documentation for this class was generated from the following files:
Generated on Fri Jun 15 16:54:59 2007 for TDK by  doxygen 1.5.2