Skip to content
Permalink
Browse files

run astyle on src/app

  • Loading branch information
3nids committed Mar 3, 2017
1 parent e7079ee commit dccf8c9e134f333ffd1dfe3dbb3e342191bfb13c
Showing 367 changed files with 6,408 additions and 6,406 deletions.
@@ -25,16 +25,16 @@
#include "qgscomposermap.h"
#include "qgsvectorlayer.h"

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

mAtlasCoverageLayerComboBox->setFilters( QgsMapLayerProxyModel::VectorLayer );

connect( mAtlasCoverageLayerComboBox, &QgsMapLayerComboBox::layerChanged, mAtlasSortFeatureKeyComboBox, &QgsFieldComboBox::setLayer );
connect( mAtlasCoverageLayerComboBox, &QgsMapLayerComboBox::layerChanged, mPageNameWidget, &QgsFieldExpressionWidget::setLayer );
connect( mAtlasCoverageLayerComboBox, SIGNAL( layerChanged( QgsMapLayer* ) ), this, SLOT( changeCoverageLayer( QgsMapLayer* ) ) );
connect( mAtlasCoverageLayerComboBox, SIGNAL( layerChanged( QgsMapLayer * ) ), this, SLOT( changeCoverageLayer( QgsMapLayer * ) ) );
connect( mAtlasSortFeatureKeyComboBox, SIGNAL( fieldChanged( QString ) ), this, SLOT( changesSortFeatureField( QString ) ) );
connect( mPageNameWidget, SIGNAL( fieldChanged( QString, bool ) ), this, SLOT( pageNameExpressionChanged( QString, bool ) ) );

@@ -56,7 +56,7 @@ QgsAtlasCompositionWidget::~QgsAtlasCompositionWidget()

void QgsAtlasCompositionWidget::on_mUseAtlasCheckBox_stateChanged( int state )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( state == Qt::Checked )
{
atlasMap->setEnabled( true );
@@ -73,13 +73,13 @@ void QgsAtlasCompositionWidget::on_mUseAtlasCheckBox_stateChanged( int state )

void QgsAtlasCompositionWidget::changeCoverageLayer( QgsMapLayer *layer )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
}

QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer*>( layer );
QgsVectorLayer *vl = dynamic_cast<QgsVectorLayer *>( layer );

if ( !vl )
{
@@ -94,7 +94,7 @@ void QgsAtlasCompositionWidget::changeCoverageLayer( QgsMapLayer *layer )

void QgsAtlasCompositionWidget::on_mAtlasFilenamePatternEdit_editingFinished()
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -114,7 +114,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenamePatternEdit_editingFinished()

void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap || !atlasMap->coverageLayer() )
{
return;
@@ -147,7 +147,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()

void QgsAtlasCompositionWidget::on_mAtlasHideCoverageCheckBox_stateChanged( int state )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -157,7 +157,7 @@ void QgsAtlasCompositionWidget::on_mAtlasHideCoverageCheckBox_stateChanged( int

void QgsAtlasCompositionWidget::on_mAtlasSingleFileCheckBox_stateChanged( int state )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -177,7 +177,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSingleFileCheckBox_stateChanged( int st

void QgsAtlasCompositionWidget::on_mAtlasSortFeatureCheckBox_stateChanged( int state )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -206,7 +206,7 @@ void QgsAtlasCompositionWidget::updateAtlasFeatures()
}

//update atlas features
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -226,9 +226,9 @@ void QgsAtlasCompositionWidget::updateAtlasFeatures()
}
}

void QgsAtlasCompositionWidget::changesSortFeatureField( const QString& fieldName )
void QgsAtlasCompositionWidget::changesSortFeatureField( const QString &fieldName )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -239,7 +239,7 @@ void QgsAtlasCompositionWidget::changesSortFeatureField( const QString& fieldNam

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int state )
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -259,10 +259,10 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString&, bool valid )
void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString &, bool valid )
{
QString expression = mPageNameWidget->asExpression();
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap || ( !valid && !expression.isEmpty() ) )
{
return;
@@ -273,7 +273,7 @@ void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString&, bool

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterEdit_editingFinished()
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -285,8 +285,8 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterEdit_editingFinished()

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterButton_clicked()
{
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer*>( mAtlasCoverageLayerComboBox->currentLayer() );
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
QgsVectorLayer *vl = dynamic_cast<QgsVectorLayer *>( mAtlasCoverageLayerComboBox->currentLayer() );

if ( !atlasMap || !vl )
{
@@ -315,7 +315,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSortFeatureDirectionButton_clicked()
at = ( at == Qt::UpArrow ) ? Qt::DownArrow : Qt::UpArrow;
mAtlasSortFeatureDirectionButton->setArrowType( at );

QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
{
return;
@@ -328,7 +328,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSortFeatureDirectionButton_clicked()
void QgsAtlasCompositionWidget::updateGuiElements()
{
blockAllSignals( true );
QgsAtlasComposition* atlasMap = &mComposition->atlasComposition();
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();

mUseAtlasCheckBox->setCheckState( atlasMap->enabled() ? Qt::Checked : Qt::Unchecked );
mConfigurationGroup->setEnabled( atlasMap->enabled() );
@@ -25,37 +25,37 @@ class QgsComposerItem;
* Input widget for QgsAtlasComposition
*/
class QgsAtlasCompositionWidget:
public QWidget,
private Ui::QgsAtlasCompositionWidgetBase
public QWidget,
private Ui::QgsAtlasCompositionWidgetBase
{
Q_OBJECT
public:
QgsAtlasCompositionWidget( QWidget* parent, QgsComposition* c );
QgsAtlasCompositionWidget( QWidget *parent, QgsComposition *c );
~QgsAtlasCompositionWidget();

public slots:
void on_mUseAtlasCheckBox_stateChanged( int state );
void changeCoverageLayer( QgsMapLayer* layer );
void changeCoverageLayer( QgsMapLayer *layer );
void on_mAtlasFilenamePatternEdit_editingFinished();
void on_mAtlasFilenameExpressionButton_clicked();
void on_mAtlasHideCoverageCheckBox_stateChanged( int state );
void on_mAtlasSingleFileCheckBox_stateChanged( int state );

void on_mAtlasSortFeatureCheckBox_stateChanged( int state );
void changesSortFeatureField( const QString& fieldName );
void changesSortFeatureField( const QString &fieldName );
void on_mAtlasSortFeatureDirectionButton_clicked();
void on_mAtlasFeatureFilterEdit_editingFinished();
void on_mAtlasFeatureFilterButton_clicked();
void on_mAtlasFeatureFilterCheckBox_stateChanged( int state );
void pageNameExpressionChanged( const QString& expression, bool valid );
void pageNameExpressionChanged( const QString &expression, bool valid );

private slots:
void updateGuiElements();

void updateAtlasFeatures();

private:
QgsComposition* mComposition = nullptr;
QgsComposition *mComposition = nullptr;

void blockAllSignals( bool b );
void checkLayerType( QgsVectorLayer *layer );

0 comments on commit dccf8c9

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