[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src
From:       Torsten Rahn <tackat () kde ! org>
Date:       2008-03-24 2:21:37
Message-ID: 1206325297.219398.32505.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 789380 by rahn:

- KConfig Xt settings dialog



 M  +0 -31     KdeMainWindow.cpp  
 M  +0 -5      KdeMainWindow.h  
 M  +3 -2      lib/CMakeLists.txt  
 A             lib/MarbleCacheSettingsWidget.ui  
 A             lib/MarbleNavigationSettingsWidget.ui  
 D             lib/MarbleSettingsWidget.cpp  
 D             lib/MarbleSettingsWidget.h  
 D             lib/MarbleSettingsWidget.ui  
 A             lib/MarbleViewSettingsWidget.ui  
 M  +48 -0     marble.kcfg  
 M  +41 -0     marble_part.cpp  
 M  +2 -0      marble_part.h  
 M  +2 -0      marble_part.rc  
 M  +0 -1      marbleui.rc  
 M  +1 -0      settings.kcfgc  


--- trunk/KDE/kdeedu/marble/src/KdeMainWindow.cpp #789379:789380
@@ -15,16 +15,12 @@
 // KDE
 #include <kaction.h>
 #include <kactioncollection.h>
-#include <kconfigdialog.h>
 #include <kparts/part.h>
 #include <kparts/componentfactory.h>
-#include <kstandardaction.h>
 
 // Local dir
 #include "ControlView.h"
-#include "MarbleSettingsWidget.h"
 #include "marble_part.h"
-#include "settings.h"
 
 MainWindow::MainWindow( const QString& marbleDataPath, QWidget *parent )
     : KXmlGuiWindow( parent )
@@ -33,8 +29,6 @@
 
     setCentralWidget( m_part->widget() );
 
-	setupActions();
-
     setXMLFile( "marbleui.rc" );
 
     setStandardToolBarMenuEnabled( true );
@@ -62,29 +56,4 @@
     return m_part->controlView()->marbleWidget();
 }
 
-
-void MainWindow::setupActions()
-{
-    KStandardAction::preferences( this, SLOT( editSettings() ), actionCollection() \
                );
-}
-
-
-void MainWindow::editSettings()
-{
-	if ( KConfigDialog::showDialog( "settings" ) )
-		return; 
- 
-	KConfigDialog* dialog = new KConfigDialog( this, "settings", MarbleSettings::self() \
                ); 
-	MarbleSettingsWidget* confWdg =  
-                  new MarbleSettingsWidget( 0 ); 
- 
-	dialog->setFaceType( KPageDialog::Plain ); 
-	dialog->addPage( confWdg, i18n("Marble Settings"), "example" ); 
- 
-//	connect( dialog, SIGNAL(settingsChanged()), 
-//         this, SLOT(updateConfiguration()) ); 
- 
-	dialog->show();
-}
-
 #include "KdeMainWindow.moc"
--- trunk/KDE/kdeedu/marble/src/KdeMainWindow.h #789379:789380
@@ -32,12 +32,7 @@
     ControlView* marbleControl() const;
     MarbleWidget* marbleWidget() const;
 
-  private Q_SLOTS:
-    void  editSettings();
-
  private:
-    void  setupActions();
-
     MarblePart *m_part;
 };
 
--- trunk/KDE/kdeedu/marble/src/lib/CMakeLists.txt #789379:789380
@@ -51,7 +51,6 @@
            MarbleMap.cpp
            MarbleControlBox.cpp
            MarbleNavigator.cpp
-           MarbleSettingsWidget.cpp
            MarbleLegendBrowser.cpp
            MarbleThemeSelectView.cpp
            MarbleSearchListView.cpp
@@ -135,7 +134,9 @@
 set (marblewidget_UI
     MarbleControlBox.ui
     MarbleNavigator.ui
-    MarbleSettingsWidget.ui
+    MarbleViewSettingsWidget.ui
+    MarbleNavigationSettingsWidget.ui
+    MarbleCacheSettingsWidget.ui
     TileCreatorDialog.ui
     PlaceMarkInfoDialog.ui
     MarbleAboutDialog.ui
--- trunk/KDE/kdeedu/marble/src/marble.kcfg #789379:789380
@@ -24,4 +24,52 @@
    <default></default>
   </entry>
  </group>
+ <group name="Navigation" >
+<!--
+  <entry key="dragLocation" type="Enum" >
+   <label>The behaviour of the planet's axis on mouse dragging.</label>
+   <choices name="Marble::Navigation::DragLocation">
+    <choice name="Navigation::PoleAxisStaysVertically"/>
+    <choice name="Navigation::MouseFollowsExactly"/>
+   </choices>
+   <default>Navigation::PoleAxisStaysVertically</default>
+  </entry>
+  <entry key="onStartup" type="Enum" >
+   <label>The location shown on application startup.</label>
+   <choices name="Marble::Navigation::onStartup">
+    <choice name="Navigation::ShowHomeLocation"/>
+    <choice name="Navigation::ShowLastLocationVisited"/>
+   </choices>
+   <default>Navigation::ShowHomeLocation</default>
+  </entry>
+-->
+  <entry key="animateTargetVoyage" type="Bool" >
+   <label>Display animation on voyage to target.</label>
+   <default>true</default>
+  </entry>
+ </group>
+ <group name="Cache" >
+  <entry key="physicalMemoryCache" type="Int" >
+   <label>Cache for tiles reserved in the physical memory.</label>
+   <default>30</default>
+   <min>0</min>
+   <max>999999</max>
+  </entry>
+  <entry key="harddiscCache" type="Int" >
+   <label>Maximum space on the harddisc that can be used to store tiles.</label>
+   <default>999999</default>
+   <min>0</min>
+   <max>999999</max>
+  </entry>
+  <entry name="proxyUrl" type="String">
+   <label>Url for the proxy server.</label>
+   <default>http://</default>
+  </entry>
+  <entry key="proxyPort" type="Int" >
+   <label>Port for the proxy server.</label>
+   <default>8080</default>
+   <min>0</min>
+   <max>9999</max>
+  </entry>
+ </group>
 </kcfg>
--- trunk/KDE/kdeedu/marble/src/marble_part.cpp #789379:789380
@@ -27,6 +27,7 @@
 #include <kactioncollection.h>
 #include <kapplication.h>
 #include <kcomponentdata.h>
+#include <kconfigdialog.h>
 #include <kdeversion.h>
 #include <kfiledialog.h>
 #include <kmessagebox.h>
@@ -43,8 +44,13 @@
 #include "lib/SunControlWidget.h"
 
 // Local dir
+#include "ui_MarbleViewSettingsWidget.h"
+#include "ui_MarbleNavigationSettingsWidget.h"
+#include "ui_MarbleCacheSettingsWidget.h"
+
 #include <MarbleDirs.h>
 #include <ControlView.h>
+#include "MarbleSettingsWidget.h"
 #include "settings.h"
 
 
@@ -325,6 +331,8 @@
     m_showSunAct->setText( i18n( "S&un Control" ) );
     connect( m_showSunAct, SIGNAL( triggered( bool ) ), this, SLOT( showSun() ) );
 
+    KStandardAction::preferences( this, SLOT( editSettings() ), actionCollection() \
); +
     readSettings();
 }
 
@@ -396,4 +404,37 @@
     m_controlView->marbleControl()->updateMapThemes();
 }
 
+void MarblePart::editSettings()
+{
+	if ( KConfigDialog::showDialog( "settings" ) )
+		return; 
+ 
+	KConfigDialog* dialog = new KConfigDialog( m_controlView, "settings", \
MarbleSettings::self() );  +/*
+        connect( dialog, SIGNAL( settingsChanged( const QString &) ), this , SLOT( \
slotUpdateSettings() ) ); +*/
+        // view page
+        Ui_MarbleViewSettingsWidget ui_viewSettings;
+        QWidget *w_viewSettings = new QWidget( 0 );
+        w_viewSettings->setObjectName( "view_page" );
+        ui_viewSettings.setupUi( w_viewSettings );
+        dialog->addPage( w_viewSettings, i18n( "View" ), "preferences-view" );
+
+        // navigation page
+        Ui_MarbleNavigationSettingsWidget ui_navigationSettings;
+        QWidget *w_navigationSettings = new QWidget( 0 );
+        w_navigationSettings->setObjectName( "navigation_page" );
+        ui_navigationSettings.setupUi( w_navigationSettings );
+        dialog->addPage( w_navigationSettings, i18n( "Navigation" ), \
"preferences-navigation" ); +
+        // cache page
+        Ui_MarbleCacheSettingsWidget ui_cacheSettings;
+        QWidget *w_cacheSettings = new QWidget( 0 );
+        w_cacheSettings->setObjectName( "cache_page" );
+        ui_cacheSettings.setupUi( w_cacheSettings );
+        dialog->addPage( w_cacheSettings, i18n( "Cache" ), "preferences-cache" );
+
+	dialog->show();
+}
+
 #include "marble_part.moc"
--- trunk/KDE/kdeedu/marble/src/marble_part.h #789379:789380
@@ -53,6 +53,8 @@
     void  setupStatusBar();
     void  showNewStuffDialog();
 
+    void  editSettings();
+
   private:
     void  setupActions();
 
--- trunk/KDE/kdeedu/marble/src/marble_part.rc #789379:789380
@@ -19,6 +19,8 @@
     <Action name="options_show_sidebar" group="show_merge"/>
     <Action name="fullscreen"/>
     <Action name="show_sun"/>
+    <Separator/>
+    <Action name="options_configure" append="configure_merge"/>
   </Menu>
 </MenuBar>
 
--- trunk/KDE/kdeedu/marble/src/marbleui.rc #789379:789380
@@ -20,7 +20,6 @@
   <Menu name="settings" noMerge="1"><text>&amp;Settings</text>
     <Action name="fullscreen"/>
     <Action name="show_sun"/>
-    <Action name="options_configure" append="configure_merge"/>
   </Menu>
 </MenuBar>
 
--- trunk/KDE/kdeedu/marble/src/settings.kcfgc #789379:789380
@@ -2,3 +2,4 @@
 File=marble.kcfg
 Mutators=true
 Singleton=true
+UseEnumTypes=true


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic