Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Feb 5, 2012
1 parent 0c5930f commit 0a782f50552dcb805bd1eec34808ae41af1d3734
@@ -235,12 +235,12 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
mComposition->setParent( mView );
mView->setComposition( mComposition );

setTabPosition( Qt::AllDockWidgetAreas, QTabWidget::North);
mGeneralDock = new QDockWidget(tr("Composition"),this);
setTabPosition( Qt::AllDockWidgetAreas, QTabWidget::North );
mGeneralDock = new QDockWidget( tr( "Composition" ), this );
mGeneralDock->setObjectName( "CompositionDock" );
mItemDock = new QDockWidget(tr("Item Properties"));
mItemDock->setObjectName( "ItemDock");
mUndoDock = new QDockWidget(tr("Command history"),this);
mItemDock = new QDockWidget( tr( "Item Properties" ) );
mItemDock->setObjectName( "ItemDock" );
mUndoDock = new QDockWidget( tr( "Command history" ), this );
mUndoDock->setObjectName( "CommandDock" );


@@ -261,8 +261,8 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
mGeneralDock->show();
mUndoDock->hide();

tabifyDockWidget(mGeneralDock, mUndoDock);
tabifyDockWidget(mGeneralDock, mItemDock);
tabifyDockWidget( mGeneralDock, mUndoDock );
tabifyDockWidget( mGeneralDock, mItemDock );

mGeneralDock->raise();

@@ -1099,10 +1099,10 @@ void QgsComposer::on_mActionRedo_triggered()
}
}

void QgsComposer::closeEvent(QCloseEvent *e)
void QgsComposer::closeEvent( QCloseEvent *e )
{
Q_UNUSED( e );
saveWindowState();
Q_UNUSED( e );
saveWindowState();
}

void QgsComposer::moveEvent( QMoveEvent *e )
@@ -1156,9 +1156,9 @@ void QgsComposer::saveWindowState()
void QgsComposer::restoreWindowState()
{
QSettings settings;
if (! restoreState( settings.value( "/ComposerUI/state" ).toByteArray() ))
if ( ! restoreState( settings.value( "/ComposerUI/state" ).toByteArray() ) )
{
QgsDebugMsg("RESTORE STATE FAILED!!");
QgsDebugMsg( "RESTORE STATE FAILED!!" );
}
restoreGeometry( settings.value( "/Composer/geometry" ).toByteArray() );
}
@@ -87,7 +87,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! Move event
virtual void moveEvent( QMoveEvent * );

virtual void closeEvent(QCloseEvent * );
virtual void closeEvent( QCloseEvent * );

//! Resize event
virtual void resizeEvent( QResizeEvent * );
@@ -104,10 +104,10 @@ QString createDatabaseURI( QString connectionType, QString host, QString databas
uri += QString( ";pwd=%1" ).arg( password );
}
else
uri += ";trusted_connection=yes";
uri += ";trusted_connection=yes";

if ( !database.isEmpty() )
uri += QString( ";database=%1" ).arg( database );
uri += QString( ";database=%1" ).arg( database );
}
else if ( connectionType == "Oracle Spatial" )
{
@@ -320,10 +320,10 @@ void QgsOpenVectorLayerDialog::accept()
makeConnection = true;
else
pass = QInputDialog::getText( this,
tr( "Password for " ) + user,
tr( "Please enter your password:" ),
QLineEdit::Password, QString::null,
&makeConnection );
tr( "Password for " ) + user,
tr( "Please enter your password:" ),
QLineEdit::Password, QString::null,
&makeConnection );
}

if ( makeConnection || !pass.isEmpty() )
@@ -175,7 +175,7 @@ void QgsBookmarks::deleteClicked()
}
}

if( rows.size() == 0 )
if ( rows.size() == 0 )
return;

// make sure the user really wants to delete these bookmarks
@@ -184,10 +184,10 @@ void QgsBookmarks::deleteClicked()
QMessageBox::Ok | QMessageBox::Cancel ) )
return;

int i=0;
int i = 0;
foreach( int row, rows )
{
lstBookmarks->model()->removeRow( row-i );
lstBookmarks->model()->removeRow( row - i );
i++;
}
}
@@ -217,9 +217,9 @@ void QgsBookmarks::zoomToBookmark()
srid != QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs().srsid() )
{
QgsCoordinateTransform ct( QgsCoordinateReferenceSystem( srid, QgsCoordinateReferenceSystem::InternalCrsId ),
QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs() );
QgisApp::instance()->mapCanvas()->mapRenderer()->destinationCrs() );
rect = ct.transform( rect );
if( rect.isEmpty() )
if ( rect.isEmpty() )
{
QMessageBox::warning( this, tr( "Empty extent" ), tr( "Reprojected extent is empty." ) );
return;
@@ -269,16 +269,16 @@ void QgsFieldCalculator::populateFields()
void QgsFieldCalculator::setOkButtonState()
{
QPushButton* okButton = mButtonBox->button( QDialogButtonBox::Ok );
okButton->setToolTip("");
okButton->setToolTip( "" );

bool emptyFieldName = mOutputFieldNameLineEdit->text().isEmpty();
bool expressionValid = builder->isExpressionValid();

if ( emptyFieldName )
okButton->setToolTip( tr("Please enter a field name") );
okButton->setToolTip( tr( "Please enter a field name" ) );

if ( !expressionValid )
okButton->setToolTip( okButton->toolTip() + tr("\n The expression is invalid see (more info) for details") );
okButton->setToolTip( okButton->toolTip() + tr( "\n The expression is invalid see (more info) for details" ) );

bool okEnabled = ( !emptyFieldName || mUpdateExistingGroupBox->isChecked() ) && expressionValid;

@@ -328,7 +328,7 @@ bool QgsMapToolIdentify::identifyRasterLayer( QgsRasterLayer *layer, int x, int
{
idPoint = toLayerCoordinates( layer, idPoint );
}
catch( QgsCsException &cse )
catch ( QgsCsException &cse )
{
Q_UNUSED( cse );
QgsDebugMsg( QString( "coordinate not reprojectable: %1" ).arg( cse.what() ) );
@@ -78,7 +78,8 @@ class CORE_EXPORT QgsFeatureRendererV2
//! for debugging
virtual QString dump();

enum Capabilities {
enum Capabilities
{
SymbolLevels = 1 // rendering with symbol levels (i.e. implements symbols(), symbolForFeature())
};

@@ -206,33 +206,33 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
}
}

void QgsComposerView::addShape(Tool currentTool)
void QgsComposerView::addShape( Tool currentTool )
{
QgsComposerShape::Shape shape = QgsComposerShape::Ellipse;
QgsComposerShape::Shape shape = QgsComposerShape::Ellipse;

if ( currentTool == AddRectangle )
shape = QgsComposerShape::Rectangle;
else if ( currentTool == AddTriangle )
shape = QgsComposerShape::Triangle;
if ( currentTool == AddRectangle )
shape = QgsComposerShape::Rectangle;
else if ( currentTool == AddTriangle )
shape = QgsComposerShape::Triangle;

if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
{
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
return;
}
if ( composition() )
{
QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() );
composerShape->setShapeType( shape );
composition()->addComposerShape( composerShape );
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
emit actionFinished();
composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) );
}
if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
{
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
return;
}
if ( composition() )
{
QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() );
composerShape->setShapeType( shape );
composition()->addComposerShape( composerShape );
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
emit actionFinished();
composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) );
}
}

void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
@@ -114,8 +114,8 @@ void QgsExpressionBuilderWidget::currentChanged( const QModelIndex &index, const
if ( item->getItemType() != QgsExpressionItem::Field )
{

mValueGroupBox->hide();
mValueListWidget->clear();
mValueGroupBox->hide();
mValueListWidget->clear();
}
// Show the help for the current item.
QString help = loadFunctionHelp( item );
@@ -401,18 +401,18 @@ QString QgsExpressionBuilderWidget::loadFunctionHelp( QgsExpressionItem* functio
QString name = functionName->text();

if ( functionName->getItemType() == QgsExpressionItem::Field )
name = "Field";
name = "Field";

QString fullHelpPath = helpFilesPath + name + "-" + lang;
// get the help content and title from the localized file
QString helpContents;
QFile file( fullHelpPath );
// check to see if the localized version exists

QString missingError = tr("<h3>Oops! QGIS can't find help for this function.</h3>"
"The help file for %1 was not found for your language<br>"
"If you would like to create it, contact the QGIS development team"
).arg( name );
QString missingError = tr( "<h3>Oops! QGIS can't find help for this function.</h3>"
"The help file for %1 was not found for your language<br>"
"If you would like to create it, contact the QGIS development team"
).arg( name );
if ( !file.exists() )
{
// change the file name to the en_US version (default)
@@ -128,10 +128,10 @@ void QgsHelpViewer::loadContext( const QString &contextId )
QString helpContents;
QFile file( fullHelpPath );

QString missingError = tr("<h3>Oops! QGIS can't find help for this form.</h3>"
"The help file for %1 was not found for your language<br>"
"If you would like to create it, contact the QGIS development team"
).arg( contextId );
QString missingError = tr( "<h3>Oops! QGIS can't find help for this form.</h3>"
"The help file for %1 was not found for your language<br>"
"If you would like to create it, contact the QGIS development team"
).arg( contextId );

// check to see if the localized version exists
if ( !file.exists() )

0 comments on commit 0a782f5

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