Vizitown

- Main Page
- Namespaces
- Classes
- Files

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

All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Private Attributes | List of all members
vizitown_plugin.vt_utils_layer.Layer Class Reference

Class Layer Manage the layer to catch the information and send it. More...

Collaboration diagram for vizitown_plugin.vt_utils_layer.Layer:

## Public Member Functions
def | __init__
| Constructor. More...
def | add_color
| add_color method Column Color is None if the layer has a plain color so color is an array with only one color in. More...
def | parse_vector
| parse_vector method Recuperate vector information in QGIS This function give the query to ask the database and return vectors informations into QGIS More...
def | update_color
| update_color method Get the color when the user change the color of a data More...
def | get_color
| get_color method Get the color of the vector layer. More...
def | get_color_type
| get_color_type method Get the type color of the layer and return singleSymbol, graduatedSymbol or categorizedSymbol More...
def | get_column_color
| get_column_color method Get the name of the column where the analysis was perform. More...

## Public Attributes
| qgisLayer

## Private Attributes
| _host
| _dbname
| _port
| _user
| _password
| _table
| _column
| _srid
| _column2
| _typeColumn2
| _displayName
| _uuid
| _columnColor
| _color

## Detailed Description

Class Layer Manage the layer to catch the information and send it.

## Constructor & Destructor Documentation

def vizitown_plugin.vt_utils_layer.Layer.__init__ | ( |  | self,
|  |  | QgsMapLayer
| ) |  |

Constructor.

Parameters

  QgsMapLayer | the layer managed

## Member Function Documentation

def vizitown_plugin.vt_utils_layer.Layer.add_color | ( |  | self,
|  |  | columnColor,
|  |  | color
| ) |  |

add_color method Column Color is None if the layer has a plain color so color is an array with only one color in.

else columnColor is the field in db to color geometries with right color and color is an array with dict in dict in array looks like that: { "min" : value, "max" : value, "color": value }

Parameters

  columnColor |
  color |

def vizitown_plugin.vt_utils_layer.Layer.get_color | ( |  | self) |  |

get_color method Get the color of the vector layer.

If is categorized symbol or graduate symbol, the color is white

Returns
  the color table of the layer

def vizitown_plugin.vt_utils_layer.Layer.get_color_type | ( |  | self) |  |

get_color_type method Get the type color of the layer and return singleSymbol, graduatedSymbol or categorizedSymbol

Returns
  the type of color of the layer

def vizitown_plugin.vt_utils_layer.Layer.get_column_color | ( |  | self) |  |

get_column_color method Get the name of the column where the analysis was perform.

If there isn't analysis, the name is none

Returns
  the color column

def vizitown_plugin.vt_utils_layer.Layer.parse_vector | ( |  | self,
|  |  | source
| ) |  |

parse_vector method Recuperate vector information in QGIS This function give the query to ask the database and return vectors informations into QGIS

Parameters

  source | String information to query the database

Returns
  String with vectors informations

def vizitown_plugin.vt_utils_layer.Layer.update_color | ( |  | self) |  |

update_color method Get the color when the user change the color of a data

## Member Data Documentation

vizitown_plugin.vt_utils_layer.Layer._color
| private

vizitown_plugin.vt_utils_layer.Layer._column
| private

vizitown_plugin.vt_utils_layer.Layer._column2
| private

vizitown_plugin.vt_utils_layer.Layer._columnColor
| private

vizitown_plugin.vt_utils_layer.Layer._dbname
| private

vizitown_plugin.vt_utils_layer.Layer._displayName
| private

vizitown_plugin.vt_utils_layer.Layer._host
| private

vizitown_plugin.vt_utils_layer.Layer._password
| private

vizitown_plugin.vt_utils_layer.Layer._port
| private

vizitown_plugin.vt_utils_layer.Layer._srid
| private

vizitown_plugin.vt_utils_layer.Layer._table
| private

vizitown_plugin.vt_utils_layer.Layer._typeColumn2
| private

vizitown_plugin.vt_utils_layer.Layer._user
| private

vizitown_plugin.vt_utils_layer.Layer._uuid
| private

vizitown_plugin.vt_utils_layer.Layer.qgisLayer

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

- vt_utils_layer.py