Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Oct 4, 2012
1 parent 08a48a2 commit 5d056e9d7bf0d34bea7a1154feadda6e3c46639e
@@ -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;
@@ -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 );
@@ -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;
@@ -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;
@@ -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;
@@ -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();
@@ -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
@@ -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
@@ -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()
@@ -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:
/*
@@ -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() );
}
}

@@ -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
{
@@ -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 );
}
@@ -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;

0 comments on commit 5d056e9

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