A connector of the te::qt::widgets::MapDisplay class to the Application Framework. More...
#include <MapDisplay.h>
Signals | |
| void | hasNextExtent (bool value) |
| void | hasPreviousExtent (bool value) |
| void | triggered (te::qt::af::evt::Event *e) |
Public Member Functions | |
| void | clear () |
| It clears the map display. More... | |
| void | draw (const std::list< te::map::AbstractLayerPtr > &layers) |
| It draws the given layer list. More... | |
| bool | eventFilter (QObject *watched, QEvent *e) |
| void | fit (const std::list< te::map::AbstractLayerPtr > &layers) |
| te::qt::widgets::MapDisplay * | getDisplay () |
| MapDisplay (te::qt::widgets::MapDisplay *display, te::qt::af::ApplicationController *app) | |
| Constructor. More... | |
| void | nextExtent () |
| void | pan (const std::list< te::map::AbstractLayerPtr > &layers) |
| void | previousExtent () |
| void | setEyeBirdDisplay (te::qt::widgets::EyeBirdMapDisplayWidget *display) |
| void | setZoomInDisplay (te::qt::widgets::ZoomInMapDisplayWidget *display) |
| ~MapDisplay () | |
| destructor. More... | |
Protected Slots | |
| bool | isPanToSelectedEnabled () |
| Returns the pan selected flag;. More... | |
| void | onApplicationTriggered (te::qt::af::evt::Event *e) |
| Listener to the application framewrork events. More... | |
| void | onCoordTracked (QPointF &coordinate) |
| void | onDrawLayersFinished (const QMap< QString, QString > &errors) |
| void | onExtentChanged () |
Protected Member Functions | |
| void | configSRS (const std::list< te::map::AbstractLayerPtr > &layers) |
| void | drawDataSet (te::da::DataSet *dataset, const std::string &geomPropertyName, int srid, const QColor &color, bool isLinked=false) |
| void | drawDataSet (te::da::DataSet *dataset, const std::string &geomPropertyName, int srid, te::se::Style *style, bool isLinked=false) |
| void | drawLayerSelection (te::map::AbstractLayerPtr layer) |
| void | drawLayersSelection (const std::list< te::map::AbstractLayerPtr > &layers) |
| std::list< te::map::AbstractLayerPtr > | getSelectedLayer () |
| std::list< te::map::AbstractLayerPtr > | getVisibleLayers () |
Protected Attributes | |
| te::qt::af::ApplicationController * | m_app |
| Pointer to applicatin controller;. More... | |
| bool | m_autoPanEnabled |
| Define if auto pan is enabled. More... | |
| te::qt::widgets::CoordTracking * | m_coordTracking |
| Tool for tracking mouse position. More... | |
| int | m_currentExtentIndex |
| The current extent index. More... | |
| te::qt::widgets::MapDisplay * | m_display |
| Pointer to a component te::qt::widgets::MapDisplay. More... | |
| std::vector< te::gm::Envelope > | m_extentStack |
| The stack of MapDisplay extents. More... | |
| int | m_extentStackMaxSize |
| The max size of the extent stack. Used on previousExtent and nextExtent. More... | |
| te::qt::widgets::EyeBirdMapDisplayWidget * | m_eyeBirdDisplay |
| Pointer to a component that represents a eye bird display. More... | |
| QPixmap | m_lastDisplayContent |
| The last map display content. i.e. a "clean" pixmap. More... | |
| QMenu * | m_menu |
| The map display popup menu. More... | |
| te::qt::widgets::PanMiddleClick * | m_pan |
| Tool for pan using the middle mouse button. More... | |
| QAction * | m_pantoSelectedAction |
| Action to enable / disable pan to selected operation. More... | |
| te::qt::widgets::ZoomInMapDisplayWidget * | m_zoomInDisplay |
| Pointer to a component that represents a zoom in display. More... | |
| te::qt::widgets::ZoomWheel * | m_zoomWheel |
| Tool for zoom using the wheel mouse button. More... | |
A connector of the te::qt::widgets::MapDisplay class to the Application Framework.
It is used to listen events sent by the application framework. It is a proxy for the te::qt::widgets::MapDisplay.
Definition at line 83 of file qt/af/connectors/MapDisplay.h.
| te::qt::af::MapDisplay::MapDisplay | ( | te::qt::widgets::MapDisplay * | display, |
| te::qt::af::ApplicationController * | app | ||
| ) |
Constructor.
| display | te::qt::widgets::MapDisplay to be listened. |
Definition at line 72 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::qt::af::ApplicationController::findMenu(), te::qt::af::GetDefaultDisplayColorFromSettings(), te::qt::af::ApplicationController::getDefaultSRID(), te::qt::af::GetDPIValuesFromSettings(), m_app, m_coordTracking, m_display, m_menu, m_pan, m_zoomWheel, onCoordTracked(), onDrawLayersFinished(), onExtentChanged(), te::qt::widgets::MapDisplay::setBackgroundColor(), te::qt::widgets::MapDisplay::setOverrideDPI(), and te::qt::widgets::MapDisplay::setSRID().
| te::qt::af::MapDisplay::~MapDisplay | ( | ) |
destructor.
Definition at line 123 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_coordTracking, m_display, m_pan, and m_zoomWheel.
| void te::qt::af::MapDisplay::clear | ( | ) |
It clears the map display.
Definition at line 198 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_display, te::qt::widgets::MapDisplay::refresh(), and te::map::MapDisplay::setLayerList().
Referenced by draw(), and onApplicationTriggered().
|
protected |
Definition at line 659 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::map::MapDisplay::getSRID(), m_display, te::qt::widgets::MapDisplay::setSRID(), TE_UNKNOWN_SRS, and triggered().
| void te::qt::af::MapDisplay::draw | ( | const std::list< te::map::AbstractLayerPtr > & | layers | ) |
It draws the given layer list.
| layers | The layer list. |
Definition at line 167 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References clear(), configSRS(), te::map::MapDisplay::getExtent(), te::map::GetExtent(), te::map::MapDisplay::getSRID(), te::map::GetVisibleLayers(), te::gm::Envelope::isValid(), m_display, m_eyeBirdDisplay, m_zoomInDisplay, te::qt::widgets::MapDisplay::refresh(), te::qt::widgets::MapDisplay::setExtent(), te::map::MapDisplay::setLayerList(), te::qt::widgets::EyeBirdMapDisplayWidget::setList(), and te::qt::widgets::ZoomInMapDisplayWidget::setList().
Referenced by te::qt::plugins::edit::ToolBar::onCreateLayerActivated(), and te::qt::af::BaseApplication::onDrawTriggered().
|
protected |
Definition at line 508 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::qt::widgets::Config2DrawLayerSelection(), te::qt::widgets::Canvas::draw(), te::dt::GEOMETRY_TYPE, te::qt::widgets::MapDisplay::getDisplayPixmap(), te::map::MapDisplay::getExtent(), te::da::GetFirstPropertyPos(), te::da::DataSet::getGeometry(), te::da::GetPropertyPos(), te::map::MapDisplay::getSRID(), m_display, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::da::DataSet::moveBeforeFirst(), te::da::DataSet::moveNext(), te::qt::widgets::Canvas::setWindow(), TE_UNKNOWN_SRS, and te::gm::UnknownGeometryType.
Referenced by drawLayerSelection(), and onApplicationTriggered().
|
protected |
Definition at line 566 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::map::CanvasConfigurer::config(), te::qt::widgets::Canvas::draw(), te::dt::GEOMETRY_TYPE, te::qt::widgets::MapDisplay::getDisplayPixmap(), te::map::MapDisplay::getExtent(), te::da::GetFirstPropertyPos(), te::da::DataSet::getGeometry(), te::da::GetPropertyPos(), te::se::Style::getRule(), te::se::Style::getRules(), te::map::MapDisplay::getSRID(), te::se::Rule::getSymbolizers(), te::da::DataSet::isNull(), m_display, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::da::DataSet::moveBeforeFirst(), te::da::DataSet::moveNext(), te::qt::widgets::Canvas::setWindow(), and TE_UNKNOWN_SRS.
|
protected |
Definition at line 433 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::da::ObjectIdSet::begin(), drawDataSet(), te::da::ObjectIdSet::end(), te::da::ObjectIdSet::getExpression(), te::qt::af::ApplicationController::getSelectionColor(), te::da::HasLinkedTable(), m_app, m_display, te::da::ObjectIdSet::size(), and te::map::VISIBLE.
Referenced by drawLayersSelection().
|
protected |
Definition at line 421 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References drawLayerSelection(), and m_display.
Referenced by onApplicationTriggered(), and onDrawLayersFinished().
Definition at line 146 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_menu.
| void te::qt::af::MapDisplay::fit | ( | const std::list< te::map::AbstractLayerPtr > & | layers | ) |
Definition at line 235 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References configSRS(), te::map::GetExtent(), te::map::MapDisplay::getSRID(), te::map::GetVisibleLayers(), m_display, m_eyeBirdDisplay, m_zoomInDisplay, te::qt::widgets::MapDisplay::refresh(), te::qt::widgets::MapDisplay::setExtent(), te::map::MapDisplay::setLayerList(), te::qt::widgets::EyeBirdMapDisplayWidget::setList(), and te::qt::widgets::ZoomInMapDisplayWidget::setList().
Referenced by te::qt::af::DisplayWidget::onApplyScreenSizeButtonClicked(), te::qt::af::DisplayWidget::onRestoreScreenSizeButtonClicked(), and te::qt::af::BaseApplication::onZoomExtentTriggered().
| te::qt::widgets::MapDisplay * te::qt::af::MapDisplay::getDisplay | ( | ) |
Definition at line 131 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_display.
Referenced by te::qt::plugins::edit::Plugin::drawStashed(), te::qt::plugins::edit::ToolBar::enableCurrentTool(), te::qt::af::BaseApplication::initSlotsConnections(), te::qt::af::BaseApplication::initStatusBar(), te::qt::af::BaseApplication::makeDialog(), te::qt::plugins::edit::ToolBar::onAggregateAreaToolActivated(), onApplicationTriggered(), te::qt::af::DisplayWidget::onApplyScreenSizeButtonClicked(), te::qt::plugins::edit::ToolBar::onCreateLineToolActivated(), te::qt::plugins::edit::ToolBar::onCreatePointToolActivated(), te::qt::plugins::edit::ToolBar::onCreatePolygonToolActivated(), te::qt::plugins::edit::ToolBar::onDeleteGeometryToolActivated(), te::qt::plugins::edit::ToolBar::onDeletePartToolActivated(), te::qt::plugins::edit::ToolBar::onDigitStepComboBoxChanged(), te::qt::plugins::edit::ToolBar::onEditActivated(), te::qt::af::BaseApplication::onEditGraphicScaleTriggered(), te::qt::af::BaseApplication::onEditGridTriggered(), te::qt::plugins::edit::ToolBar::onFeatureAttributesActivated(), te::qt::af::BaseApplication::onInfoToggled(), TerraView::onLayerChartTriggered(), te::qt::af::BaseApplication::onLayerFitOnMapDisplayTriggered(), te::qt::af::BaseApplication::onLayerFitSelectedOnMapDisplayTriggered(), TerraView::onLayerGroupingTriggered(), te::qt::af::BaseApplication::onLayerPanToSelectedOnMapDisplayTriggered(), te::qt::af::BaseApplication::onMapCoordinateFinderTriggered(), te::qt::af::BaseApplication::onMapSetUnknwonSRIDTriggered(), te::qt::af::BaseApplication::onMapShowGeographicGridToggled(), te::qt::af::BaseApplication::onMapSRIDTriggered(), te::qt::af::BaseApplication::onMeasureAngleToggled(), te::qt::af::BaseApplication::onMeasureAreaToggled(), te::qt::af::BaseApplication::onMeasureDistanceToggled(), te::qt::plugins::edit::ToolBar::onMergeGeometriesToolActivated(), te::qt::plugins::edit::ToolBar::onMoveGeometryToolActivated(), te::qt::af::BaseApplication::onPanToggled(), te::qt::plugins::edit::ToolBar::onResetVisualizationToolActivated(), te::qt::af::DisplayWidget::onRestoreScreenSizeButtonClicked(), te::qt::plugins::edit::ToolBar::onRotateGeometryToolActivated(), te::qt::plugins::edit::ToolBar::onSaveActivated(), te::qt::af::BaseApplication::onScaleComboBoxActivated(), te::qt::af::BaseApplication::onScaleDisplayChanged(), te::qt::af::BaseApplication::onSelectionToggled(), te::qt::plugins::edit::ToolBar::onSnapOptionsActivated(), te::qt::plugins::edit::ToolBar::onSplitPolygonToolActivated(), te::qt::plugins::edit::Plugin::onStashedLayer(), te::qt::plugins::edit::ToolBar::onSubtractAreaToolActivated(), TerraView::onToolsQueryDataSourceTriggered(), te::qt::plugins::edit::ToolBar::onVertexToolActivated(), te::qt::af::BaseApplication::onZoomInToggled(), te::qt::af::BaseApplication::onZoomOutToggled(), TerraView::resetComponents(), te::qt::plugins::edit::ToolBar::setCurrentTool(), and te::qt::plugins::edit::ToolBar::~ToolBar().
|
protected |
Definition at line 694 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::qt::af::evt::GetLayerSelected::m_layer, and triggered().
Referenced by onApplicationTriggered(), and onDrawLayersFinished().
|
protected |
Definition at line 707 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::qt::widgets::GetValidLayers(), te::qt::af::evt::GetLayerExplorer::m_layerExplorer, and triggered().
Referenced by onApplicationTriggered().
|
signal |
Referenced by nextExtent(), onExtentChanged(), and previousExtent().
|
signal |
Referenced by nextExtent(), onExtentChanged(), and previousExtent().
|
protectedslot |
Returns the pan selected flag;.
Definition at line 416 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_pantoSelectedAction.
| void te::qt::af::MapDisplay::nextExtent | ( | ) |
Definition at line 205 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References hasNextExtent(), hasPreviousExtent(), m_currentExtentIndex, m_display, m_extentStack, and te::qt::widgets::MapDisplay::setExtent().
Referenced by te::qt::af::BaseApplication::onNextExtentTriggered().
|
protectedslot |
Listener to the application framewrork events.
| e | An event sent by framework. |
Definition at line 333 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References clear(), drawDataSet(), drawLayersSelection(), te::qt::af::evt::GET_MAPDISPLAY, getDisplay(), te::qt::widgets::MapDisplay::getDisplayPixmap(), getSelectedLayer(), getVisibleLayers(), te::qt::af::evt::HIGHLIGHT_LAYER_OBJECTS, te::qt::af::evt::ITEM_OF_LAYER_REMOVED, te::qt::af::evt::LAYER_CHANGED, te::qt::af::evt::LAYER_REMOVED, te::qt::af::evt::LAYER_SELECTED_OBJECTS_CHANGED, m_autoPanEnabled, te::qt::af::evt::MapColorChanged::m_color, te::qt::af::evt::HighlightLayerObjects::m_dataset, te::qt::af::evt::GetMapDisplay::m_display, m_display, te::qt::af::evt::Event::m_id, te::qt::af::evt::AutoPanEnabled::m_isEnabled, m_lastDisplayContent, te::qt::af::evt::HighlightLayerObjects::m_layer, te::qt::af::evt::LayerChanged::m_layer, te::qt::af::evt::LayerRemoved::m_redraw, te::qt::af::evt::LayerChanged::m_redraw, te::qt::af::evt::HighlightLayerObjects::m_style, te::qt::af::evt::MAP_COLOR_CHANGED, pan(), te::qt::af::evt::PROJECT_ADDED, te::qt::widgets::MapDisplay::refresh(), te::qt::widgets::MapDisplay::setBackgroundColor(), te::map::MapDisplay::setLayerList(), te::qt::af::evt::TABLE_AUTO_PAN_ENABLED, and te::qt::widgets::MapDisplay::updateLayer().
|
protectedslot |
Definition at line 308 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::qt::widgets::ZoomInMapDisplayWidget::drawCursorPosition(), m_zoomInDisplay, and triggered().
Referenced by MapDisplay().
|
protectedslot |
Definition at line 317 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References drawLayersSelection(), te::qt::widgets::MapDisplay::getDisplayPixmap(), getSelectedLayer(), m_display, m_lastDisplayContent, and triggered().
Referenced by MapDisplay().
|
protectedslot |
Definition at line 638 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References te::gm::Envelope::equals(), te::map::MapDisplay::getExtent(), hasNextExtent(), hasPreviousExtent(), m_currentExtentIndex, m_display, m_extentStack, and m_extentStackMaxSize.
Referenced by MapDisplay().
| void te::qt::af::MapDisplay::pan | ( | const std::list< te::map::AbstractLayerPtr > & | layers | ) |
Definition at line 257 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References configSRS(), te::gm::Envelope::getCenter(), te::map::MapDisplay::getExtent(), te::gm::Envelope::getHeight(), te::map::GetSelectedExtent(), te::map::MapDisplay::getSRID(), te::map::GetVisibleLayers(), te::gm::Envelope::getWidth(), te::gm::Envelope::isValid(), m_display, te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::qt::widgets::MapDisplay::setExtent(), te::gm::Coord2D::x, and te::gm::Coord2D::y.
Referenced by onApplicationTriggered().
| void te::qt::af::MapDisplay::previousExtent | ( | ) |
Definition at line 220 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References hasNextExtent(), hasPreviousExtent(), m_currentExtentIndex, m_display, m_extentStack, and te::qt::widgets::MapDisplay::setExtent().
Referenced by te::qt::af::BaseApplication::onPreviousExtentTriggered().
| void te::qt::af::MapDisplay::setEyeBirdDisplay | ( | te::qt::widgets::EyeBirdMapDisplayWidget * | display | ) |
Definition at line 141 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_eyeBirdDisplay.
| void te::qt::af::MapDisplay::setZoomInDisplay | ( | te::qt::widgets::ZoomInMapDisplayWidget * | display | ) |
Definition at line 136 of file src/terralib/qt/af/connectors/MapDisplay.cpp.
References m_zoomInDisplay.
|
signal |
Referenced by configSRS(), getSelectedLayer(), getVisibleLayers(), onCoordTracked(), and onDrawLayersFinished().
|
protected |
Pointer to applicatin controller;.
Definition at line 174 of file qt/af/connectors/MapDisplay.h.
Referenced by drawLayerSelection(), and MapDisplay().
|
protected |
Define if auto pan is enabled.
Definition at line 191 of file qt/af/connectors/MapDisplay.h.
Referenced by onApplicationTriggered().
|
protected |
Tool for tracking mouse position.
Definition at line 182 of file qt/af/connectors/MapDisplay.h.
Referenced by MapDisplay(), and ~MapDisplay().
|
protected |
The current extent index.
Definition at line 179 of file qt/af/connectors/MapDisplay.h.
Referenced by nextExtent(), onExtentChanged(), and previousExtent().
|
protected |
Pointer to a component te::qt::widgets::MapDisplay.
Definition at line 175 of file qt/af/connectors/MapDisplay.h.
Referenced by clear(), configSRS(), draw(), drawDataSet(), drawLayerSelection(), drawLayersSelection(), fit(), getDisplay(), MapDisplay(), nextExtent(), onApplicationTriggered(), onDrawLayersFinished(), onExtentChanged(), pan(), previousExtent(), and ~MapDisplay().
|
protected |
The stack of MapDisplay extents.
Definition at line 178 of file qt/af/connectors/MapDisplay.h.
Referenced by nextExtent(), onExtentChanged(), and previousExtent().
|
protected |
The max size of the extent stack. Used on previousExtent and nextExtent.
Definition at line 180 of file qt/af/connectors/MapDisplay.h.
Referenced by onExtentChanged().
|
protected |
Pointer to a component that represents a eye bird display.
Definition at line 187 of file qt/af/connectors/MapDisplay.h.
Referenced by draw(), fit(), and setEyeBirdDisplay().
|
protected |
The last map display content. i.e. a "clean" pixmap.
Definition at line 177 of file qt/af/connectors/MapDisplay.h.
Referenced by onApplicationTriggered(), and onDrawLayersFinished().
|
protected |
The map display popup menu.
Definition at line 176 of file qt/af/connectors/MapDisplay.h.
Referenced by eventFilter(), and MapDisplay().
|
protected |
Tool for pan using the middle mouse button.
Definition at line 184 of file qt/af/connectors/MapDisplay.h.
Referenced by MapDisplay(), and ~MapDisplay().
|
protected |
Action to enable / disable pan to selected operation.
Definition at line 189 of file qt/af/connectors/MapDisplay.h.
Referenced by isPanToSelectedEnabled().
|
protected |
Pointer to a component that represents a zoom in display.
Definition at line 186 of file qt/af/connectors/MapDisplay.h.
Referenced by draw(), fit(), onCoordTracked(), and setZoomInDisplay().
|
protected |
Tool for zoom using the wheel mouse button.
Definition at line 183 of file qt/af/connectors/MapDisplay.h.
Referenced by MapDisplay(), and ~MapDisplay().