Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Sep 6, 2012
1 parent 30c7ec4 commit 5603cc0bd2b4c3a68f5bcc804b8065dcf6c01fdc
@@ -511,9 +511,9 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,

// create the notification widget for macros
mMacrosWarn = QgsMessageBar::createMessage( tr( "Security warning:" ),
tr( "macros have been disabled." ),
QgsApplication::getThemeIcon( "/mIconWarn.png" ),
mInfoBar );
tr( "macros have been disabled." ),
QgsApplication::getThemeIcon( "/mIconWarn.png" ),
mInfoBar );

QToolButton *btnEnableMacros = new QToolButton( mMacrosWarn );
btnEnableMacros->setText( tr( "Enable" ) );
@@ -607,7 +607,7 @@ void QgsAttributeTypeDialog::accept()
mValueRelationData.mAllowNull = valueRelationAllowNull->isChecked();
mValueRelationData.mOrderByValue = valueRelationOrderByValue->isChecked();
mValueRelationData.mAllowMulti = valueRelationAllowMulti->isChecked();
if( valueRelationFilterColumn->currentIndex() == 0 )
if ( valueRelationFilterColumn->currentIndex() == 0 )
{
mValueRelationData.mFilterAttributeColumn = QString::null;
mValueRelationData.mFilterAttributeValue = QString::null;
@@ -655,7 +655,7 @@ void QgsAttributeTypeDialog::updateLayerColumns( int idx )
valueRelationKeyColumn->setCurrentIndex( valueRelationKeyColumn->findText( mValueRelationData.mKey ) );
valueRelationValueColumn->setCurrentIndex( valueRelationValueColumn->findText( mValueRelationData.mValue ) );

if( mValueRelationData.mFilterAttributeColumn.isNull() )
if ( mValueRelationData.mFilterAttributeColumn.isNull() )
{
valueRelationFilterColumn->setCurrentIndex( 0 );
}
@@ -683,7 +683,7 @@ void QgsAttributeTypeDialog::updateFilterColumn( int idx )
QList<QVariant> uniqueValues;
vl->uniqueValues( fidx, uniqueValues );

foreach( const QVariant &v, uniqueValues )
foreach ( const QVariant &v, uniqueValues )
{
valueRelationFilterValue->addItem( v.toString(), v );
}
@@ -376,6 +376,7 @@ void QgsDiagramProperties::on_mAddCategoryPushButton_clicked()

void QgsDiagramProperties::on_mAttributesTreeWidget_itemDoubleClicked( QTreeWidgetItem * item, int column )
{
Q_UNUSED( column );
addAttribute( item );
}

@@ -40,7 +40,7 @@ class QgsMeasureTool : public QgsMapTool
//! returns whether measuring distance or area
bool measureArea() { return mMeasureArea; }

//! When we hvae added our last point, and not following
//! When we have added our last point, and not following
// Added in 2.0
bool done() { return mDone; }

@@ -242,15 +242,15 @@ void QgsComposerScaleBar::applyDefaultSize()
int nUnitsPerSegment = widthMeter / 10.0; //default scalebar width equals half the map width
setNumUnitsPerSegment( nUnitsPerSegment );

if( nUnitsPerSegment > 1000 )
if ( nUnitsPerSegment > 1000 )
{
setNumUnitsPerSegment( (int)( numUnitsPerSegment() / 1000.0 + 0.5 ) * 1000 );
setUnitLabeling( tr("km") );
setNumMapUnitsPerScaleBarUnit( 1000 );
setNumUnitsPerSegment(( int )( numUnitsPerSegment() / 1000.0 + 0.5 ) * 1000 );
setUnitLabeling( tr( "km" ) );
setNumMapUnitsPerScaleBarUnit( 1000 );
}
else
{
setUnitLabeling( tr("m") );
setUnitLabeling( tr( "m" ) );
}

setNumSegments( 4 );
@@ -158,7 +158,9 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene

/**Load a template document
@param doc template document
@param substitutionMap map with text to replace. Text needs to be enclosed by brackets (e.g. '[text]' )*/
@param substitutionMap map with text to replace. Text needs to be enclosed by brackets (e.g. '[text]' )
@param addUndoCommands whether or not to add undo commands
*/
bool loadFromTemplate( const QDomDocument& doc, QMap<QString, QString>* substitutionMap = 0, bool addUndoCommands = false );

/**Add items from XML representation to the graphics scene (for project file reading, pasting items from clipboard)
@@ -40,7 +40,7 @@ QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const Qgs
{
return QSizeF(); //zero size if attribute is missing
}

double scaledValue = attIt.value().toDouble();
double scaledLowerValue = is.lowerValue;
double scaledUpperValue = is.upperValue;
@@ -77,11 +77,11 @@ QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const Qgs
}

QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s )
{
{
Q_UNUSED( c );
Q_UNUSED( attributes );
Q_UNUSED( attributes );

return s.size;
return s.size;
}

void QgsTextDiagram::renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position )
@@ -218,11 +218,11 @@ void QgsTextDiagram::renderDiagram( const QgsAttributeMap& att, QgsRenderContext
mPen.setColor( s.categoryColors.at( i ) );
p->setPen( mPen );
QPointF position = textPositions.at( i );

// Calculate vertical placement
double xOffset = 0;

switch( s.labelPlacementMethod )
switch ( s.labelPlacementMethod )
{
case QgsDiagramSettings::Height:
xOffset = textHeight / 2.0;
@@ -91,10 +91,10 @@ void QgsApplication::init( QString customConfigPath )

// check if QGIS is run from build directory (not the install directory)
QFile f;
foreach( QString path, QStringList() << "" << "/.." << "/bin" )
foreach ( QString path, QStringList() << "" << "/.." << "/bin" )
{
f.setFileName( prefixPath + path + "/path.txt" );
if( f.exists() )
if ( f.exists() )
break;
}
if ( f.exists() && f.open( QIODevice::ReadOnly ) )

0 comments on commit 5603cc0

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