Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Oct 31, 2012
1 parent 62ebf88 commit 98e8ba484b7625f6432f3a8f56af97e83cf865bb
Showing with 397 additions and 384 deletions.
  1. +21 −21 src/app/composer/qgsatlascompositionwidget.cpp
  2. +10 −10 src/app/composer/qgsatlascompositionwidget.h
  3. +134 −133 src/app/composer/qgscomposer.cpp
  4. +1 −1 src/app/composer/qgscomposer.h
  5. +1 −1 src/app/composer/qgscomposerlabelwidget.cpp
  6. +2 −2 src/app/qgsidentifyresults.h
  7. +1 −1 src/app/qgspluginregistry.cpp
  8. +1 −1 src/app/qgsprojectproperties.h
  9. +12 −12 src/app/qgssnappingdialog.cpp
  10. +11 −11 src/core/composer/qgsatlascomposition.cpp
  11. +11 −11 src/core/composer/qgsatlascomposition.h
  12. +7 −7 src/core/composer/qgscomposerlabel.cpp
  13. +3 −3 src/core/composer/qgscomposermap.cpp
  14. +1 −1 src/core/gps/parser.h
  15. +10 −10 src/core/qgserror.h
  16. +5 −5 src/core/qgsexpression.cpp
  17. +16 −16 src/core/qgsgeometry.cpp
  18. +1 −1 src/core/qgsgeometry.h
  19. +7 −7 src/gui/qgscomposerview.cpp
  20. +11 −11 src/gui/qgserrordialog.cpp
  21. +5 −5 src/gui/qgserrordialog.h
  22. +5 −5 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
  23. +2 −2 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
  24. +1 −1 src/gui/symbology-ng/qgsstylev2managerdialog.cpp
  25. +14 −7 src/mapserver/qgsfilter.cpp
  26. +1 −1 src/mapserver/qgsspatialfilter.h
  27. +7 −7 src/mapserver/qgswfsserver.cpp
  28. +1 −1 src/plugins/dxf2shp_converter/getInsertions.cpp
  29. +4 −2 src/plugins/globe/globe_plugin.cpp
  30. +2 −2 src/plugins/globe/globe_plugin_dialog.cpp
  31. +7 −4 src/providers/postgres/qgspostgresprovider.cpp
  32. +1 −1 src/providers/wfs/qgswfsprovider.cpp
  33. +1 −1 src/python/qgspythonutilsimpl.cpp
  34. +34 −34 tests/src/core/testqgsatlascomposition.cpp
  35. +21 −21 tests/src/core/testqgscomposerlabel.cpp
  36. +25 −25 tests/src/core/testqgsexpression.cpp
@@ -23,7 +23,7 @@
#include "qgscomposermap.h"

QgsAtlasCompositionWidget::QgsAtlasCompositionWidget( QWidget* parent, QgsComposition* c ):
QWidget( parent ), mComposition( c )
QWidget( parent ), mComposition( c )
{
setupUi( this );

@@ -34,34 +34,34 @@ QgsAtlasCompositionWidget::QgsAtlasCompositionWidget( QWidget* parent, QgsCompos
for ( QMap<QString, QgsMapLayer*>::const_iterator it = layers.begin(); it != layers.end(); ++it )
{
// Only consider vector layers
if ( dynamic_cast<QgsVectorLayer*>(it.value()) )
if ( dynamic_cast<QgsVectorLayer*>( it.value() ) )
{
mAtlasCoverageLayerComboBox->insertItem( idx++, it.value()->name(), /* userdata */ qVariantFromValue( (void*)it.value() ) );
mAtlasCoverageLayerComboBox->insertItem( idx++, it.value()->name(), /* userdata */ qVariantFromValue(( void* )it.value() ) );
}
}

// Connect to addition / removal of layers
QgsMapLayerRegistry* layerRegistry = QgsMapLayerRegistry::instance();
if ( layerRegistry )
{
connect( layerRegistry, SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( onLayerRemoved( QString ) ) );
connect( layerRegistry, SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( onLayerAdded( QgsMapLayer* ) ) );
}

// update the composer map combo box
// populate the map list
mComposerMapComboBox->clear();
QList<const QgsComposerMap*> availableMaps = mComposition->composerMapItems();
QList<const QgsComposerMap*>::const_iterator mapItemIt = availableMaps.constBegin();
for ( ; mapItemIt != availableMaps.constEnd(); ++mapItemIt )
{
mComposerMapComboBox->addItem( tr( "Map %1" ).arg(( *mapItemIt )->id() ), qVariantFromValue( (void*)*mapItemIt ) );
mComposerMapComboBox->addItem( tr( "Map %1" ).arg(( *mapItemIt )->id() ), qVariantFromValue(( void* )*mapItemIt ) );
}

// Connect to addition / removal of maps
connect( mComposition, SIGNAL( composerMapAdded( QgsComposerMap* ) ), this, SLOT( onComposerMapAdded( QgsComposerMap* ) ) );
connect( mComposition, SIGNAL( itemRemoved( QgsComposerItem* ) ), this, SLOT( onItemRemoved( QgsComposerItem* ) ) );

// connect to updates
connect( &mComposition->atlasComposition(), SIGNAL( parameterChanged() ), this, SLOT( updateGuiElements() ) );

@@ -84,7 +84,7 @@ void QgsAtlasCompositionWidget::on_mUseAtlasCheckBox_stateChanged( int state )
{
atlasMap->setEnabled( false );
mAtlasFrame->setEnabled( false );
}
}
}

void QgsAtlasCompositionWidget::onLayerRemoved( QString layerName )
@@ -113,7 +113,7 @@ void QgsAtlasCompositionWidget::onLayerAdded( QgsMapLayer* map )
QgsVectorLayer* vectorLayer = dynamic_cast<QgsVectorLayer*>( map );
if ( vectorLayer )
{
mAtlasCoverageLayerComboBox->addItem( map->name(), qVariantFromValue( (void*)map ) );
mAtlasCoverageLayerComboBox->addItem( map->name(), qVariantFromValue(( void* )map ) );
}
if ( mAtlasCoverageLayerComboBox->count() == 1 )
{
@@ -124,7 +124,7 @@ void QgsAtlasCompositionWidget::onLayerAdded( QgsMapLayer* map )
void QgsAtlasCompositionWidget::onComposerMapAdded( QgsComposerMap* map )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
mComposerMapComboBox->addItem( tr( "Map %1" ).arg( map->id() ), qVariantFromValue( (void*)map ) );
mComposerMapComboBox->addItem( tr( "Map %1" ).arg( map->id() ), qVariantFromValue(( void* )map ) );
if ( mComposerMapComboBox->count() == 1 )
{
atlasMap->setComposerMap( map );
@@ -137,7 +137,7 @@ void QgsAtlasCompositionWidget::onItemRemoved( QgsComposerItem* item )
QgsComposerMap* map = dynamic_cast<QgsComposerMap*>( item );
if ( map )
{
int idx = mComposerMapComboBox->findData( qVariantFromValue( (void*)map ) );
int idx = mComposerMapComboBox->findData( qVariantFromValue(( void* )map ) );
if ( idx != -1 )
{
mComposerMapComboBox->removeItem( idx );
@@ -162,7 +162,7 @@ void QgsAtlasCompositionWidget::on_mAtlasCoverageLayerComboBox_currentIndexChang
}
else
{
QgsVectorLayer* layer = reinterpret_cast<QgsVectorLayer*>(mAtlasCoverageLayerComboBox->itemData( index ).value<void*>());
QgsVectorLayer* layer = reinterpret_cast<QgsVectorLayer*>( mAtlasCoverageLayerComboBox->itemData( index ).value<void*>() );
atlasMap->setCoverageLayer( layer );
}
}
@@ -180,7 +180,7 @@ void QgsAtlasCompositionWidget::on_mComposerMapComboBox_currentIndexChanged( int
}
else
{
QgsComposerMap* map = reinterpret_cast<QgsComposerMap*>(mComposerMapComboBox->itemData( index ).value<void*>());
QgsComposerMap* map = reinterpret_cast<QgsComposerMap*>( mComposerMapComboBox->itemData( index ).value<void*>() );
atlasMap->setComposerMap( map );
}
}
@@ -203,7 +203,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
{
return;
}

QgsExpressionBuilderDialog exprDlg( atlasMap->coverageLayer(), mAtlasFilenamePatternEdit->text(), this );
exprDlg.setWindowTitle( tr( "Expression based filename" ) );
if ( exprDlg.exec() == QDialog::Accepted )
@@ -268,19 +268,19 @@ void QgsAtlasCompositionWidget::updateGuiElements()
{
mUseAtlasCheckBox->setCheckState( Qt::Unchecked );
}
int idx = mAtlasCoverageLayerComboBox->findData( qVariantFromValue( (void*)atlasMap->coverageLayer() ));

int idx = mAtlasCoverageLayerComboBox->findData( qVariantFromValue(( void* )atlasMap->coverageLayer() ) );
if ( idx != -1 )
{
mAtlasCoverageLayerComboBox->setCurrentIndex( idx );
}
idx = mComposerMapComboBox->findData( qVariantFromValue( (void*)atlasMap->composerMap() ));
idx = mComposerMapComboBox->findData( qVariantFromValue(( void* )atlasMap->composerMap() ) );
if ( idx != -1 )
{
mComposerMapComboBox->setCurrentIndex( idx );
}
mAtlasMarginSpinBox->setValue( static_cast<int>(atlasMap->margin() * 100) );

mAtlasMarginSpinBox->setValue( static_cast<int>( atlasMap->margin() * 100 ) );
mAtlasFilenamePatternEdit->setText( atlasMap->filenamePattern() );
mAtlasFixedScaleCheckBox->setCheckState( atlasMap->fixedScale() ? Qt::Checked : Qt::Unchecked );
mAtlasHideCoverageCheckBox->setCheckState( atlasMap->hideCoverage() ? Qt::Checked : Qt::Unchecked );
@@ -290,5 +290,5 @@ void QgsAtlasCompositionWidget::updateGuiElements()
void QgsAtlasCompositionWidget::blockAllSignals( bool b )
{
mUseAtlasCheckBox->blockSignals( b );
mAtlasFrame->blockSignals( b );
mAtlasFrame->blockSignals( b );
}
@@ -25,15 +25,15 @@ class QgsComposerItem;
* Input widget for QgsAtlasComposition
*/
class QgsAtlasCompositionWidget:
public QWidget,
private Ui::QgsAtlasCompositionWidgetBase
public QWidget,
private Ui::QgsAtlasCompositionWidgetBase
{
Q_OBJECT
public:
public:
QgsAtlasCompositionWidget( QWidget* parent, QgsComposition* c );
~QgsAtlasCompositionWidget();
public slots:

public slots:
void on_mUseAtlasCheckBox_stateChanged( int state );
void on_mComposerMapComboBox_currentIndexChanged( int index );
void on_mAtlasCoverageLayerComboBox_currentIndexChanged( int index );
@@ -42,17 +42,17 @@ public slots:
void on_mAtlasHideCoverageCheckBox_stateChanged( int state );
void on_mAtlasFixedScaleCheckBox_stateChanged( int state );
void on_mAtlasSingleFileCheckBox_stateChanged( int state );
private slots:

private slots:
void onLayerRemoved( QString );
void onLayerAdded( QgsMapLayer* );
void onComposerMapAdded( QgsComposerMap* );
void onItemRemoved( QgsComposerItem* );

void updateGuiElements();
private:

private:
QgsComposition* mComposition;

void blockAllSignals( bool b );
};

0 comments on commit 98e8ba4

Please sign in to comment.
You can’t perform that action at this time.