16#ifndef QGSPROVIDERCONNECTIONCOMBOBOX_H
17#define QGSPROVIDERCONNECTIONCOMBOBOX_H
23#include <QSortFilterProxyModel>
29class GUI_EXPORT QgsProviderConnectionComboBoxSortModel :
public QSortFilterProxyModel
33 explicit QgsProviderConnectionComboBoxSortModel( QObject *parent =
nullptr );
36 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right )
const override;
76 void setProvider(
const QString &provider );
82 void setAllowEmptyConnection(
bool allowEmpty );
88 bool allowEmptyConnection()
const;
93 QString currentConnection()
const;
98 QString currentConnectionUri()
const;
105 void setConnection(
const QString &connection );
112 void indexChanged(
int i );
114 void rowsAboutToBeRemoved();
119 QSortFilterProxyModel *mSortModel =
nullptr;
120 QString mPreviousConnection;
The QgsProviderConnectionComboBox class is a combo box which displays the list of connections registe...
void connectionChanged(const QString &connection)
Emitted whenever the currently selected connection changes.
A model containing registered connection names for a specific data provider.