te::qt::widgets::Grid Class Reference

This class implements the grid, planar or geographic, to be used with the MapDisplay. More...

#include <Grid.h>

Inheritance diagram for te::qt::widgets::Grid:

Public Slots

Public slots.

Methods to update the internal attributes of the class, using the signal-slot mechanism of QT.

void setColor (const QColor &color)
 Updates the color of the lines and texts. More...
 
void setFont (const QFont &font)
 Updates the font of the texts. More...
 
void setGridType (const int &type)
 Updates the type of grid: planar or geographic. More...
 
void redraw ()
 Refresh the grid image. This method MUST BE called when the area of visualization changes in MapDisplay. More...
 

Signals

Signals

Signals emmited by the widget.

void aboutToBeclosed ()
 

Public Member Functions

Constructor and destructor methods.

Methods related to instantiation and destruction.

 Grid (MapDisplay *parent)
 Constructor. More...
 
 ~Grid ()
 Destuctor. More...
 
Public methods

Methods to access the internal attributes of the class.

QColor getColor () const
 Returns the current color being used. More...
 
QFont getFont () const
 Returns the current font being used. More...
 
int getType () const
 Returns the current type of grid being used. More...
 

Protected Member Functions

Protected methods

Methods used internally by the object.

void initialize ()
 Initializes the object. More...
 
void makePlanarGrid ()
 Builds the planar grid. More...
 
void makeGeographicGrid ()
 Builds the geographic grid. More...
 
void paintEvent (QPaintEvent *event)
 Reimplementation of the QFrame method. More...
 
void closeEvent (QCloseEvent *event)
 Reimplementation of the QFrame method. More...
 

Protected Attributes

QPixmap * m_backGround
 Pixmap with the grid image. More...
 
QColor m_color
 Color to be used. More...
 
MapDisplaym_display
 Pointer to a MapDisplay. More...
 
QFont m_font
 Font to be used. More...
 
int m_geoSrid
 Geographic SRID being used to reproject the world box to a geographic coordinate system. More...
 
std::vector< te::gm::LineStringm_hlines
 Grid lines. More...
 
double m_horizontalGap
 Distance between lines in x-axis. More...
 
double m_initialX
 Initial coordinate in x-axis. More...
 
double m_initialY
 Initial coordinate in y-axis. More...
 
int m_maxGap
 Maximum number of lines to be presented on the grid. More...
 
int m_srid
 SRID being used to reproject the world box to a planar coordinate system. More...
 
GridTypes m_type
 Type of the grid (planar or geographic). More...
 
double m_verticalGap
 Distance between lines in y-axis. More...
 
std::vector< te::gm::LineStringm_vlines
 Grid lines. More...
 

Detailed Description

This class implements the grid, planar or geographic, to be used with the MapDisplay.

Definition at line 74 of file Grid.h.

Constructor & Destructor Documentation

◆ Grid()

te::qt::widgets::Grid::Grid ( MapDisplay parent)

Constructor.

Parameters
parentThe display over what the scale will reflect.

◆ ~Grid()

te::qt::widgets::Grid::~Grid ( )

Destuctor.

Member Function Documentation

◆ aboutToBeclosed

void te::qt::widgets::Grid::aboutToBeclosed ( )
signal

Signal emmited when the widget is about to be closed.

◆ closeEvent()

void te::qt::widgets::Grid::closeEvent ( QCloseEvent *  event)
protected

Reimplementation of the QFrame method.

Parameters
eventThe event generated.

◆ getColor()

QColor te::qt::widgets::Grid::getColor ( ) const

Returns the current color being used.

Returns
The current color of the grid and texts.

◆ getFont()

QFont te::qt::widgets::Grid::getFont ( ) const

Returns the current font being used.

Returns
The current font of the texts.

◆ getType()

int te::qt::widgets::Grid::getType ( ) const

Returns the current type of grid being used.

Returns
The current type of grid being used.
See also
GridTypes

◆ initialize()

void te::qt::widgets::Grid::initialize ( )
protected

Initializes the object.

◆ makeGeographicGrid()

void te::qt::widgets::Grid::makeGeographicGrid ( )
protected

Builds the geographic grid.

◆ makePlanarGrid()

void te::qt::widgets::Grid::makePlanarGrid ( )
protected

Builds the planar grid.

◆ paintEvent()

void te::qt::widgets::Grid::paintEvent ( QPaintEvent *  event)
protected

Reimplementation of the QFrame method.

Parameters
eventThe event generated.

◆ redraw

void te::qt::widgets::Grid::redraw ( )
slot

Refresh the grid image. This method MUST BE called when the area of visualization changes in MapDisplay.

◆ setColor

void te::qt::widgets::Grid::setColor ( const QColor &  color)
slot

Updates the color of the lines and texts.

Parameters
colorThe new color to be used.

◆ setFont

void te::qt::widgets::Grid::setFont ( const QFont &  font)
slot

Updates the font of the texts.

Parameters
fontNew font to be used.

◆ setGridType

void te::qt::widgets::Grid::setGridType ( const int &  type)
slot

Updates the type of grid: planar or geographic.

Parameters
typeThe new type.

Member Data Documentation

◆ m_backGround

QPixmap* te::qt::widgets::Grid::m_backGround
protected

Pixmap with the grid image.

Definition at line 215 of file Grid.h.

◆ m_color

QColor te::qt::widgets::Grid::m_color
protected

Color to be used.

Definition at line 220 of file Grid.h.

◆ m_display

MapDisplay* te::qt::widgets::Grid::m_display
protected

Pointer to a MapDisplay.

Definition at line 209 of file Grid.h.

◆ m_font

QFont te::qt::widgets::Grid::m_font
protected

Font to be used.

Definition at line 221 of file Grid.h.

◆ m_geoSrid

int te::qt::widgets::Grid::m_geoSrid
protected

Geographic SRID being used to reproject the world box to a geographic coordinate system.

Definition at line 219 of file Grid.h.

◆ m_hlines

std::vector<te::gm::LineString> te::qt::widgets::Grid::m_hlines
protected

Grid lines.

Definition at line 216 of file Grid.h.

◆ m_horizontalGap

double te::qt::widgets::Grid::m_horizontalGap
protected

Distance between lines in x-axis.

Definition at line 212 of file Grid.h.

◆ m_initialX

double te::qt::widgets::Grid::m_initialX
protected

Initial coordinate in x-axis.

Definition at line 213 of file Grid.h.

◆ m_initialY

double te::qt::widgets::Grid::m_initialY
protected

Initial coordinate in y-axis.

Definition at line 214 of file Grid.h.

◆ m_maxGap

int te::qt::widgets::Grid::m_maxGap
protected

Maximum number of lines to be presented on the grid.

Definition at line 210 of file Grid.h.

◆ m_srid

int te::qt::widgets::Grid::m_srid
protected

SRID being used to reproject the world box to a planar coordinate system.

Definition at line 218 of file Grid.h.

◆ m_type

GridTypes te::qt::widgets::Grid::m_type
protected

Type of the grid (planar or geographic).

Definition at line 222 of file Grid.h.

◆ m_verticalGap

double te::qt::widgets::Grid::m_verticalGap
protected

Distance between lines in y-axis.

Definition at line 211 of file Grid.h.

◆ m_vlines

std::vector<te::gm::LineString> te::qt::widgets::Grid::m_vlines
protected

Grid lines.

Definition at line 217 of file Grid.h.


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