Skip to content

Commit

Permalink
indentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 4, 2012
1 parent 08a48a2 commit 5d056e9
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/app/qgslabeldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void QgsLabelDialog::changeFont( void )
// Native Mac dialog works only for Qt Carbon
mFont = QFontDialog::getFont( &resultFlag, mFont, 0, QString(), QFontDialog::DontUseNativeDialog );
#else
mFont = QFontDialog::getFont( &resultFlag, mFont);
mFont = QFontDialog::getFont( &resultFlag, mFont );
#endif
if ( !resultFlag )
return;
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsfillsymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void QgsSimpleFillSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context
mSelBrush.setStyle( mBrushStyle );

QColor borderColor = mBorderColor;
borderColor.setAlphaF( context.alpha() * mBorderColor.alphaF());
borderColor.setAlphaF( context.alpha() * mBorderColor.alphaF() );
mPen = QPen( borderColor );
mSelPen = QPen( selPenColor );
mPen.setStyle( mBorderStyle );
Expand Down
12 changes: 6 additions & 6 deletions src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ void QgsSimpleLineSymbolLayerV2Widget::colorChanged()
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
Expand Down Expand Up @@ -357,9 +357,9 @@ void QgsSimpleFillSymbolLayerV2Widget::setColor()
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor( mLayer->color(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
Expand All @@ -374,9 +374,9 @@ void QgsSimpleFillSymbolLayerV2Widget::setBorderColor()
// Native Mac dialog works only for Qt Carbon
// Qt bug: http://bugreports.qt.nokia.com/browse/QTBUG-14889
// FIXME need to also check max QT_VERSION when Qt bug fixed
QColor color = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::DontUseNativeDialog | QColorDialog::ShowAlphaChannel );
#else
QColor color = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::ShowAlphaChannel);
QColor color = QColorDialog::getColor( mLayer->borderColor(), this, "", QColorDialog::ShowAlphaChannel );
#endif
if ( !color.isValid() )
return;
Expand Down
54 changes: 29 additions & 25 deletions src/plugins/globe/globe_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void GlobePlugin::run()
if ( !getenv( "OSGNOTIFYLEVEL" ) ) osgEarth::setNotifyLevel( osg::DEBUG_INFO );
#endif

if (mOsgViewer == 0) mOsgViewer = new osgViewer::Viewer();
if ( mOsgViewer == 0 ) mOsgViewer = new osgViewer::Viewer();

// install the programmable manipulator.
osgEarth::Util::EarthManipulator* manip = new osgEarth::Util::EarthManipulator();
Expand All @@ -229,19 +229,23 @@ void GlobePlugin::run()
mIsGlobeRunning = true;
setupProxy();

if ( getenv( "MAPXML" ) ) {
char* mapxml = getenv( "MAPXML" );
QgsDebugMsg( mapxml );
osg::Node* node = osgDB::readNodeFile(mapxml);
if ( !node ) {
QgsDebugMsg( "Failed to load earth file " );
return;
}
mMapNode = MapNode::findMapNode(node);
mRootNode = new osg::Group();
mRootNode->addChild( node );
} else {
setupMap();
if ( getenv( "MAPXML" ) )
{
char* mapxml = getenv( "MAPXML" );
QgsDebugMsg( mapxml );
osg::Node* node = osgDB::readNodeFile( mapxml );
if ( !node )
{
QgsDebugMsg( "Failed to load earth file " );
return;
}
mMapNode = MapNode::findMapNode( node );
mRootNode = new osg::Group();
mRootNode->addChild( node );
}
else
{
setupMap();
}

// create a surface to house the controls
Expand All @@ -250,27 +254,27 @@ void GlobePlugin::run()

mOsgViewer->setSceneData( mRootNode );

mOsgViewer->setThreadingModel(osgViewer::Viewer::SingleThreaded);
mOsgViewer->setThreadingModel( osgViewer::Viewer::SingleThreaded );

mOsgViewer->addEventHandler(new osgViewer::StatsHandler());
mOsgViewer->addEventHandler(new osgViewer::WindowSizeHandler());
mOsgViewer->addEventHandler(new osgViewer::ThreadingHandler());
mOsgViewer->addEventHandler(new osgViewer::LODScaleHandler());
mOsgViewer->addEventHandler(new osgGA::StateSetManipulator(mOsgViewer->getCamera()->getOrCreateStateSet()));
mOsgViewer->addEventHandler( new osgViewer::StatsHandler() );
mOsgViewer->addEventHandler( new osgViewer::WindowSizeHandler() );
mOsgViewer->addEventHandler( new osgViewer::ThreadingHandler() );
mOsgViewer->addEventHandler( new osgViewer::LODScaleHandler() );
mOsgViewer->addEventHandler( new osgGA::StateSetManipulator( mOsgViewer->getCamera()->getOrCreateStateSet() ) );
// add a handler that will automatically calculate good clipping planes
//mOsgViewer->addEventHandler( new osgEarth::Util::AutoClipPlaneHandler() );
// osgEarth benefits from pre-compilation of GL objects in the pager. In newer versions of
// OSG, this activates OSG's IncrementalCompileOpeartion in order to avoid frame breaks.
mOsgViewer->getDatabasePager()->setDoPreCompile( true );

mSettingsDialog->setViewer(mOsgViewer);
mSettingsDialog->setViewer( mOsgViewer );

#ifdef GLOBE_OSG_STANDALONE_VIEWER
mOsgViewer->run();
#endif

QWidget* viewerWidget = new osgEarth::QtGui::ViewerWidget( mOsgViewer );
viewerWidget->setGeometry(100, 100, 1024, 800);
viewerWidget->setGeometry( 100, 100, 1024, 800 );
viewerWidget->show();

// Set a home viewpoint
Expand All @@ -285,8 +289,8 @@ void GlobePlugin::run()
mOsgViewer->addEventHandler( new KeyboardControlHandler( manip, mQGisIface ) );

mOsgViewer->addEventHandler( new QueryCoordinatesHandler( this, mElevationManager,
mMapNode->getMap()->getProfile()->getSRS() )
);
mMapNode->getMap()->getProfile()->getSRS() )
);
}

void GlobePlugin::settings()
Expand Down Expand Up @@ -319,7 +323,7 @@ void GlobePlugin::setupMap()
*/
TMSOptions imagery;
imagery.url() = "http://readymap.org/readymap/tiles/1.0.0/7/";
map->addImageLayer( new ImageLayer("Imagery", imagery) );
map->addImageLayer( new ImageLayer( "Imagery", imagery ) );

// add a TMS elevation layer:
/*
Expand Down
29 changes: 15 additions & 14 deletions src/plugins/globe/globe_plugin_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,20 +514,21 @@ void QgsGlobePluginDialog::setStereoMode()

void QgsGlobePluginDialog::setStereoConfig()
{
if (mViewer) {
mViewer->getDatabasePager()->clear();
//SETTING THE VALUES IN THE OEGearth instance
setStereoMode();
osg::DisplaySettings::instance()->setScreenDistance( screenDistance->value() );
osg::DisplaySettings::instance()->setScreenWidth( screenWidth->value() );
osg::DisplaySettings::instance()->setScreenHeight( screenHeight->value() );
osg::DisplaySettings::instance()->setEyeSeparation( eyeSeparation->value() );
osg::DisplaySettings::instance()->setSplitStereoHorizontalSeparation( splitStereoHorizontalSeparation->value() );
osg::DisplaySettings::instance()->setSplitStereoVerticalSeparation( splitStereoVerticalSeparation->value() );
osg::DisplaySettings::instance()->setSplitStereoHorizontalEyeMapping(
( osg::DisplaySettings::SplitStereoHorizontalEyeMapping ) splitStereoHorizontalEyeMapping->currentIndex() );
osg::DisplaySettings::instance()->setSplitStereoVerticalEyeMapping(
( osg::DisplaySettings::SplitStereoVerticalEyeMapping ) splitStereoVerticalEyeMapping->currentIndex() );
if ( mViewer )
{
mViewer->getDatabasePager()->clear();
//SETTING THE VALUES IN THE OEGearth instance
setStereoMode();
osg::DisplaySettings::instance()->setScreenDistance( screenDistance->value() );
osg::DisplaySettings::instance()->setScreenWidth( screenWidth->value() );
osg::DisplaySettings::instance()->setScreenHeight( screenHeight->value() );
osg::DisplaySettings::instance()->setEyeSeparation( eyeSeparation->value() );
osg::DisplaySettings::instance()->setSplitStereoHorizontalSeparation( splitStereoHorizontalSeparation->value() );
osg::DisplaySettings::instance()->setSplitStereoVerticalSeparation( splitStereoVerticalSeparation->value() );
osg::DisplaySettings::instance()->setSplitStereoHorizontalEyeMapping(
( osg::DisplaySettings::SplitStereoHorizontalEyeMapping ) splitStereoHorizontalEyeMapping->currentIndex() );
osg::DisplaySettings::instance()->setSplitStereoVerticalEyeMapping(
( osg::DisplaySettings::SplitStereoVerticalEyeMapping ) splitStereoVerticalEyeMapping->currentIndex() );
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert

if ( !layerProperty.schemaName.isEmpty() )
{
table = QString("%1.%2").arg( quotedIdentifier( layerProperty.schemaName ) ).arg( layerProperty.tableName );
table = QString( "%1.%2" ).arg( quotedIdentifier( layerProperty.schemaName ) ).arg( layerProperty.tableName );
}
else
{
Expand All @@ -1041,7 +1041,7 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert
.arg( layerProperty.sql.isEmpty() ? "" : QString( " AND (%1)" ).arg( layerProperty.sql ) )
.arg( sGeomTypeSelectLimit );
}
else if( !layerProperty.sql.isEmpty() )
else if ( !layerProperty.sql.isEmpty() )
{
table += QString( " WHERE %1" ).arg( layerProperty.sql );
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,7 @@ bool QgsPostgresProvider::getGeometryDetails()
if ( QgsPostgresConn::wkbTypeFromPostgis( detectedType ) == QGis::WKBUnknown )
{
QgsPostgresLayerProperty layerProperty;
if( !mIsQuery )
if ( !mIsQuery )
{
layerProperty.schemaName = schemaName;
layerProperty.tableName = tableName;
Expand Down

0 comments on commit 5d056e9

Please sign in to comment.