16#ifndef QGSPROVIDERCONNECTIONCOMBOBOX_H
17#define QGSPROVIDERCONNECTIONCOMBOBOX_H
23#include <QSortFilterProxyModel>
29class GUI_EXPORT QgsProviderConnectionComboBoxSortModel:
public QSortFilterProxyModel
33 explicit QgsProviderConnectionComboBoxSortModel( QObject *parent =
nullptr );
35 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right )
const override;
77 void setProvider(
const QString &provider );
83 void setAllowEmptyConnection(
bool allowEmpty );
89 bool allowEmptyConnection()
const;
94 QString currentConnection()
const;
99 QString currentConnectionUri()
const;
106 void setConnection(
const QString &connection );
113 void indexChanged(
int i );
115 void rowsAboutToBeRemoved();
120 QSortFilterProxyModel *mSortModel =
nullptr;
121 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.