[Marble-commits] KDE/kdeedu/marble/src

Bastian Holst bastianholst at gmx.de
Tue Mar 30 00:56:14 CEST 2010


SVN commit 1108860 by bholst:

Coding Standards for Marble:
"with a space inside both opening and closing parenthesis"


 M  +7 -7      ControlView.cpp  
 M  +3 -3      ControlView.h  
 M  +11 -11    kdemain.cpp  


--- trunk/KDE/kdeedu/marble/src/ControlView.cpp #1108859:1108860
@@ -24,29 +24,29 @@
 {
 
 ControlView::ControlView( QWidget *parent )
-   : QWidget(parent)
+   : QWidget( parent )
 {
-    setWindowTitle(tr("Marble - Desktop Globe"));
+    setWindowTitle( tr( "Marble - Desktop Globe" ) );
 
     resize( 680, 640 );
 
     QVBoxLayout *vlayout = new QVBoxLayout( this );
-    vlayout->setMargin(0);
+    vlayout->setMargin( 0 );
 
-    m_splitter = new QSplitter (this);
+    m_splitter = new QSplitter( this );
     vlayout->addWidget( m_splitter );
 
     m_control = new MarbleControlBox( this );
     m_splitter->addWidget( m_control );
-    m_splitter->setStretchFactor(m_splitter->indexOf(m_control), 0);
+    m_splitter->setStretchFactor( m_splitter->indexOf( m_control ), 0 );
 
     m_marbleWidget = new MarbleWidget( this );
     m_marbleWidget->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
                                                 QSizePolicy::MinimumExpanding ) );
 
     m_splitter->addWidget( m_marbleWidget );
-    m_splitter->setStretchFactor(m_splitter->indexOf(m_marbleWidget), 1);
-    m_splitter->setSizes( QList<int>() << 180 << width()-180 );
+    m_splitter->setStretchFactor( m_splitter->indexOf( m_marbleWidget ), 1 );
+    m_splitter->setSizes( QList<int>() << 180 << width() - 180 );
 
     m_control->addMarbleWidget( m_marbleWidget );
 
--- trunk/KDE/kdeedu/marble/src/ControlView.h #1108859:1108860
@@ -51,11 +51,11 @@
 
     bool sideBarShown() const { return m_control->isVisible(); }
 
-    void addPlacemarkFile( QString filename ){ m_marbleWidget->addPlacemarkFile( filename ); }
+    void addPlacemarkFile( QString filename ) { m_marbleWidget->addPlacemarkFile( filename ); }
 
-    QPixmap mapScreenShot(){ return m_marbleWidget->mapScreenShot(); }
+    QPixmap mapScreenShot() { return m_marbleWidget->mapScreenShot(); }
     
-    SunLocator* sunLocator() {return m_marbleWidget->sunLocator();}
+    SunLocator* sunLocator() { return m_marbleWidget->sunLocator(); }
     
 
  public slots:
--- trunk/KDE/kdeedu/marble/src/kdemain.cpp #1108859:1108860
@@ -43,7 +43,7 @@
     QCoreApplication app( argc, argv );
     KComponentData componentData( aboutData, KComponentData::SkipMainComponentRegistration );
 
-    KConfigGroup viewGroup(componentData.config(), "View");
+    KConfigGroup viewGroup( componentData.config(), "View" );
     QString graphicsSystem = viewGroup.readEntry( "graphicsSystem", "NativeGraphics" );
 
     QString graphicsString( "native" );
@@ -57,7 +57,7 @@
     return graphicsString;
 }
 
-int main (int argc, char *argv[])
+int main ( int argc, char *argv[] )
 {
     KAboutData aboutData( "marble", 0, 
                           ki18n( "Marble Desktop Globe" ),
@@ -212,25 +212,25 @@
                                 " important source of inspiration by creating"
                                 " Marble's predecessor \"Kartographer\"." ));
 
-    QApplication::setGraphicsSystem( readGraphicsSystem(argc, argv, aboutData ) );
+    QApplication::setGraphicsSystem( readGraphicsSystem( argc, argv, aboutData ) );
 
     KCmdLineArgs::init( argc, argv, &aboutData );
 
     
     KCmdLineOptions  options;
-    options.add( "debug-info", ki18n( "Enable debug output") );
+    options.add( "debug-info", ki18n( "Enable debug output" ) );
     options.add( "timedemo", ki18n( "Make a time measurement to check performance" ) );
     options.add( "gpsdemo", ki18n( "Check speed of gps drawing" ) );
     options.add( "fps", ki18n( "Show frame rate" ) );
     options.add( "enableCurrentLocation", ki18n( "Enable tab to show the current location" ) );
     options.add( "enableFileView",
-                 ki18n( "Enable tab to see gpxFileView") );
+                 ki18n( "Enable tab to see gpxFileView" ) );
     options.add( "tile-id", ki18n( "Show tile id's" ) );
     KCmdLineArgs::addCmdLineOptions( options );
     KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 
     KApplication app;
-    KGlobal::locale()->insertCatalog("marble_qt");
+    KGlobal::locale()->insertCatalog( "marble_qt" );
 
     QString  marbleDataPath;
     int      dataPathIndex = 0;
@@ -271,21 +271,21 @@
     }
 
     if ( args->isSet( "enableCurrentLocation" ) ) {
-        window->marbleControl()->setCurrentLocationTabShown(true);
+        window->marbleControl()->setCurrentLocationTabShown( true );
     }
     
     if ( args->isSet( "enableFileView" ) ) {
-        window->marbleControl()->setFileViewTabShown(true);
+        window->marbleControl()->setFileViewTabShown( true );
     }
 
-    if (args->isSet( "tile-id" ) ) {
-	window->marbleControl()->marbleWidget()->setShowTileId(true);
+    if ( args->isSet( "tile-id" ) ) {
+	window->marbleControl()->marbleWidget()->setShowTileId( true );
     }
 
     // Read the files that are given on the command line.
     for ( int i = 0; i < args->count(); ++i ) {
 
-        // FIXME: Use openUrl( args->url(i)) instead?
+        // FIXME: Use openUrl( args->url(i) ) instead?
         if ( QFile::exists( args->arg( i ) ) && i != dataPathIndex )
             window->marbleControl()->addPlacemarkFile( args->arg( i ) );
     }


More information about the Marble-commits mailing list