QGIS API Documentation  2.9.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
QgsProjectionSelector Class Reference

A widget for selecting a Coordinate reference system from a tree. More...

#include <qgsprojectionselector.h>

Inheritance diagram for QgsProjectionSelector:
Inheritance graph
[legend]

Public Slots

void on_cbxHideDeprecated_stateChanged ()
 
void on_leSearch_textChanged (const QString &)
 
void on_lstCoordinateSystems_currentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *prev)
 
void on_lstRecent_currentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *prev)
 
void pushProjectionToFront ()
 mark selected projection for push to front More...
 
long selectedCrsId ()
 Gets the current QGIS projection identfier. More...
 
QString selectedName ()
 
long selectedPostgresSrId ()
 Gets the current PostGIS-style projection identifier. More...
 
QString selectedProj4String ()
 
void setOgcWmsCrsFilter (QSet< QString > crsFilter)
 filters this widget by the given CRSs More...
 
void setSelectedAuthId (QString authId)
 
void setSelectedCrsId (long theCRSID)
 
void setSelectedCrsName (QString theCRSName)
 

Signals

void initialized ()
 Notify others that the widget is now fully initialized, including deferred selection of projection. More...
 
void refresh ()
 Refresh any listening canvases. More...
 
void searchBoxHasFocus (bool)
 Let listeners know if find has focus so they can adjust the default button. More...
 
void sridSelected (QString theSRID)
 

Public Member Functions

 QgsProjectionSelector (QWidget *parent, const char *name="", Qt::WindowFlags fl=0)
 
 ~QgsProjectionSelector ()
 
void loadCrsList (QSet< QString > *crsFilter=0)
 Populate the proj tree view with system projection names... More...
 
void loadUserCrsList (QSet< QString > *crsFilter=0)
 Populate the proj tree view with user defined projection names... More...
 
QString selectedAuthId ()
 Gets the current authority-style projection identifier. More...
 
const QString sqlSafeString (const QString theSQL)
 Make the string safe for use in SQL statements. This involves escaping single quotes, double quotes, backslashes, and optionally, percentage symbols. Percentage symbols are used as wildcards sometimes and so when using the string as part of the LIKE phrase of a select statement, should be escaped. More...
 

Protected Member Functions

void resizeEvent (QResizeEvent *theEvent) override
 Used to manage column sizes. More...
 
void showEvent (QShowEvent *theEvent) override
 Used to ensure the projection list view is actually populated. More...
 

Detailed Description

A widget for selecting a Coordinate reference system from a tree.

See also
QgsGenericProjectionSelector.
Author
Tim Sutton

Definition at line 28 of file qgsprojectionselector.h.

Constructor & Destructor Documentation

QgsProjectionSelector::QgsProjectionSelector ( QWidget *  parent,
const char *  name = "",
Qt::WindowFlags  fl = 0 
)

Definition at line 29 of file qgsprojectionselector.cpp.

QgsProjectionSelector::~QgsProjectionSelector ( )

Definition at line 69 of file qgsprojectionselector.cpp.

Member Function Documentation

void QgsProjectionSelector::initialized ( )
signal

Notify others that the widget is now fully initialized, including deferred selection of projection.

Note
added in 2.4
void QgsProjectionSelector::loadCrsList ( QSet< QString > *  crsFilter = 0)

Populate the proj tree view with system projection names...

Parameters
crsFiltera list of OGC Coordinate Reference Systems to filter the list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support.
Todo:
Should this be public?

Definition at line 534 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::loadUserCrsList ( QSet< QString > *  crsFilter = 0)

Populate the proj tree view with user defined projection names...

Parameters
crsFiltera list of OGC Coordinate Reference Systems to filter the list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support.
Todo:
Should this be public?

Definition at line 458 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged ( )
slot

Definition at line 755 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::on_leSearch_textChanged ( const QString &  theFilterTxt)
slot

Definition at line 761 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::on_lstCoordinateSystems_currentItemChanged ( QTreeWidgetItem *  current,
QTreeWidgetItem *  prev 
)
slot

Definition at line 676 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::on_lstRecent_currentItemChanged ( QTreeWidgetItem *  current,
QTreeWidgetItem *  prev 
)
slot

Definition at line 721 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::pushProjectionToFront ( )
slot

mark selected projection for push to front

Definition at line 831 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::refresh ( )
signal

Refresh any listening canvases.

void QgsProjectionSelector::resizeEvent ( QResizeEvent *  theEvent)
overrideprotected

Used to manage column sizes.

Definition at line 114 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::searchBoxHasFocus ( bool  )
signal

Let listeners know if find has focus so they can adjust the default button.

QString QgsProjectionSelector::selectedAuthId ( )

Gets the current authority-style projection identifier.

Definition at line 430 of file qgsprojectionselector.cpp.

long QgsProjectionSelector::selectedCrsId ( )
slot

Gets the current QGIS projection identfier.

Definition at line 439 of file qgsprojectionselector.cpp.

QString QgsProjectionSelector::selectedName ( )
slot

Definition at line 277 of file qgsprojectionselector.cpp.

long QgsProjectionSelector::selectedPostgresSrId ( )
slot

Gets the current PostGIS-style projection identifier.

Definition at line 424 of file qgsprojectionselector.cpp.

QString QgsProjectionSelector::selectedProj4String ( )
slot

Definition at line 285 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::setOgcWmsCrsFilter ( QSet< QString >  crsFilter)
slot

filters this widget by the given CRSs

Sets this widget to filter the available projections to those listed by the given Coordinate Reference Systems.

Parameters
crsFiltera list of OGC Coordinate Reference Systems to filter the list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support.
Warning
This function's behaviour is undefined if it is called after the widget is shown.

Definition at line 450 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::setSelectedAuthId ( QString  authId)
slot

Definition at line 216 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::setSelectedCrsId ( long  theCRSID)
slot

Definition at line 211 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::setSelectedCrsName ( QString  theCRSName)
slot

Definition at line 206 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::showEvent ( QShowEvent *  theEvent)
overrideprotected

Used to ensure the projection list view is actually populated.

Definition at line 125 of file qgsprojectionselector.cpp.

const QString QgsProjectionSelector::sqlSafeString ( const QString  theSQL)

Make the string safe for use in SQL statements. This involves escaping single quotes, double quotes, backslashes, and optionally, percentage symbols. Percentage symbols are used as wildcards sometimes and so when using the string as part of the LIKE phrase of a select statement, should be escaped.

  • const QString in The input string to make safe.
    Returns
    The string made safe for SQL statements.
    linfinity qtcreator qgis
  • const QString in The input string to make safe.
    Returns
    The string made safe for SQL statements.

Definition at line 950 of file qgsprojectionselector.cpp.

void QgsProjectionSelector::sridSelected ( QString  theSRID)
signal

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