@@ -223,6 +223,9 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
223
223
mWMSAbstract ->setPlainText ( QgsProject::instance ()->readEntry ( " WMSServiceAbstract" , " /" , " " ) );
224
224
mWMSOnlineResourceLineEdit ->setText ( QgsProject::instance ()->readEntry ( " WMSOnlineResource" , " /" , " " ) );
225
225
mWMSUrlLineEdit ->setText ( QgsProject::instance ()->readEntry ( " WMSUrl" , " /" , " " ) );
226
+ mWMSFees ->setText ( QgsProject::instance ()->readEntry ( " WMSFees" , " /" , " " ) );
227
+ mWMSAccessConstraints ->setText ( QgsProject::instance ()->readEntry ( " WMSAccessConstraints" , " /" , " " ) );
228
+ mWMSKeywordList ->setText ( QgsProject::instance ()->readListEntry ( " WMSKeywordList" , " /" ).join ( " ," ) );
226
229
227
230
bool ok;
228
231
QStringList values;
@@ -304,14 +307,14 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
304
307
QStringList wfstInsertLayerIdList = QgsProject::instance ()->readListEntry ( " WFSTLayers" , " Insert" );
305
308
QStringList wfstDeleteLayerIdList = QgsProject::instance ()->readListEntry ( " WFSTLayers" , " Delete" );
306
309
307
- QSignalMapper *smPublied = new QSignalMapper (this );
308
- connect (smPublied, SIGNAL (mapped (int ) ), this , SLOT (on_cbxWFSPublied_stateChanged (int )) );
309
- QSignalMapper *smUpdate = new QSignalMapper (this );
310
- connect (smUpdate, SIGNAL (mapped (int ) ), this , SLOT (on_cbxWFSUpdate_stateChanged (int )) );
311
- QSignalMapper *smInsert = new QSignalMapper (this );
312
- connect (smInsert, SIGNAL (mapped (int ) ), this , SLOT (on_cbxWFSInsert_stateChanged (int )) );
313
- QSignalMapper *smDelete = new QSignalMapper (this );
314
- connect (smDelete, SIGNAL (mapped (int ) ), this , SLOT (on_cbxWFSDelete_stateChanged (int )) );
310
+ QSignalMapper *smPublied = new QSignalMapper ( this );
311
+ connect ( smPublied, SIGNAL ( mapped ( int ) ), this , SLOT ( on_cbxWFSPublied_stateChanged ( int ) ) );
312
+ QSignalMapper *smUpdate = new QSignalMapper ( this );
313
+ connect ( smUpdate, SIGNAL ( mapped ( int ) ), this , SLOT ( on_cbxWFSUpdate_stateChanged ( int ) ) );
314
+ QSignalMapper *smInsert = new QSignalMapper ( this );
315
+ connect ( smInsert, SIGNAL ( mapped ( int ) ), this , SLOT ( on_cbxWFSInsert_stateChanged ( int ) ) );
316
+ QSignalMapper *smDelete = new QSignalMapper ( this );
317
+ connect ( smDelete, SIGNAL ( mapped ( int ) ), this , SLOT ( on_cbxWFSDelete_stateChanged ( int ) ) );
315
318
316
319
twWFSLayers->setColumnCount ( 5 );
317
320
twWFSLayers->horizontalHeader ()->setVisible ( true );
@@ -337,37 +340,37 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
337
340
cbp->setChecked ( wfsLayerIdList.contains ( currentLayer->id () ) );
338
341
twWFSLayers->setCellWidget ( j, 1 , cbp );
339
342
340
- smPublied->setMapping (cbp, j);
341
- connect (cbp, SIGNAL (stateChanged (int ) ), smPublied, SLOT (map ()) );
343
+ smPublied->setMapping ( cbp, j );
344
+ connect ( cbp, SIGNAL ( stateChanged ( int ) ), smPublied, SLOT ( map () ) );
342
345
343
346
QgsVectorLayer* vlayer = qobject_cast<QgsVectorLayer*>( currentLayer );
344
347
QgsVectorDataProvider* provider = vlayer->dataProvider ();
345
- if ( ( provider->capabilities () & QgsVectorDataProvider::ChangeAttributeValues ) && (provider->capabilities () & QgsVectorDataProvider::ChangeGeometries ) )
348
+ if (( provider->capabilities () & QgsVectorDataProvider::ChangeAttributeValues ) && ( provider->capabilities () & QgsVectorDataProvider::ChangeGeometries ) )
346
349
{
347
350
QCheckBox* cbu = new QCheckBox ();
348
351
cbu->setChecked ( wfstUpdateLayerIdList.contains ( currentLayer->id () ) );
349
352
twWFSLayers->setCellWidget ( j, 2 , cbu );
350
353
351
- smUpdate->setMapping (cbu, j);
352
- connect (cbu, SIGNAL (stateChanged (int ) ), smUpdate, SLOT (map ()) );
354
+ smUpdate->setMapping ( cbu, j );
355
+ connect ( cbu, SIGNAL ( stateChanged ( int ) ), smUpdate, SLOT ( map () ) );
353
356
}
354
- if ( ( provider->capabilities () & QgsVectorDataProvider::AddFeatures ) )
357
+ if (( provider->capabilities () & QgsVectorDataProvider::AddFeatures ) )
355
358
{
356
359
QCheckBox* cbi = new QCheckBox ();
357
360
cbi->setChecked ( wfstInsertLayerIdList.contains ( currentLayer->id () ) );
358
361
twWFSLayers->setCellWidget ( j, 3 , cbi );
359
362
360
- smInsert->setMapping (cbi, j);
361
- connect (cbi, SIGNAL (stateChanged (int ) ), smInsert, SLOT (map ()) );
363
+ smInsert->setMapping ( cbi, j );
364
+ connect ( cbi, SIGNAL ( stateChanged ( int ) ), smInsert, SLOT ( map () ) );
362
365
}
363
- if ( ( provider->capabilities () & QgsVectorDataProvider::DeleteFeatures ) )
366
+ if (( provider->capabilities () & QgsVectorDataProvider::DeleteFeatures ) )
364
367
{
365
368
QCheckBox* cbd = new QCheckBox ();
366
369
cbd->setChecked ( wfstDeleteLayerIdList.contains ( currentLayer->id () ) );
367
370
twWFSLayers->setCellWidget ( j, 4 , cbd );
368
371
369
- smDelete->setMapping (cbd, j);
370
- connect (cbd, SIGNAL (stateChanged (int ) ), smDelete, SLOT (map ()) );
372
+ smDelete->setMapping ( cbd, j );
373
+ connect ( cbd, SIGNAL ( stateChanged ( int ) ), smDelete, SLOT ( map () ) );
371
374
}
372
375
373
376
j++;
@@ -567,6 +570,9 @@ void QgsProjectProperties::apply()
567
570
QgsProject::instance ()->writeEntry ( " WMSServiceAbstract" , " /" , mWMSAbstract ->toPlainText () );
568
571
QgsProject::instance ()->writeEntry ( " WMSOnlineResource" , " /" , mWMSOnlineResourceLineEdit ->text () );
569
572
QgsProject::instance ()->writeEntry ( " WMSUrl" , " /" , mWMSUrlLineEdit ->text () );
573
+ QgsProject::instance ()->writeEntry ( " WMSFees" , " /" , mWMSFees ->text () );
574
+ QgsProject::instance ()->writeEntry ( " WMSAccessConstraints" , " /" , mWMSAccessConstraints ->text () );
575
+ QgsProject::instance ()->writeEntry ( " WMSKeywordList" , " /" , mWMSKeywordList ->text ().split ( " ," ) );
570
576
571
577
if ( grpWMSExt->isChecked () )
572
578
{
@@ -762,58 +768,58 @@ void QgsProjectProperties::on_cbxProjectionEnabled_stateChanged( int state )
762
768
763
769
void QgsProjectProperties::on_cbxWFSPublied_stateChanged ( int aIdx )
764
770
{
765
- QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 1 ) );
766
- if ( cb && !cb->isChecked () )
767
- {
768
- QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 2 ) );
769
- if ( cbn )
770
- cbn->setChecked (false );
771
- }
771
+ QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 1 ) );
772
+ if ( cb && !cb->isChecked () )
773
+ {
774
+ QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 2 ) );
775
+ if ( cbn )
776
+ cbn->setChecked ( false );
777
+ }
772
778
}
773
779
774
780
void QgsProjectProperties::on_cbxWFSUpdate_stateChanged ( int aIdx )
775
781
{
776
- QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 2 ) );
777
- if ( cb && cb->isChecked () )
778
- {
779
- QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 1 ) );
780
- if ( cbn )
781
- cbn->setChecked (true );
782
- }
783
- else if ( cb && !cb->isChecked () )
784
- {
785
- QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 3 ) );
786
- if ( cbn )
787
- cbn->setChecked (false );
788
- }
782
+ QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 2 ) );
783
+ if ( cb && cb->isChecked () )
784
+ {
785
+ QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 1 ) );
786
+ if ( cbn )
787
+ cbn->setChecked ( true );
788
+ }
789
+ else if ( cb && !cb->isChecked () )
790
+ {
791
+ QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 3 ) );
792
+ if ( cbn )
793
+ cbn->setChecked ( false );
794
+ }
789
795
}
790
796
791
797
void QgsProjectProperties::on_cbxWFSInsert_stateChanged ( int aIdx )
792
798
{
793
- QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 3 ) );
794
- if ( cb && cb->isChecked () )
795
- {
796
- QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 2 ) );
797
- if ( cbn )
798
- cbn->setChecked (true );
799
- }
800
- else if ( cb && !cb->isChecked () )
801
- {
802
- QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 4 ) );
803
- if ( cbn )
804
- cbn->setChecked (false );
805
- }
799
+ QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 3 ) );
800
+ if ( cb && cb->isChecked () )
801
+ {
802
+ QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 2 ) );
803
+ if ( cbn )
804
+ cbn->setChecked ( true );
805
+ }
806
+ else if ( cb && !cb->isChecked () )
807
+ {
808
+ QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 4 ) );
809
+ if ( cbn )
810
+ cbn->setChecked ( false );
811
+ }
806
812
}
807
813
808
814
void QgsProjectProperties::on_cbxWFSDelete_stateChanged ( int aIdx )
809
815
{
810
- QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 4 ) );
811
- if ( cb && cb->isChecked () )
812
- {
813
- QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 3 ) );
814
- if ( cbn )
815
- cbn->setChecked (true );
816
- }
816
+ QCheckBox* cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 4 ) );
817
+ if ( cb && cb->isChecked () )
818
+ {
819
+ QCheckBox* cbn = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( aIdx, 3 ) );
820
+ if ( cbn )
821
+ cbn->setChecked ( true );
822
+ }
817
823
}
818
824
819
825
void QgsProjectProperties::setMapUnitsToCurrentProjection ()
0 commit comments