QGIS API Documentation  2.99.0-Master (8ec3eaf)
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 (const QSet< QString > &crsFilter)
 filters this widget by the given CRSs More...
 
void setSelectedAuthId (const QString &authId)
 
void setSelectedCrsId (long theCRSID)
 
void setSelectedCrsName (const QString &theCRSName)
 

Signals

void initialized ()
 Notify others that the widget is now fully initialized, including deferred selection of projection. More...
 
void projectionDoubleClicked ()
 Apply projection on double click. 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 (const QString &theSRID)
 

Public Member Functions

 QgsProjectionSelector (QWidget *parent, const char *name="", Qt::WindowFlags fl=0)
 
 ~QgsProjectionSelector ()
 
void loadCrsList (QSet< QString > *crsFilter=nullptr)
 Populate the proj tree view with system projection names... More...
 
void loadUserCrsList (QSet< QString > *crsFilter=nullptr)
 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::QgsProjectionSelector ( QWidget *  parent,
const char *  name = "",
Qt::WindowFlags  fl = 0 
)

Definition at line 30 of file qgsprojectionselector.cpp.

§ ~QgsProjectionSelector()

QgsProjectionSelector::~QgsProjectionSelector ( )

Definition at line 70 of file qgsprojectionselector.cpp.

Member Function Documentation

§ initialized

void QgsProjectionSelector::initialized ( )
signal

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

Note
added in 2.4

§ loadCrsList()

void QgsProjectionSelector::loadCrsList ( QSet< QString > *  crsFilter = nullptr)

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 535 of file qgsprojectionselector.cpp.

§ loadUserCrsList()

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

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 459 of file qgsprojectionselector.cpp.

§ on_cbxHideDeprecated_stateChanged

void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged ( )
slot

Definition at line 791 of file qgsprojectionselector.cpp.

§ on_leSearch_textChanged

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

Definition at line 797 of file qgsprojectionselector.cpp.

§ on_lstCoordinateSystems_currentItemChanged

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

Definition at line 677 of file qgsprojectionselector.cpp.

§ on_lstRecent_currentItemChanged

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

Definition at line 740 of file qgsprojectionselector.cpp.

§ projectionDoubleClicked

void QgsProjectionSelector::projectionDoubleClicked ( )
signal

Apply projection on double click.

Note
added in 2.14

§ pushProjectionToFront

void QgsProjectionSelector::pushProjectionToFront ( )
slot

mark selected projection for push to front

Definition at line 867 of file qgsprojectionselector.cpp.

§ refresh

void QgsProjectionSelector::refresh ( )
signal

Refresh any listening canvases.

§ resizeEvent()

void QgsProjectionSelector::resizeEvent ( QResizeEvent *  theEvent)
overrideprotected

Used to manage column sizes.

Definition at line 115 of file qgsprojectionselector.cpp.

§ searchBoxHasFocus

void QgsProjectionSelector::searchBoxHasFocus ( bool  )
signal

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

§ selectedAuthId()

QString QgsProjectionSelector::selectedAuthId ( )

Gets the current authority-style projection identifier.

Definition at line 431 of file qgsprojectionselector.cpp.

§ selectedCrsId

long QgsProjectionSelector::selectedCrsId ( )
slot

Gets the current QGIS projection identfier.

Definition at line 440 of file qgsprojectionselector.cpp.

§ selectedName

QString QgsProjectionSelector::selectedName ( )
slot

Definition at line 278 of file qgsprojectionselector.cpp.

§ selectedPostgresSrId

long QgsProjectionSelector::selectedPostgresSrId ( )
slot

Gets the current PostGIS-style projection identifier.

Definition at line 425 of file qgsprojectionselector.cpp.

§ selectedProj4String

QString QgsProjectionSelector::selectedProj4String ( )
slot

Definition at line 286 of file qgsprojectionselector.cpp.

§ setOgcWmsCrsFilter

void QgsProjectionSelector::setOgcWmsCrsFilter ( const 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 451 of file qgsprojectionselector.cpp.

§ setSelectedAuthId

void QgsProjectionSelector::setSelectedAuthId ( const QString &  authId)
slot

Definition at line 217 of file qgsprojectionselector.cpp.

§ setSelectedCrsId

void QgsProjectionSelector::setSelectedCrsId ( long  theCRSID)
slot

Definition at line 212 of file qgsprojectionselector.cpp.

§ setSelectedCrsName

void QgsProjectionSelector::setSelectedCrsName ( const QString &  theCRSName)
slot

Definition at line 207 of file qgsprojectionselector.cpp.

§ showEvent()

void QgsProjectionSelector::showEvent ( QShowEvent *  theEvent)
overrideprotected

Used to ensure the projection list view is actually populated.

Definition at line 126 of file qgsprojectionselector.cpp.

§ sqlSafeString()

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.

Linfinity qtcreator qgis.

  • const QString in The input string to make safe.
    Returns
    The string made safe for SQL statements.
    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.

Definition at line 986 of file qgsprojectionselector.cpp.

§ sridSelected

void QgsProjectionSelector::sridSelected ( const QString &  theSRID)
signal

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