| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions
PluginParameters Class Reference

A class to deal with plugin parameters. More...

`#include <PluginParameters.h>`

List of all members.

## Public Types

Function pointers type definitions.
Type definitions for pointers to internal TerraView plugin support functions.
typedef std::string(* | getCurrentUserPtrFPT )(const PluginParameters &)
| A type definition to a function to get the current database pointer.
typedef TeDatabase *(* | getCurrentDatabasePtrFPT )(const PluginParameters &)
| A type definition to a function to get the current database pointer.
typedef TeLayer *(* | getCurrentLayerPtrFPT )(const PluginParameters &)
| A type definition to a function to get the current layer pointer.
typedef TeView *(* | getCurrentViewPtrFPT )(const PluginParameters &)
| A type definition to a function to get the current view pointer.
typedef TeAppTheme *(* | getCurrentThemeAppPtrFPT )(const PluginParameters &)
| A type definition to a function to get the current theme application pointer.
typedef void(* | setCurrentThemeAppPtrFPT )(TeAppTheme *, const PluginParameters &)
| A type definition to a function to get the current theme application pointer.
typedef void(* | updateTVInterfaceFPT )(const PluginParameters &)
| A type definition to a function to reload the database and update the TerraView interface (terraViewBase).
typedef void(* | plotTVDataFPT )(const PluginParameters &)
| A type definition to a function to plot data in TerraView interface (terraViewBase).
typedef void(* | setPluginMetadataFPT )(const PluginParameters &, const PluginMetadata &)
| A type definition to a function set the plugin metadata in TerraView interface (terraViewBase).
typedef bool(* | loadTranslationFileFPT )(const PluginParameters &, const std::string &)
| A type definition to a function to load the translation file dictionary into TerraView translation tables.
typedef void(* | updatePluginParametersFPT )(PluginParameters &)
| DEPRECATED - A pointer to a function to update the supllied parameters with the current TerraView interface state.

## Public Member Functions

Class constructors/destructor.
Class constructors/destructor.
| PluginParameters ()
| Default constructor.
| PluginParameters (QMainWindow *qtmain_widget_ptr, TeProgressBase *teprogressbase_ptr, TeQtDatabasesListView *teqtdatabaseslistview_ptr, TeQtViewsListView *teqtviewslistview_ptr, TeQtGrid *teqtgrid_ptr, TeQtCanvas *teqtcanvas_ptr, TeDatabase *current_database_ptr, TeLayer *current_layer_ptr, TeView *current_view_ptr, TeAppTheme *current_theme_ptr, TeCommunicator< PluginsSignal > *signal_emitter, bool use_collection, std::string currentPluginName, std::string currentUser, getCurrentDatabasePtrFPT getCurrentDatabasePtrFP, getCurrentLayerPtrFPT getCurrentLayerPtrFP, getCurrentViewPtrFPT getCurrentViewPtrFP, getCurrentThemeAppPtrFPT getCurrentThemeAppPtrFP, setCurrentThemeAppPtrFPT setCurrentThemeAppPtrFP, updateTVInterfaceFPT updateTVInterfaceFP, loadTranslationFileFPT loadTranslationFileFP, updatePluginParametersFPT updatePluginParametersFP, plotTVDataFPT plotTVDataFP, setPluginMetadataFPT setPluginMetadataFP, getCurrentUserPtrFPT getCurrentUserPtrFP)
| Alternative constructor.
| ~PluginParameters ()
| Default destructor.
TerraView interaction Methods.
Methods to interact with TerraView main widget.
std::string | getCurrentUserPtr () const
| Returns the current user.
TeDatabase * | getCurrentDatabasePtr () const
| Returns the current database pointer.
TeLayer * | getCurrentLayerPtr () const
| Returns the current layer pointer.
TeView * | getCurrentViewPtr () const
| Returns the current view pointer.
TeAppTheme * | getCurrentThemeAppPtr () const
| Returns the current theme application pointer.
void | setCurrentThemeAppPtr (TeAppTheme *)
| Returns the current theme application pointer.
void | updateTVInterface (const PluginParameters &pp) const
| DEPRECATED - A function to reload the database and update the TerraView interface (terraViewBase) ( always valid ).
void | updateTVInterface () const
| A function to reload the database and update the TerraView interface (terraViewBase).
void | plotTVData () const
| A function to plot data on TerraView interface (terraViewBase).
void | setPluginMetadata (const PluginMetadata &pluginMetadata) const
| Used by the plugin to set its metadata to the application.
bool | loadTranslationFile (const PluginParameters &pp, const std::string &filename) const
| DEPRECATED - A pointer to a function to load the translation file dictionary into TerraView translation tables ( always valid ).
bool | loadTranslationFile (const std::string &filename) const
| A pointer to a function to load the translation file dictionary into TerraView translation tables ( always valid ).
void | updatePluginParameters (PluginParameters &pp) const
| DEPRECATED - A function to update the supllied parameters with the current TerraView interface state.
bool | useCollection () const
| If TRUE, collection must be used to draw the theme.

## Static Public Member Functions

static std::string | getVersion ()
| A function to get the parameters version.

## Public Attributes

Object instance pointers
Pointers to internal TerraView object instances.
QMainWindow * | qtmain_widget_ptr_
| A pointer to the current main widget instance (always valid).
TeProgressBase * | teprogressbase_ptr_
| The current progress base active instance pointer ( always valid ).
TeQtDatabasesListView * | teqtdatabaseslistview_ptr_
| The current databases list view pointer ( always valid ).
TeQtViewsListView * | teqtviewslistview_ptr_
| The current views list view pointer ( always valid ).
TeQtGrid * | teqtgrid_ptr_
| The current grid instance pointer ( always valid ).
TeQtCanvas * | teqtcanvas_ptr_
| The current theme application instance pointer ( always valid ).
TeDatabase * | current_database_ptr_
| DEPRECATED - The current database instance pointer.
TeLayer * | current_layer_ptr_
| DEPRECATED - The current layer instance pointer.
TeView * | current_view_ptr_
| DEPRECATED - The current view instance pointer.
TeAppTheme * | current_theme_ptr_
| DEPRECATED - The current theme application instance pointer ( always valid ).
TeCommunicator< PluginsSignal > * | signal_emitter_
| A pointer to plugins emitter singleton ( always valid ).
bool | use_collection_
| If TRUE, the theme must be draw using the collection. If FALSE, it will be draw using its only restrictions clauses.
std::string | currentPluginName_
| Stores the name of the plugin that is currently being loaded. Used to request the current plugin information.
std::string | currentUser_
| Stores the name of the current user. Views must be loaded for this given user.

## PluginParameters protected data/methods.

getCurrentUserPtrFPT | getCurrentUserPtrFP_
| A pointer to a function to get the current user.
getCurrentDatabasePtrFPT | getCurrentDatabasePtrFP_
| A pointer to a function to get the current database pointer.
getCurrentLayerPtrFPT | getCurrentLayerPtrFP_
| A pointer to a function to get the current layer pointer.
getCurrentViewPtrFPT | getCurrentViewPtrFP_
| A pointer to a function to get the current view pointer.
getCurrentThemeAppPtrFPT | getCurrentThemeAppPtrFP_
| A pointer to a function to get the current theme application pointer.
setCurrentThemeAppPtrFPT | setCurrentThemeAppPtrFP_
| A pointer to a function to get the current theme application pointer.
updateTVInterfaceFPT | updateTVInterfaceFP_
| A pointer to a function to reload the database and update the TerraView interface (terraViewBase).
loadTranslationFileFPT | loadTranslationFileFP_
| A pointer to a function to load the translation file dictionary into TerraView translation tables.
updatePluginParametersFPT | updatePluginParametersFP_
| A pointer to a function to update the supllied parameters with the current TerraView interface state.
plotTVDataFPT | plotTVDataFP_
| A pointer to a function to plot data in Terra View using display window pointer.
setPluginMetadataFPT | setPluginMetadataFP_
| A pointer to a function used bay the plugin to set its metadata to Terraview.
void | init ()
| Initiate the internal state variables.

## Detailed Description

A class to deal with plugin parameters.

Author:
  Emiliano F. Castejon <castejon@dpi.inpe.br>

## Member Typedef Documentation

typedef TeDatabase*(* PluginParameters::getCurrentDatabasePtrFPT)(const PluginParameters &)

A type definition to a function to get the current database pointer.

typedef TeLayer*(* PluginParameters::getCurrentLayerPtrFPT)(const PluginParameters &)

A type definition to a function to get the current layer pointer.

typedef TeAppTheme*(* PluginParameters::getCurrentThemeAppPtrFPT)(const PluginParameters &)

A type definition to a function to get the current theme application pointer.

typedef std::string(* PluginParameters::getCurrentUserPtrFPT)(const PluginParameters &)

A type definition to a function to get the current database pointer.

typedef TeView*(* PluginParameters::getCurrentViewPtrFPT)(const PluginParameters &)

A type definition to a function to get the current view pointer.

typedef bool(* PluginParameters::loadTranslationFileFPT)(const PluginParameters &, const std::string &)

A type definition to a function to load the translation file dictionary into TerraView translation tables.

typedef void(* PluginParameters::plotTVDataFPT)(const PluginParameters &)

A type definition to a function to plot data in TerraView interface (terraViewBase).

typedef void(* PluginParameters::setCurrentThemeAppPtrFPT)(TeAppTheme *, const PluginParameters &)

A type definition to a function to get the current theme application pointer.

typedef void(* PluginParameters::setPluginMetadataFPT)(const PluginParameters &, const PluginMetadata &)

A type definition to a function set the plugin metadata in TerraView interface (terraViewBase).

typedef void(* PluginParameters::updatePluginParametersFPT)(PluginParameters &)

DEPRECATED - A pointer to a function to update the supllied parameters with the current TerraView interface state.

Note:
  DEPRECATED - WILL BE REMOVED IN THE FUTURE.

typedef void(* PluginParameters::updateTVInterfaceFPT)(const PluginParameters &)

A type definition to a function to reload the database and update the TerraView interface (terraViewBase).

## Constructor & Destructor Documentation

PluginParameters::PluginParameters | ( |  | ) |

Default constructor.

PluginParameters::PluginParameters | ( | QMainWindow * | qtmain_widget_ptr,
|  | TeProgressBase * | teprogressbase_ptr,
|  | TeQtDatabasesListView * | teqtdatabaseslistview_ptr,
|  | TeQtViewsListView * | teqtviewslistview_ptr,
|  | TeQtGrid * | teqtgrid_ptr,
|  | TeQtCanvas * | teqtcanvas_ptr,
|  | TeDatabase * | current_database_ptr,
|  | TeLayer * | current_layer_ptr,
|  | TeView * | current_view_ptr,
|  | TeAppTheme * | current_theme_ptr,
|  | TeCommunicator< PluginsSignal > * | signal_emitter,
|  | bool | use_collection,
|  | std::string | currentPluginName,
|  | std::string | currentUser,
|  | getCurrentDatabasePtrFPT | getCurrentDatabasePtrFP,
|  | getCurrentLayerPtrFPT | getCurrentLayerPtrFP,
|  | getCurrentViewPtrFPT | getCurrentViewPtrFP,
|  | getCurrentThemeAppPtrFPT | getCurrentThemeAppPtrFP,
|  | setCurrentThemeAppPtrFPT | setCurrentThemeAppPtrFP,
|  | updateTVInterfaceFPT | updateTVInterfaceFP,
|  | loadTranslationFileFPT | loadTranslationFileFP,
|  | updatePluginParametersFPT | updatePluginParametersFP,
|  | plotTVDataFPT | plotTVDataFP,
|  | setPluginMetadataFPT | setPluginMetadataFP,
|  | getCurrentUserPtrFPT | getCurrentUserPtrFP
| ) |  |

Alternative constructor.

Parameters:

  qtmain_widget_ptr | A pointer to the current main widget instance.
  teprogressbase_ptr | The current progress base active instance pointer.
  teqtdatabaseslistview_ptr | The current databases list view pointer.
  teqtviewslistview_ptr | The current views list view pointer.
  teqtgrid_ptr | The current grid instance pointer.
  teqtcanvas_ptr | The current theme application instance pointer.
  current_database_ptr | The current database instance pointer.
  current_layer_ptr | The current layer instance pointer.
  current_view_ptr | The current view instance pointer.
  current_theme_ptr | The current theme application instance pointer.
  signal_emitter | A pointer to plugins emitter singleton.
  use_collection | If TRUE, use collection to draw theme. Othewise, dont use it.
  currentPluginName | The name of the plugin that is currently being loaded.
  currentUser | The name of the user that is connected. Views must be loaded for this given user.
  getCurrentDatabasePtrFP | A pointer to a function to get the current database pointer.
  getCurrentLayerPtrFP | A pointer to a function to get the current layer pointer.
  getCurrentViewPtrFP | A pointer to a function to get the current view pointer.
  getCurrentThemeAppPtrFP | A pointer to a function to get the current theme application pointer.
  updateTVInterfaceFP | A pointer to a function to reload the database and update the TerraView interface (terraViewBase).
  plotTVDataFP | A pointer to a function to plot data in TerraView interface (terraViewBase).
  loadTranslationFileFP | A pointer to a function to load the translation file dictionary into TerraView translation tables.
  updatePluginParametersFP | A pointer to a function to update the supllied parameters with the current TerraView interface state.

PluginParameters::~PluginParameters | ( |  | ) |

Default destructor.

## Member Function Documentation

TeDatabase * PluginParameters::getCurrentDatabasePtr | ( |  | ) | const

Returns the current database pointer.

Returns:
  The current database pointer or zero if there are no current database.

TeLayer * PluginParameters::getCurrentLayerPtr | ( |  | ) | const

Returns the current layer pointer.

Returns:
  The current layer pointer or zero if there are no current layer.

TeAppTheme * PluginParameters::getCurrentThemeAppPtr | ( |  | ) | const

Returns the current theme application pointer.

Returns:
  The current theme application pointer or zero if there are no current theme application.

std::string PluginParameters::getCurrentUserPtr | ( |  | ) | const

Returns the current user.

Returns:
  The current user or "" if there are no current user.

TeView * PluginParameters::getCurrentViewPtr | ( |  | ) | const

Returns the current view pointer.

Returns:
  The current view pointer or zero if there are no current view.

static std::string PluginParameters::getVersion | ( |  | ) | `[inline, static]`

A function to get the parameters version.

Note:
  This must be the first declared method for the correct pointer alignment when calling methods from plugin parameters with different versions.

void PluginParameters::init | ( |  | ) | `[protected]`

Initiate the internal state variables.

bool PluginParameters::loadTranslationFile | ( | const PluginParameters & | pp,
|  | const std::string & | filename
| ) |  | const

DEPRECATED - A pointer to a function to load the translation file dictionary into TerraView translation tables ( always valid ).

Parameters:

  pp | Plugin parameters reference.

Returns:
  true if OK, false on errors.

Note:
  DEPRECATED - WILL BE REMOVED IN THE FUTURE - Use the loadTranslationFile( const std::string& filename ) function instead.

bool PluginParameters::loadTranslationFile | ( | const std::string & | filename | ) | const

A pointer to a function to load the translation file dictionary into TerraView translation tables ( always valid ).

Parameters:

  filename | The translation file name.

Returns:
  true if OK, false on errors.

void PluginParameters::plotTVData | ( |  | ) | const

A function to plot data on TerraView interface (terraViewBase).

void PluginParameters::setCurrentThemeAppPtr | ( | TeAppTheme * | appTheme | ) |

Returns the current theme application pointer.

Returns:
  The current theme application pointer or zero if there are no current theme application.

void PluginParameters::setPluginMetadata | ( | const PluginMetadata & | pluginMetadata | ) | const

Used by the plugin to set its metadata to the application.

Parameters:

  pluginMetadata | The plugin metadata.

void PluginParameters::updatePluginParameters | ( | PluginParameters & | pp | ) | const

DEPRECATED - A function to update the supllied parameters with the current TerraView interface state.

Parameters:

  pp | Plugin parameters reference.

Note:
  DEPRECATED - WILL BE REMOVED IN THE FUTURE.

void PluginParameters::updateTVInterface | ( | const PluginParameters & | pp | ) | const

DEPRECATED - A function to reload the database and update the TerraView interface (terraViewBase) ( always valid ).

Note:
  DEPRECATED - WILL BE REMOVED IN THE FUTURE - Use the updateTVInterface() function instead.

Parameters:

  pp | Plugin parameters reference.

void PluginParameters::updateTVInterface | ( |  | ) | const

A function to reload the database and update the TerraView interface (terraViewBase).

bool PluginParameters::useCollection | ( |  | ) | const

If TRUE, collection must be used to draw the theme.

Returns:
  true if collection must be used to draw the collection.

## Member Data Documentation

TeDatabase* PluginParameters::current_database_ptr_

DEPRECATED - The current database instance pointer.

Note:
  This pointer will be valid only for modal plugins. For non-modal plugins use the TeQtDatabasesListView pointer to get the current active database.
  DEPRECATED - WILL BE REMOVED IN THE FUTURE - Use getCurrentDatabasePtr() instead.

TeLayer* PluginParameters::current_layer_ptr_

DEPRECATED - The current layer instance pointer.

Note:
  This pointer will be valid only for modal plugins. For non-modal plugins use the TeQtViewsListView pointer to get the current active layer.
  DEPRECATED - WILL BE REMOVED IN THE FUTURE - Use getCurrentLayerPtr() instead.

TeAppTheme* PluginParameters::current_theme_ptr_

DEPRECATED - The current theme application instance pointer ( always valid ).

Note:
  DEPRECATED - WILL BE REMOVED IN THE FUTURE - Use getCurrentThemeAppPtr() instead.

TeView* PluginParameters::current_view_ptr_

DEPRECATED - The current view instance pointer.

Note:
  This pointer will be valid only for modal plugins. For non-modal plugins use the TeQtViewsListView pointer to get the current active view.
  DEPRECATED - WILL BE REMOVED IN THE FUTURE - Use getCurrentViewPtr() instead.

std::string PluginParameters::currentPluginName_

Stores the name of the plugin that is currently being loaded. Used to request the current plugin information.

std::string PluginParameters::currentUser_

Stores the name of the current user. Views must be loaded for this given user.

getCurrentDatabasePtrFPT PluginParameters::getCurrentDatabasePtrFP_`[protected]`

A pointer to a function to get the current database pointer.

getCurrentLayerPtrFPT PluginParameters::getCurrentLayerPtrFP_`[protected]`

A pointer to a function to get the current layer pointer.

getCurrentThemeAppPtrFPT PluginParameters::getCurrentThemeAppPtrFP_`[protected]`

A pointer to a function to get the current theme application pointer.

getCurrentUserPtrFPT PluginParameters::getCurrentUserPtrFP_`[protected]`

A pointer to a function to get the current user.

getCurrentViewPtrFPT PluginParameters::getCurrentViewPtrFP_`[protected]`

A pointer to a function to get the current view pointer.

loadTranslationFileFPT PluginParameters::loadTranslationFileFP_`[protected]`

A pointer to a function to load the translation file dictionary into TerraView translation tables.

plotTVDataFPT PluginParameters::plotTVDataFP_`[protected]`

A pointer to a function to plot data in Terra View using display window pointer.

QMainWindow* PluginParameters::qtmain_widget_ptr_

A pointer to the current main widget instance (always valid).

Note:
  This is a casted pointer to TerraView main window and can be used as parent widget for all plugin QT derived windows.
  This pointer is always valid.

setCurrentThemeAppPtrFPT PluginParameters::setCurrentThemeAppPtrFP_`[protected]`

A pointer to a function to get the current theme application pointer.

setPluginMetadataFPT PluginParameters::setPluginMetadataFP_`[protected]`

A pointer to a function used bay the plugin to set its metadata to Terraview.

TeCommunicator<PluginsSignal>* PluginParameters::signal_emitter_

A pointer to plugins emitter singleton ( always valid ).

TeProgressBase* PluginParameters::teprogressbase_ptr_

The current progress base active instance pointer ( always valid ).

TeQtCanvas* PluginParameters::teqtcanvas_ptr_

The current theme application instance pointer ( always valid ).

TeQtDatabasesListView* PluginParameters::teqtdatabaseslistview_ptr_

The current databases list view pointer ( always valid ).

TeQtGrid* PluginParameters::teqtgrid_ptr_

The current grid instance pointer ( always valid ).

TeQtViewsListView* PluginParameters::teqtviewslistview_ptr_

The current views list view pointer ( always valid ).

updatePluginParametersFPT PluginParameters::updatePluginParametersFP_`[protected]`

A pointer to a function to update the supllied parameters with the current TerraView interface state.

updateTVInterfaceFPT PluginParameters::updateTVInterfaceFP_`[protected]`

A pointer to a function to reload the database and update the TerraView interface (terraViewBase).

bool PluginParameters::use_collection_

If TRUE, the theme must be draw using the collection. If FALSE, it will be draw using its only restrictions clauses.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/spl/PluginParameters.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/spl/PluginParameters.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines