QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
The QgsProviderConnectionComboBox class is a combo box which displays the list of connections registered for a given provider. More...
#include <qgsproviderconnectioncombobox.h>
Public Slots | |
void | setConnection (const QString &connection) |
Sets the current connection selected in the combo box. More... | |
Signals | |
void | connectionChanged (const QString &connection) |
Emitted whenever the currently selected connection changes. More... | |
Public Member Functions | |
QgsProviderConnectionComboBox (const QString &provider, QWidget *parent=nullptr) | |
Constructor for QgsProviderConnectionComboBox, for the specified provider. More... | |
QgsProviderConnectionComboBox (QWidget *parent=nullptr) | |
Constructor for QgsProviderConnectionComboBox. More... | |
bool | allowEmptyConnection () const |
Returns true if the combobox allows the empty connection ("not set") choice. More... | |
QString | currentConnection () const |
Returns the name of the current connection selected in the combo box. More... | |
QString | currentConnectionUri () const |
Returns the uri of the current connection selected in the combo box. More... | |
void | setAllowEmptyConnection (bool allowEmpty) |
Sets whether an optional empty connection ("not set") option is present in the combobox. More... | |
void | setProvider (const QString &provider) |
Sets the provider to be used. More... | |
The QgsProviderConnectionComboBox class is a combo box which displays the list of connections registered for a given provider.
Definition at line 50 of file qgsproviderconnectioncombobox.h.
|
explicit |
Constructor for QgsProviderConnectionComboBox, for the specified provider.
Definition at line 19 of file qgsproviderconnectioncombobox.cpp.
|
explicit |
Constructor for QgsProviderConnectionComboBox.
Definition at line 25 of file qgsproviderconnectioncombobox.cpp.
bool QgsProviderConnectionComboBox::allowEmptyConnection | ( | ) | const |
Returns true
if the combobox allows the empty connection ("not set") choice.
Definition at line 63 of file qgsproviderconnectioncombobox.cpp.
|
signal |
Emitted whenever the currently selected connection changes.
QString QgsProviderConnectionComboBox::currentConnection | ( | ) | const |
Returns the name of the current connection selected in the combo box.
Definition at line 98 of file qgsproviderconnectioncombobox.cpp.
QString QgsProviderConnectionComboBox::currentConnectionUri | ( | ) | const |
Returns the uri of the current connection selected in the combo box.
Definition at line 109 of file qgsproviderconnectioncombobox.cpp.
void QgsProviderConnectionComboBox::setAllowEmptyConnection | ( | bool | allowEmpty | ) |
Sets whether an optional empty connection ("not set") option is present in the combobox.
Definition at line 58 of file qgsproviderconnectioncombobox.cpp.
|
slot |
Sets the current connection selected in the combo box.
Definition at line 68 of file qgsproviderconnectioncombobox.cpp.
void QgsProviderConnectionComboBox::setProvider | ( | const QString & | provider | ) |
Sets the provider to be used.
Definition at line 30 of file qgsproviderconnectioncombobox.cpp.