@@ -43,12 +43,12 @@ QgsVirtualLayerSourceSelect::QgsVirtualLayerSourceSelect( QWidget *parent, Qt::W
43
43
setupUi ( this );
44
44
setupButtons ( buttonBox );
45
45
46
- connect ( mTestButton , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::onTestQuery );
47
- connect ( mBrowseCRSBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::onBrowseCRS );
48
- connect ( mAddLayerBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::onAddLayer );
49
- connect ( mRemoveLayerBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::onRemoveLayer );
50
- connect ( mImportLayerBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::onImportLayer );
51
- connect ( mLayersTable ->selectionModel (), &QItemSelectionModel::currentRowChanged, this , &QgsVirtualLayerSourceSelect::onTableRowChanged );
46
+ connect ( mTestButton , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::testQuery );
47
+ connect ( mBrowseCRSBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::browseCRS );
48
+ connect ( mAddLayerBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::addLayer );
49
+ connect ( mRemoveLayerBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::removeLayer );
50
+ connect ( mImportLayerBtn , &QAbstractButton::clicked, this , &QgsVirtualLayerSourceSelect::importLayer );
51
+ connect ( mLayersTable ->selectionModel (), &QItemSelectionModel::currentRowChanged, this , &QgsVirtualLayerSourceSelect::tableRowChanged );
52
52
53
53
// prepare provider list
54
54
Q_FOREACH ( const QString &pk, QgsProviderRegistry::instance ()->providerList () )
@@ -72,8 +72,8 @@ QgsVirtualLayerSourceSelect::QgsVirtualLayerSourceSelect( QWidget *parent, Qt::W
72
72
}
73
73
}
74
74
updateLayersList ();
75
- connect ( mLayerNameCombo , static_cast <void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this , &QgsVirtualLayerSourceSelect::onLayerComboChanged );
76
- onLayerComboChanged ( mLayerNameCombo ->currentIndex () );
75
+ connect ( mLayerNameCombo , static_cast <void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this , &QgsVirtualLayerSourceSelect::layerComboChanged );
76
+ layerComboChanged ( mLayerNameCombo ->currentIndex () );
77
77
78
78
// Prepare embedded layer selection dialog and
79
79
// connect to model changes in the treeview
@@ -97,7 +97,7 @@ void QgsVirtualLayerSourceSelect::refresh()
97
97
updateLayersList ();
98
98
}
99
99
100
- void QgsVirtualLayerSourceSelect::onLayerComboChanged ( int idx )
100
+ void QgsVirtualLayerSourceSelect::layerComboChanged ( int idx )
101
101
{
102
102
if ( idx == -1 )
103
103
return ;
@@ -145,7 +145,7 @@ void QgsVirtualLayerSourceSelect::onLayerComboChanged( int idx )
145
145
}
146
146
}
147
147
148
- void QgsVirtualLayerSourceSelect::onBrowseCRS ()
148
+ void QgsVirtualLayerSourceSelect::browseCRS ()
149
149
{
150
150
QgsProjectionSelectionDialog crsSelector ( this );
151
151
QgsCoordinateReferenceSystem crs ( mSrid );
@@ -196,7 +196,7 @@ QgsVirtualLayerDefinition QgsVirtualLayerSourceSelect::getVirtualLayerDef()
196
196
return def;
197
197
}
198
198
199
- void QgsVirtualLayerSourceSelect::onTestQuery ()
199
+ void QgsVirtualLayerSourceSelect::testQuery ()
200
200
{
201
201
QgsVirtualLayerDefinition def = getVirtualLayerDef ();
202
202
// If the definition is empty just do nothing.
@@ -216,7 +216,7 @@ void QgsVirtualLayerSourceSelect::onTestQuery()
216
216
}
217
217
}
218
218
219
- void QgsVirtualLayerSourceSelect::onAddLayer ()
219
+ void QgsVirtualLayerSourceSelect::addLayer ()
220
220
{
221
221
mLayersTable ->insertRow ( mLayersTable ->rowCount () );
222
222
@@ -234,14 +234,14 @@ void QgsVirtualLayerSourceSelect::onAddLayer()
234
234
mLayersTable ->setCellWidget ( mLayersTable ->rowCount () - 1 , 2 , encodingCombo );
235
235
}
236
236
237
- void QgsVirtualLayerSourceSelect::onRemoveLayer ()
237
+ void QgsVirtualLayerSourceSelect::removeLayer ()
238
238
{
239
239
int currentRow = mLayersTable ->selectionModel ()->currentIndex ().row ();
240
240
if ( currentRow != -1 )
241
241
mLayersTable ->removeRow ( currentRow );
242
242
}
243
243
244
- void QgsVirtualLayerSourceSelect::onTableRowChanged ( const QModelIndex ¤t, const QModelIndex &previous )
244
+ void QgsVirtualLayerSourceSelect::tableRowChanged ( const QModelIndex ¤t, const QModelIndex &previous )
245
245
{
246
246
Q_UNUSED ( previous );
247
247
mRemoveLayerBtn ->setEnabled ( current.row () != -1 );
@@ -321,7 +321,7 @@ void QgsVirtualLayerSourceSelect::updateLayersList()
321
321
void QgsVirtualLayerSourceSelect::addEmbeddedLayer ( const QString &name, const QString &provider, const QString &encoding, const QString &source )
322
322
{
323
323
// insert a new row
324
- onAddLayer ();
324
+ addLayer ();
325
325
const int n = mLayersTable ->rowCount () - 1 ;
326
326
// local name
327
327
mLayersTable ->item ( n, 0 )->setText ( name );
@@ -335,7 +335,7 @@ void QgsVirtualLayerSourceSelect::addEmbeddedLayer( const QString &name, const Q
335
335
encodingCombo->setCurrentIndex ( encodingCombo->findText ( encoding ) );
336
336
}
337
337
338
- void QgsVirtualLayerSourceSelect::onImportLayer ()
338
+ void QgsVirtualLayerSourceSelect::importLayer ()
339
339
{
340
340
if ( mEmbeddedSelectionDialog && mEmbeddedSelectionDialog ->exec () == QDialog::Accepted )
341
341
{
0 commit comments