Skip to content

Commit

Permalink
automatic indentation update (r10457-r10488)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10489 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 6, 2009
1 parent 1bfc5c6 commit 39b28ed
Show file tree
Hide file tree
Showing 81 changed files with 12,233 additions and 11,090 deletions.
60 changes: 30 additions & 30 deletions src/app/qgsoptions.cpp
Expand Up @@ -198,19 +198,19 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
mDefaultSnappingToleranceSpinBox->setValue( settings.value( "/qgis/digitizing/default_snapping_tolerance", 0 ).toDouble() );
mSearchRadiusVertexEditSpinBox->setValue( settings.value( "/qgis/digitizing/search_radius_vertex_edit", 10 ).toDouble() );
int index;
if (settings.value( "/qgis/digitizing/default_snapping_tolerance_unit", 0 ).toInt() == QgsTolerance::MapUnits)
if ( settings.value( "/qgis/digitizing/default_snapping_tolerance_unit", 0 ).toInt() == QgsTolerance::MapUnits )
{
index = mDefaultSnappingToleranceComboBox->findText( tr( "map units" ) );
}
}
else
{
index = mDefaultSnappingToleranceComboBox->findText( tr( "pixels" ) );
}
mDefaultSnappingToleranceComboBox->setCurrentIndex( index );
if (settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", 0 ).toInt() == QgsTolerance::MapUnits)
if ( settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", 0 ).toInt() == QgsTolerance::MapUnits )
{
index = mSearchRadiusVertexEditComboBox->findText( tr( "map units" ) );
}
}
else
{
index = mSearchRadiusVertexEditComboBox->findText( tr( "pixels" ) );
Expand Down Expand Up @@ -242,19 +242,19 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
groupBox_5->setEnabled( false );
#endif //Q_WS_MAC

//overlay placement algorithm
mOverlayAlgorithmComboBox->insertItem(0, tr("Central point (fastest)"));
mOverlayAlgorithmComboBox->insertItem(1, tr("Chain (fast)"));
mOverlayAlgorithmComboBox->insertItem(2, tr("Popmusic tabu chain (slow)"));
mOverlayAlgorithmComboBox->insertItem(3, tr("Popmusic tabu (slow)"));
mOverlayAlgorithmComboBox->insertItem(4, tr("Popmusic chain (very slow)"));

QString overlayAlgorithmString = settings.value( "qgis/overlayPlacementAlgorithm", "Central point").toString();
if(overlayAlgorithmString == "Chain"){mOverlayAlgorithmComboBox->setCurrentIndex(1);}
else if(overlayAlgorithmString == "Popmusic tabu chain"){mOverlayAlgorithmComboBox->setCurrentIndex(2);}
else if(overlayAlgorithmString == "Popmusic tabu"){mOverlayAlgorithmComboBox->setCurrentIndex(3);}
else if(overlayAlgorithmString == "Popmusic chain"){mOverlayAlgorithmComboBox->setCurrentIndex(4);}
else{mOverlayAlgorithmComboBox->setCurrentIndex(0);} //default is central point
//overlay placement algorithm
mOverlayAlgorithmComboBox->insertItem( 0, tr( "Central point (fastest)" ) );
mOverlayAlgorithmComboBox->insertItem( 1, tr( "Chain (fast)" ) );
mOverlayAlgorithmComboBox->insertItem( 2, tr( "Popmusic tabu chain (slow)" ) );
mOverlayAlgorithmComboBox->insertItem( 3, tr( "Popmusic tabu (slow)" ) );
mOverlayAlgorithmComboBox->insertItem( 4, tr( "Popmusic chain (very slow)" ) );

QString overlayAlgorithmString = settings.value( "qgis/overlayPlacementAlgorithm", "Central point" ).toString();
if ( overlayAlgorithmString == "Chain" ) {mOverlayAlgorithmComboBox->setCurrentIndex( 1 );}
else if ( overlayAlgorithmString == "Popmusic tabu chain" ) {mOverlayAlgorithmComboBox->setCurrentIndex( 2 );}
else if ( overlayAlgorithmString == "Popmusic tabu" ) {mOverlayAlgorithmComboBox->setCurrentIndex( 3 );}
else if ( overlayAlgorithmString == "Popmusic chain" ) {mOverlayAlgorithmComboBox->setCurrentIndex( 4 );}
else {mOverlayAlgorithmComboBox->setCurrentIndex( 0 );} //default is central point
}

//! Destructor
Expand Down Expand Up @@ -346,25 +346,25 @@ void QgsOptions::saveOptions()

//overlay placement method
int overlayIndex = mOverlayAlgorithmComboBox->currentIndex();
if(overlayIndex == 1)
if ( overlayIndex == 1 )
{
settings.setValue( "qgis/overlayPlacementAlgorithm", "Chain");
settings.setValue( "qgis/overlayPlacementAlgorithm", "Chain" );
}
else if(overlayIndex == 2)
else if ( overlayIndex == 2 )
{
settings.setValue( "qgis/overlayPlacementAlgorithm", "Popmusic tabu chain");
settings.setValue( "qgis/overlayPlacementAlgorithm", "Popmusic tabu chain" );
}
else if(overlayIndex == 3)
else if ( overlayIndex == 3 )
{
settings.setValue( "qgis/overlayPlacementAlgorithm", "Popmusic tabu");
settings.setValue( "qgis/overlayPlacementAlgorithm", "Popmusic tabu" );
}
else if(overlayIndex == 4)
else if ( overlayIndex == 4 )
{
settings.setValue( "qgis/overlayPlacementAlgorithm", "Popmusic chain");
settings.setValue( "qgis/overlayPlacementAlgorithm", "Popmusic chain" );
}
else
{
settings.setValue( "qgis/overlayPlacementAlgorithm", "Central point" );
settings.setValue( "qgis/overlayPlacementAlgorithm", "Central point" );
}

if ( cmbTheme->currentText().length() == 0 )
Expand Down Expand Up @@ -431,10 +431,10 @@ void QgsOptions::saveOptions()
settings.setValue( "/qgis/digitizing/default_snap_mode", defaultSnapModeString );
settings.setValue( "/qgis/digitizing/default_snapping_tolerance", mDefaultSnappingToleranceSpinBox->value() );
settings.setValue( "/qgis/digitizing/search_radius_vertex_edit", mSearchRadiusVertexEditSpinBox->value() );
settings.setValue( "/qgis/digitizing/default_snapping_tolerance_unit",
(mDefaultSnappingToleranceComboBox->currentIndex() == 0 ? QgsTolerance::MapUnits : QgsTolerance::Pixels ) );
settings.setValue( "/qgis/digitizing/search_radius_vertex_edit_unit",
(mSearchRadiusVertexEditComboBox->currentIndex() == 0 ? QgsTolerance::MapUnits : QgsTolerance::Pixels ) );
settings.setValue( "/qgis/digitizing/default_snapping_tolerance_unit",
( mDefaultSnappingToleranceComboBox->currentIndex() == 0 ? QgsTolerance::MapUnits : QgsTolerance::Pixels ) );
settings.setValue( "/qgis/digitizing/search_radius_vertex_edit_unit",
( mSearchRadiusVertexEditComboBox->currentIndex() == 0 ? QgsTolerance::MapUnits : QgsTolerance::Pixels ) );


QString markerComboText = mMarkerStyleComboBox->currentText();
Expand Down
14 changes: 7 additions & 7 deletions src/app/qgspluginregistry.cpp
Expand Up @@ -442,11 +442,11 @@ bool QgsPluginRegistry::isPythonPluginCompatible( QString packageName )

QList<QgsPluginMetadata*> QgsPluginRegistry::pluginData()
{
QList<QgsPluginMetadata*> resultList;
QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.begin();
for(; it != mPlugins.end(); ++it)
{
resultList.push_back(&(it.value()));
}
return resultList;
QList<QgsPluginMetadata*> resultList;
QMap<QString, QgsPluginMetadata>::iterator it = mPlugins.begin();
for ( ; it != mPlugins.end(); ++it )
{
resultList.push_back( &( it.value() ) );
}
return resultList;
}
2 changes: 1 addition & 1 deletion src/app/qgspluginregistry.h
Expand Up @@ -86,7 +86,7 @@ class QgsPluginRegistry

//! Returns metadata of all loaded plugins
QList<QgsPluginMetadata*> pluginData();

protected:
//! protected constructor
QgsPluginRegistry();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsprojectproperties.cpp
Expand Up @@ -314,7 +314,7 @@ void QgsProjectProperties::apply()
{
layerIdList << layerEntryIt.key();
toleranceList << QString::number( layerEntryIt->tolerance, 'f' );
toleranceUnitList << QString::number( (int)layerEntryIt->toleranceUnit );
toleranceUnitList << QString::number(( int )layerEntryIt->toleranceUnit );
if ( layerEntryIt->checked )
{
enabledList << "enabled";
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgssnappingdialog.cpp
Expand Up @@ -95,10 +95,10 @@ QgsSnappingDialog::QgsSnappingDialog( QgsMapCanvas* canvas, const QMap<QString,
index = snapToComboBox->findText( tr( "to vertex and segment" ) );
}
snapToComboBox->setCurrentIndex( index );
if ( settingIt.value().toleranceUnit == 0 )//map units
if ( settingIt.value().toleranceUnit == 0 )//map units
{
index = toleranceUnitsComboBox->findText( tr( "map units" ) );
}
}
else
{
index = toleranceUnitsComboBox->findText( tr( "pixels" ) );
Expand Down
44 changes: 22 additions & 22 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -129,13 +129,13 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
QList<QgsVectorOverlayPlugin*> overlayPluginList = overlayPlugins();
QList<QgsVectorOverlayPlugin*>::const_iterator it = overlayPluginList.constBegin();

for(; it != overlayPluginList.constEnd(); ++it)
{
QgsApplyDialog* d = (*it)->dialog(lyr);
position = tabWidget->addTab(d, (*it)->name());
tabWidget->setCurrentIndex(position); //ugly, but otherwise the properties dialog is a mess
mOverlayDialogs.push_back(d);
}
for ( ; it != overlayPluginList.constEnd(); ++it )
{
QgsApplyDialog* d = ( *it )->dialog( lyr );
position = tabWidget->addTab( d, ( *it )->name() );
tabWidget->setCurrentIndex( position ); //ugly, but otherwise the properties dialog is a mess
mOverlayDialogs.push_back( d );
}

tabWidget->setCurrentIndex( 0 );
} // QgsVectorLayerProperties ctor
Expand Down Expand Up @@ -616,10 +616,10 @@ void QgsVectorLayerProperties::apply()
layer->setTransparency( static_cast < unsigned int >( 255 - sliderTransparency->value() ) );

//apply overlay dialogs
for(QList<QgsApplyDialog*>::iterator it = mOverlayDialogs.begin(); it != mOverlayDialogs.end(); ++it)
{
(*it)->apply();
}
for ( QList<QgsApplyDialog*>::iterator it = mOverlayDialogs.begin(); it != mOverlayDialogs.end(); ++it )
{
( *it )->apply();
}

// update symbology
emit refreshLegend( layer->getLayerID(), false );
Expand Down Expand Up @@ -1058,21 +1058,21 @@ QList<QgsVectorOverlayPlugin*> QgsVectorLayerProperties::overlayPlugins() const
QgsVectorOverlayPlugin* theOverlayPlugin = 0;

QList<QgsPluginMetadata*> pluginData = QgsPluginRegistry::instance()->pluginData();
for(QList<QgsPluginMetadata*>::iterator it = pluginData.begin(); it != pluginData.end(); ++it)
{
if(*it)
for ( QList<QgsPluginMetadata*>::iterator it = pluginData.begin(); it != pluginData.end(); ++it )
{
if ( *it )
{
thePlugin = (*it)->plugin();
if(thePlugin && thePlugin->type() == QgisPlugin::VECTOR_OVERLAY)
{
theOverlayPlugin = dynamic_cast<QgsVectorOverlayPlugin*>(thePlugin);
if(theOverlayPlugin)
thePlugin = ( *it )->plugin();
if ( thePlugin && thePlugin->type() == QgisPlugin::VECTOR_OVERLAY )
{
theOverlayPlugin = dynamic_cast<QgsVectorOverlayPlugin*>( thePlugin );
if ( theOverlayPlugin )
{
pluginList.push_back(theOverlayPlugin);
pluginList.push_back( theOverlayPlugin );
}
}
}
}
}
}

return pluginList;
}

0 comments on commit 39b28ed

Please sign in to comment.