QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
A generic widget allowing users to pick a Coordinate Reference System (or define their own). More...
#include <qgsprojectionselectiondialog.h>
Public Slots | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the crs to show within the widget. More... | |
void | setOgcWmsCrsFilter (const QSet< QString > &crsFilter) |
filters this dialog by the given CRSs More... | |
Public Slots inherited from QgsPanelWidget | |
void | acceptPanel () |
Accept the panel. More... | |
void | openPanel (QgsPanelWidget *panel) |
Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the showPanel signal for connected slots to handle the open event. More... | |
Signals | |
void | crsChanged () |
Emitted when the CRS defined in the widget is changed. More... | |
void | crsDoubleClicked (const QgsCoordinateReferenceSystem &crs) |
Emitted when a CRS entry in the widget is double-clicked. More... | |
void | hasValidSelectionChanged (bool isValid) |
Emitted when the widget has a valid selection or not. More... | |
Signals inherited from QgsPanelWidget | |
void | panelAccepted (QgsPanelWidget *panel) |
Emitted when the panel is accepted by the user. More... | |
void | showPanel (QgsPanelWidget *panel) |
Emit when you require a panel to be show in the interface. More... | |
void | widgetChanged () |
Emitted when the widget state changes. More... | |
Public Member Functions | |
QgsCrsSelectionWidget (QWidget *parent=nullptr) | |
Constructor for QgsCrsSelectionWidget, with the specified parent widget. More... | |
~QgsCrsSelectionWidget () override | |
QgsCoordinateReferenceSystem | crs () const |
Returns the CRS currently selected in the widget. More... | |
bool | hasValidSelection () const |
Returns true if the widget has a valid CRS defined. More... | |
void | setMessage (const QString &message) |
Sets a message to show in the dialog. More... | |
void | setNotSetText (const QString &text, const QString &description=QString()) |
Sets the text to show for the not set option. More... | |
void | setShowNoCrs (bool show) |
Sets whether a "no/invalid" CRS option should be shown. More... | |
bool | showNoCrs () const |
Returns whether the "no/invalid" CRS option is shown. More... | |
Public Member Functions inherited from QgsPanelWidget | |
QgsPanelWidget (QWidget *parent=nullptr) | |
Base class for any widget that can be shown as a inline panel. More... | |
virtual bool | applySizeConstraintsToStack () const |
Returns true if the size constraints and hints for the panel widget should be applied to the parent QgsPanelWidgetStack which this panel is shown in. More... | |
bool | autoDelete () |
The the auto delete property on the widget. More... | |
void | connectChildPanel (QgsPanelWidget *panel) |
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. More... | |
void | connectChildPanels (const QList< QgsPanelWidget * > &panels) |
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. More... | |
bool | dockMode () |
Returns the dock mode state. More... | |
virtual QMenu * | menuButtonMenu () |
Returns the menu to use for the menu button for this panel, or nullptr if no menu button is required. More... | |
virtual QString | menuButtonTooltip () const |
Returns the (translated) tooltip text to use for the menu button for this panel. More... | |
QString | panelTitle () |
The title of the panel. More... | |
void | setAutoDelete (bool autoDelete) |
The the auto delete property on the widget. More... | |
virtual void | setDockMode (bool dockMode) |
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs. More... | |
void | setPanelTitle (const QString &panelTitle) |
Set the title of the panel when shown in the interface. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsPanelWidget | |
static QgsPanelWidget * | findParentPanel (QWidget *widget) |
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget. More... | |
Protected Member Functions inherited from QgsPanelWidget | |
void | keyPressEvent (QKeyEvent *event) override |
Overridden key press event to handle the esc event on the widget. More... | |
A generic widget allowing users to pick a Coordinate Reference System (or define their own).
Definition at line 39 of file qgsprojectionselectiondialog.h.
QgsCrsSelectionWidget::QgsCrsSelectionWidget | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsCrsSelectionWidget, with the specified parent widget.
Definition at line 32 of file qgsprojectionselectiondialog.cpp.
|
override |
Definition at line 109 of file qgsprojectionselectiondialog.cpp.
QgsCoordinateReferenceSystem QgsCrsSelectionWidget::crs | ( | ) | const |
Returns the CRS currently selected in the widget.
Definition at line 189 of file qgsprojectionselectiondialog.cpp.
|
signal |
Emitted when the CRS defined in the widget is changed.
|
signal |
Emitted when a CRS entry in the widget is double-clicked.
bool QgsCrsSelectionWidget::hasValidSelection | ( | ) | const |
Returns true
if the widget has a valid CRS defined.
Definition at line 170 of file qgsprojectionselectiondialog.cpp.
|
signal |
Emitted when the widget has a valid selection or not.
|
slot |
Sets the crs to show within the widget.
Definition at line 206 of file qgsprojectionselectiondialog.cpp.
void QgsCrsSelectionWidget::setMessage | ( | const QString & | message | ) |
Sets a message to show in the dialog.
Definition at line 115 of file qgsprojectionselectiondialog.cpp.
void QgsCrsSelectionWidget::setNotSetText | ( | const QString & | text, |
const QString & | description = QString() |
||
) |
Sets the text to show for the not set option.
Note that this option is not shown by default and must be set visible by calling setShowNoCrs().
The description argument can be used to specify a detailed description which is shown when the option is selected.
Definition at line 158 of file qgsprojectionselectiondialog.cpp.
|
slot |
filters this dialog by the given CRSs
Sets this dialog to filter the available CRSs to those listed by the given Coordinate Reference Systems.
crsFilter | a list of OGC Coordinate Reference Systems to filter the list of CRS by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support. |
Definition at line 237 of file qgsprojectionselectiondialog.cpp.
void QgsCrsSelectionWidget::setShowNoCrs | ( | bool | show | ) |
Sets whether a "no/invalid" CRS option should be shown.
If this option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
Definition at line 122 of file qgsprojectionselectiondialog.cpp.
bool QgsCrsSelectionWidget::showNoCrs | ( | ) | const |
Returns whether the "no/invalid" CRS option is shown.
If this option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
Definition at line 153 of file qgsprojectionselectiondialog.cpp.