Skip to content
Permalink
Browse files
improve image format selecting in wms selection dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk@13495 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 15, 2010
1 parent 02f6b71 commit 80973c9cc748c82c1258ef0f9197e254835a692d
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/app/qgswmssourceselect.cpp
@@ -96,6 +96,9 @@ QgsWMSSourceSelect::QgsWMSSourceSelect( QWidget * parent, Qt::WFlags fl )
mFormats << "image/png8"; // used by geoserver
mLabels << "PNG8";

mFormats << "png"; // used by french IGN geoportail
mLabels << "PNG";

mFormats << "pngt"; // used by french IGN geoportail
mLabels << "PNGT";
}
@@ -128,12 +131,14 @@ QgsWMSSourceSelect::QgsWMSSourceSelect( QWidget * parent, Qt::WFlags fl )

QRadioButton *btn = new QRadioButton( mLabels[i] );
btn->setToolTip( mFormats[i] );
btn->setHidden( true );
mImageFormatGroup->addButton( btn, i );
layout->addWidget( btn );
}

// default to first encoding
mImageFormatGroup->button( 0 )->setChecked( true );
btnGrpImageEncoding->setDisabled( true );

layout->addStretch();
btnGrpImageEncoding->setLayout( layout );
@@ -291,7 +296,7 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )

foreach( QAbstractButton *b, mImageFormatGroup->buttons() )
{
b->setEnabled( false );
b->setHidden( true );
}

foreach( QString encoding, wmsProvider->supportedImageEncodings() )
@@ -303,9 +308,11 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )
continue;
}

mImageFormatGroup->button( id )->setEnabled( true );
mImageFormatGroup->button( id )->setVisible( true );
}

btnGrpImageEncoding->setEnabled( true );

QMap<int, QgsNumericSortTreeWidgetItem *> items;
QMap<int, int> layerParents;
QMap<int, QStringList> layerParentNames;

0 comments on commit 80973c9

Please sign in to comment.