Skip to content

Commit df4360b

Browse files
committed
identation update
1 parent 3d91663 commit df4360b

17 files changed

+47
-47
lines changed

python/gui/qgsfieldcombobox.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class QgsFieldComboBox : QComboBox
3232
public slots:
3333
//! set the layer of which the fields are listed
3434
void setLayer( QgsVectorLayer* layer );
35-
35+
3636
//! convenience slot to connect QgsMapLayerComboBox layer signal
3737
void setLayer( QgsMapLayer* layer );
3838

python/gui/qgsfieldexpressionwidget.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ class QgsFieldExpressionWidget : QWidget
2727
QgsVectorLayer* layer();
2828

2929
signals:
30-
//! the signal is emitted when the currently selected field changes
31-
void fieldChanged( QString fieldName );
32-
30+
//! the signal is emitted when the currently selected field changes
31+
void fieldChanged( QString fieldName );
32+
3333
//! fieldChanged signal with indication of the validity of the expression
3434
void fieldChanged( QString fieldName, bool isValid );
3535

3636
public slots:
3737
//! set the layer used to display the fields and expression
3838
void setLayer( QgsVectorLayer* layer );
39-
39+
4040
//! convenience slot to connect QgsMapLayerComboBox layer signal
4141
void setLayer( QgsMapLayer* layer );
4242

python/gui/qgsfieldmodel.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QgsFieldModel : QAbstractItemModel
2828

2929
//! return the index corresponding to a given fieldName
3030
QModelIndex indexFromName( QString fieldName );
31-
31+
3232
//! returns the currently used layer
3333
void setAllowExpression( bool allowExpression );
3434
bool allowExpression();
@@ -38,7 +38,7 @@ class QgsFieldModel : QAbstractItemModel
3838
* @return the model index of the newly added expression
3939
*/
4040
QModelIndex setExpression( QString expression );
41-
41+
4242
//! remove expressions from the model
4343
void removeExpression();
4444

@@ -48,10 +48,10 @@ class QgsFieldModel : QAbstractItemModel
4848
public slots:
4949
//! set the layer of whch fields are displayed
5050
void setLayer( QgsVectorLayer *layer );
51-
51+
5252
protected slots:
5353
virtual void updateModel();
54-
54+
5555
// QAbstractItemModel interface
5656
public:
5757
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;

python/gui/qgsmapcanvas.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class QgsMapCanvas : QGraphicsView
354354

355355
//! Emit map tool changed event
356356
void mapToolSet( QgsMapTool *tool );
357-
357+
358358
//! Emit map tool changed with the old tool
359359
//! @note added in 2.3
360360
void mapToolSet( QgsMapTool *newTool, QgsMapTool* oldTool );

python/gui/qgsmaptool.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class QgsMapTool : QObject
105105

106106
//! returns pointer to the tool's map canvas
107107
QgsMapCanvas* canvas();
108-
108+
109109
/** return the tool name
110110
* @note added in 2.3
111111
*/

python/plugins/processing/core/ProcessingConfig.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ def getSettings():
142142

143143

144144
@staticmethod
145-
def readSettings():
145+
def readSettings():
146146
for setting in ProcessingConfig.settings.values():
147147
setting.read()
148-
148+
149149

150150
@staticmethod
151151
def getSetting(name):
@@ -177,15 +177,15 @@ def __init__(self, group, name, description, default, hidden=False, valuetype =
177177
self.value = default
178178
self.hidden = hidden
179179
self.valuetype = valuetype
180-
180+
181181
def read(self):
182-
qsettings = QSettings()
182+
qsettings = QSettings()
183183
value = qsettings.value(self.qname, None)
184184
if value is not None:
185185
if isinstance(self.value, bool):
186186
value = str(value).lower() == str(True).lower()
187187
self.value = value
188-
188+
189189
def save(self):
190190
QSettings().setValue(self.qname, self.value)
191191

python/plugins/processing/gui/ScriptEditorDialog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ScriptEditorDialog(QDialog, Ui_DlgScriptEditor):
5252

5353
SCRIPT_PYTHON = 0
5454
SCRIPT_R = 1
55-
55+
5656
hasChanged = False
5757

5858
def __init__(self, algType, alg):
@@ -101,7 +101,7 @@ def __init__(self, algType, alg):
101101

102102
self.update = False
103103
self.help = None
104-
104+
105105
self.setHasChanged(False)
106106

107107
self.editor.setLexerType(self.algType)
@@ -177,7 +177,7 @@ def saveScript(self, saveAs):
177177
def setHasChanged(self, hasChanged):
178178
self.hasChanged = hasChanged
179179
self.btnSave.setEnabled(hasChanged)
180-
180+
181181
def runAlgorithm(self):
182182
if self.algType == self.SCRIPT_PYTHON:
183183
alg = ScriptAlgorithm(None, unicode(self.editor.text()))

python/plugins/processing/modeler/AddModelFromFileAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(self):
4141

4242
def getIcon(self):
4343
return QtGui.QIcon(os.path.dirname(__file__) + '/../images/model.png')
44-
44+
4545
def execute(self):
4646
filename = QtGui.QFileDialog.getOpenFileName(self.toolbox, 'model files', None,
4747
'*.model')

python/plugins/processing/script/AddScriptFromFileAction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self):
4040

4141
def getIcon(self):
4242
return QtGui.QIcon(':/processing/images/script.png')
43-
43+
4444
def execute(self):
4545
filename = QtGui.QFileDialog.getOpenFileName(self.toolbox, 'Script files', None,
4646
'*.py')

python/plugins/processing/script/scripts/Chainage.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
from processing.core.VectorWriter import VectorWriter
1111

1212

13-
def create_points(feat):
14-
geom = feat.geometry()
13+
def create_points(feat):
14+
geom = feat.geometry()
1515
length = geom.length()
1616
currentdistance = 0
1717

1818
if endpoint > 0:
1919
length = endpoint
20-
20+
2121
out = QgsFeature()
2222

23-
while startpoint + currentdistance <= length:
24-
point = geom.interpolate(startpoint + currentdistance)
23+
while startpoint + currentdistance <= length:
24+
point = geom.interpolate(startpoint + currentdistance)
2525
currentdistance = currentdistance + distance
26-
out.setGeometry(point)
27-
attrs = feat.attributes()
28-
attrs.append(currentdistance)
26+
out.setGeometry(point)
27+
attrs = feat.attributes()
28+
attrs.append(currentdistance)
2929
out.setAttributes(attrs)
30-
writer.addFeature(out)
30+
writer.addFeature(out)
3131

3232

3333
layer = processing.getObject(lines)
@@ -39,7 +39,7 @@ def create_points(feat):
3939
feats = processing.features(layer)
4040
nFeat = len(feats)
4141
for i, feat in enumerate(feats):
42-
progress.setPercentage(int(100 * i / nFeat))
42+
progress.setPercentage(int(100 * i / nFeat))
4343
create_points(feat)
4444

4545
del writer

python/plugins/processing/script/scripts/Unique_values_count.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
# create dictionary for unique values count
3030
count = {}
31-
31+
3232
# count unique values for the given band
3333
for col in range( xsize ):
3434
for row in range( ysize ):
@@ -37,7 +37,7 @@
3737
# check if cell_value is NaN
3838
if math.isnan(cell_value):
3939
cell_value = 'Null'
40-
40+
4141
# round floats if needed
4242
elif round_values_to_ndigits:
4343
try:
@@ -51,12 +51,11 @@
5151
except:
5252
count[cell_value] = 1
5353

54-
# print results sorted by cell_value
54+
# print results sorted by cell_value
5555
for key in sorted(count.iterkeys()):
5656
line = "<TD>%s</TD> <TD>%s</TD> <TD>%s</TD>" %(i, key, count[key])
5757
f.write('<TR>'+ line + '</TR>' + '\n')
58-
58+
5959
f.write('</TABLE>')
6060
f.close
6161

62-

src/app/composer/qgscomposermanager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,10 @@ void QgsComposerManager::openLocalDirectory( const QString& localDirPath )
284284
}
285285

286286
#ifdef Q_WS_MAC
287-
void QgsComposerManager::showEvent(QShowEvent* event)
287+
void QgsComposerManager::showEvent( QShowEvent* event )
288288
{
289-
if(!event->spontaneous()) {
289+
if ( !event->spontaneous() )
290+
{
290291
QgisApp::instance()->addWindow( mWindowAction );
291292
}
292293
}

src/app/composer/qgscomposermanager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
5454
QString mUserTemplatesDir;
5555

5656
#ifdef Q_WS_MAC
57-
void showEvent(QShowEvent *event);
58-
void changeEvent(QEvent *);
57+
void showEvent( QShowEvent *event );
58+
void changeEvent( QEvent * );
5959

6060
QAction* mWindowAction;
6161
#endif

src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ void QgisApp::showPythonDialog()
12291229
{
12301230
QString className, text;
12311231
mPythonUtils->getError( className, text );
1232-
messageBar()->pushMessage( tr( "Error" ), tr( "Failed to open Python console:" ) + "\n" + className + ": " + text, QgsMessageBar::WARNING);
1232+
messageBar()->pushMessage( tr( "Error" ), tr( "Failed to open Python console:" ) + "\n" + className + ": " + text, QgsMessageBar::WARNING );
12331233
}
12341234
#ifdef Q_WS_MAC
12351235
else

src/app/qgsidentifyresultsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ void QgsIdentifyResultsDialog::handleCurrentItemChanged( QTreeWidgetItem *curren
11011101
mOpenFormButton->setEnabled( featItem && featItem->feature().isValid() );
11021102

11031103
QgsVectorLayer *vlayer = vectorLayer( current );
1104-
if( vlayer )
1104+
if ( vlayer )
11051105
{
11061106
mOpenFormButton->setToolTip( vlayer->isEditable() ? tr( "Edit feature form" ) : tr( "View feature form" ) );
11071107
}

src/gui/qgsmaptool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ void QgsMapTool::deactivate()
9898

9999
void QgsMapTool::setAction( QAction* action )
100100
{
101-
if( mAction )
101+
if ( mAction )
102102
disconnect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
103103
mAction = action;
104104
connect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
105105
}
106106

107107
void QgsMapTool::actionDestroyed()
108108
{
109-
if( mAction == sender() )
109+
if ( mAction == sender() )
110110
mAction = 0;
111111
}
112112

src/gui/symbology-ng/qgsdatadefinedsymboldialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include <QPushButton>
88

99
QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QList< DataDefinedSymbolEntry >& entries, const QgsVectorLayer* vl, QWidget * parent, Qt::WindowFlags f )
10-
: QDialog( parent, f )
11-
, mVectorLayer( vl )
10+
: QDialog( parent, f )
11+
, mVectorLayer( vl )
1212
{
1313
setupUi( this );
1414

@@ -159,7 +159,7 @@ int QgsDataDefinedSymbolDialog::comboIndexForExpressionString( const QString& ex
159159
{
160160
QString attributeString = expr.trimmed();
161161
int comboIndex = cb->findText( attributeString );
162-
if ( comboIndex == -1 && attributeString.startsWith( '"' ) && attributeString.endsWith( '"') )
162+
if ( comboIndex == -1 && attributeString.startsWith( '"' ) && attributeString.endsWith( '"' ) )
163163
{
164164
attributeString.remove( 0, 1 ).chop( 1 );
165165
comboIndex = cb->findText( attributeString );

0 commit comments

Comments
 (0)