Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Aug 14, 2012
1 parent f6dbc22 commit 0b6da7e
Show file tree
Hide file tree
Showing 20 changed files with 203 additions and 203 deletions.
8 changes: 4 additions & 4 deletions src/app/qgslabelinggui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ void QgsLabelingGui::changePreviewBackground()

mPreviewBackgroundBtn->setColor( color );
scrollArea_mPreview->widget()->setStyleSheet( QString( "background: rgb(%1, %2, %3);" ).arg( QString::number( color.red() ),
QString::number( color.green() ),
QString::number( color.blue() ) ) );
QString::number( color.green() ),
QString::number( color.blue() ) ) );
}

void QgsLabelingGui::changeTextColor()
Expand Down Expand Up @@ -546,12 +546,12 @@ void QgsLabelingGui::updatePreview()
lblFontPreview->setFont( previewFont );

QColor prevColor = btnTextColor->color();
prevColor.setAlphaF( ( 100.0 - (double)(mFontTranspSpinBox->value()) ) / 100.0 );
prevColor.setAlphaF(( 100.0 - ( double )( mFontTranspSpinBox->value() ) ) / 100.0 );
lblFontPreview->setTextColor( prevColor );
if ( chkBuffer->isChecked() )
{
QColor buffColor = btnBufferColor->color();
buffColor.setAlphaF( ( 100.0 - (double)(mBufferTranspSpinBox->value()) ) / 100.0 );
buffColor.setAlphaF(( 100.0 - ( double )( mBufferTranspSpinBox->value() ) ) / 100.0 );
lblFontPreview->setBuffer( spinBufferSize->value(), buffColor );
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgslabelinggui.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class QgsLabelingGui : public QWidget, private Ui::QgsLabelingGuiBase
void on_mFontSizeSpinBox_valueChanged( double d );
void on_mFontSizeUnitComboBox_currentIndexChanged( int index );
void on_mFontTranspSpinBox_valueChanged( int i );
void on_mFontWordSpacingSpinBox_valueChanged(double spacing );
void on_mFontLetterSpacingSpinBox_valueChanged(double spacing );
void on_mFontWordSpacingSpinBox_valueChanged( double spacing );
void on_mFontLetterSpacingSpinBox_valueChanged( double spacing );
void on_mBufferTranspSpinBox_valueChanged( int i );
void on_mXCoordinateComboBox_currentIndexChanged( const QString & text );
void on_mYCoordinateComboBox_currentIndexChanged( const QString & text );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgslabelpropertydialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void QgsLabelPropertyDialog::on_mMinScaleSpinBox_valueChanged( int i )
insertChangedValue( QgsPalLayerSettings::MinScale, i );
}

void QgsLabelPropertyDialog::on_mMaxScaleSpinBox_valueChanged(int i )
void QgsLabelPropertyDialog::on_mMaxScaleSpinBox_valueChanged( int i )
{
insertChangedValue( QgsPalLayerSettings::MaxScale, i );
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgslabelpropertydialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class QgsLabelPropertyDialog: public QDialog, private Ui::QgsLabelPropertyDialog

private slots:
void on_mShowLabelChkbx_toggled( bool chkd );
void on_mMinScaleSpinBox_valueChanged(int i );
void on_mMinScaleSpinBox_valueChanged( int i );
void on_mMaxScaleSpinBox_valueChanged( int i );
void on_mLabelDistanceSpinBox_valueChanged( double d );
void on_mXCoordSpinBox_valueChanged( double d );
Expand Down
70 changes: 35 additions & 35 deletions src/core/composer/qgsaddremovemultiframecommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


QgsAddRemoveMultiFrameCommand::QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame* multiFrame, QgsComposition* c, const QString& text, QUndoCommand* parent ):
QUndoCommand( text, parent ), mMultiFrame( multiFrame ), mComposition( c ), mState(s), mFirstRun( true )
QUndoCommand( text, parent ), mMultiFrame( multiFrame ), mComposition( c ), mState( s ), mFirstRun( true )
{
}

Expand All @@ -31,56 +31,56 @@ QgsAddRemoveMultiFrameCommand::QgsAddRemoveMultiFrameCommand(): mMultiFrame( 0 )

QgsAddRemoveMultiFrameCommand::~QgsAddRemoveMultiFrameCommand()
{
if( mState == Removed )
{
delete mMultiFrame;
}
if ( mState == Removed )
{
delete mMultiFrame;
}
}

void QgsAddRemoveMultiFrameCommand::redo()
{
if( checkFirstRun() )
{
return;
}
switchState();
if ( checkFirstRun() )
{
return;
}
switchState();
}

void QgsAddRemoveMultiFrameCommand::undo()
{
if( checkFirstRun() )
{
return;
}
switchState();
if ( checkFirstRun() )
{
return;
}
switchState();
}

void QgsAddRemoveMultiFrameCommand::switchState()
{
if( mComposition )
if ( mComposition )
{
if ( mState == Added )
{
mComposition->removeMultiFrame( mMultiFrame );
mState = Removed;
}
else
{
if( mState == Added )
{
mComposition->removeMultiFrame( mMultiFrame );
mState = Removed;
}
else
{
mComposition->addMultiFrame( mMultiFrame );
mState = Added;
}
mComposition->addMultiFrame( mMultiFrame );
mState = Added;
}
}
}

bool QgsAddRemoveMultiFrameCommand::checkFirstRun()
{
if( mFirstRun )
{
mFirstRun = false;
return true;
}
else
{
return false;
}
if ( mFirstRun )
{
mFirstRun = false;
return true;
}
else
{
return false;
}
}
28 changes: 14 additions & 14 deletions src/core/composer/qgsaddremovemultiframecommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ class QgsComposition;

class CORE_EXPORT QgsAddRemoveMultiFrameCommand: public QUndoCommand
{
public:
public:

enum State
{
Added = 0,
Removed
};

QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame* multiFrame, QgsComposition* c, const QString& text, QUndoCommand* parent = 0 );
~QgsAddRemoveMultiFrameCommand();
void redo();
void undo();
QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame* multiFrame, QgsComposition* c, const QString& text, QUndoCommand* parent = 0 );
~QgsAddRemoveMultiFrameCommand();
void redo();
void undo();

private:
QgsAddRemoveMultiFrameCommand();
private:
QgsAddRemoveMultiFrameCommand();

//changes between added / removed state
void switchState();
bool checkFirstRun();
//changes between added / removed state
void switchState();
bool checkFirstRun();

QgsComposerMultiFrame* mMultiFrame;
QgsComposition* mComposition;
State mState;
bool mFirstRun;
QgsComposerMultiFrame* mMultiFrame;
QgsComposition* mComposition;
State mState;
bool mFirstRun;
};

#endif // QGSADDREMOVEMULTIFRAMECOMMAND_H
8 changes: 4 additions & 4 deletions src/core/composer/qgscomposerframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#include "qgscomposermultiframe.h"

QgsComposerFrame::QgsComposerFrame( QgsComposition* c, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height )
: QgsComposerItem( x, y, width, height, c )
, mMultiFrame( mf )
: QgsComposerItem( x, y, width, height, c )
, mMultiFrame( mf )
{
}

QgsComposerFrame::QgsComposerFrame()
: QgsComposerItem( 0, 0, 0, 0, 0 )
, mMultiFrame( 0 )
: QgsComposerItem( 0, 0, 0, 0, 0 )
, mMultiFrame( 0 )
{
}

Expand Down
10 changes: 5 additions & 5 deletions src/core/qgscoordinatereferencesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1592,11 +1592,11 @@ bool QgsCoordinateReferenceSystem::loadIDs( QHash<int, QString> &wkts )
continue;

// some CRS are known to fail (see http://trac.osgeo.org/gdal/ticket/2900)
if( epsg==2218 || epsg==2221 || epsg==2296 || epsg==2297 || epsg==2298 || epsg==2299 || epsg==2300 || epsg==2301 || epsg==2302 ||
epsg==2303 || epsg==2304 || epsg==2305 || epsg==2306 || epsg==2307 || epsg==2963 || epsg==2985 || epsg==2986 || epsg==3052 ||
epsg==3053 || epsg==3139 || epsg==3144 || epsg==3145 || epsg==3173 || epsg==3295 || epsg==3993 || epsg==4087 || epsg==4088 ||
epsg==5017 || epsg==5221 || epsg==5224 || epsg==5225 || epsg==5514 || epsg==5515 || epsg==5516 || epsg==5819 || epsg==5820 ||
epsg==5821 || epsg==32600 || epsg==32663 || epsg==32700 )
if ( epsg == 2218 || epsg == 2221 || epsg == 2296 || epsg == 2297 || epsg == 2298 || epsg == 2299 || epsg == 2300 || epsg == 2301 || epsg == 2302 ||
epsg == 2303 || epsg == 2304 || epsg == 2305 || epsg == 2306 || epsg == 2307 || epsg == 2963 || epsg == 2985 || epsg == 2986 || epsg == 3052 ||
epsg == 3053 || epsg == 3139 || epsg == 3144 || epsg == 3145 || epsg == 3173 || epsg == 3295 || epsg == 3993 || epsg == 4087 || epsg == 4088 ||
epsg == 5017 || epsg == 5221 || epsg == 5224 || epsg == 5225 || epsg == 5514 || epsg == 5515 || epsg == 5516 || epsg == 5819 || epsg == 5820 ||
epsg == 5821 || epsg == 32600 || epsg == 32663 || epsg == 32700 )
continue;

if ( OSRImportFromEPSG( crs, epsg ) != OGRERR_NONE )
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
bool conversionOk;
int minScale = minScaleValue.toInt( &conversionOk );
// TODO: occasional floating point issues?
if ( conversionOk && int( context.rendererScale() ) < minScale )
if ( conversionOk && int( context.rendererScale() ) < minScale )
{
return;
}
Expand Down Expand Up @@ -1266,7 +1266,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
fontTransp = ft;
}
}
fontColor.setAlphaF( ( 100.0 - (double)(fontTransp) ) / 100.0 );
fontColor.setAlphaF(( 100.0 - ( double )( fontTransp ) ) / 100.0 );

//font bold
QVariant dataDefinedBold = palGeometry->dataDefinedValues().value( QgsPalLayerSettings::Bold );
Expand Down Expand Up @@ -1326,7 +1326,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
bufferTransp = bt;
}
}
bufferColor.setAlphaF( ( 100.0 - (double)(bufferTransp) ) / 100.0 );
bufferColor.setAlphaF(( 100.0 - ( double )( bufferTransp ) ) / 100.0 );

if ( lyr.bufferSize != 0 )
drawLabel( *it, painter, fontForLabel, fontColor, xform, bufferSize, bufferColor, true );
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,12 +806,12 @@ QStringList QgsSvgMarkerSymbolLayerV2::listSvgFilesAt( QString directory )
for ( int i = 0; i < svgPaths.size(); i++ )
{
QDir dir( svgPaths[i] );
foreach( QString item, dir.entryList( QDir::Dirs | QDir::NoDotAndDotDot ) )
foreach ( QString item, dir.entryList( QDir::Dirs | QDir::NoDotAndDotDot ) )
{
svgPaths.insert( i + 1, dir.path() + "/" + item );
}

foreach( QString item, dir.entryList( QStringList( "*.svg" ), QDir::Files ) )
foreach ( QString item, dir.entryList( QStringList( "*.svg" ), QDir::Files ) )
{
list.append( dir.path() + "/" + item );
}
Expand Down
Loading

0 comments on commit 0b6da7e

Please sign in to comment.