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

Torsten Rahn tackat at kde.org
Thu Jul 30 16:16:33 CEST 2009


SVN commit 1004576 by rahn:

* Forward port of 1004236 by rahn:

- Adjusting variable names
- Adding a missing icon
- Adding a link to the map site to MarbleQt.




 M  +15 -5     QtMainWindow.cpp  
 M  +3 -1      QtMainWindow.h  
 AM            icons/get-hot-new-stuff.png  
 M  +1 -0      marble.qrc  


--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1004575:1004576
@@ -107,6 +107,9 @@
      connect( m_openAct, SIGNAL( triggered() ),
               this, SLOT( openFile() ) );
 
+     m_downloadAct = new QAction( QIcon(":/icons/get-hot-new-stuff.png"), tr("Download Maps...", this);
+     connect(m_downloadAct, SIGNAL(triggered()), this, SLOT(openMapSite()));
+              
      m_exportMapAct = new QAction( QIcon(":/icons/document-save-as.png"), tr("&Export Map..."), this);
      m_exportMapAct->setShortcut(tr("Ctrl+S"));
      m_exportMapAct->setStatusTip(tr("Save a screenshot of the map"));
@@ -177,10 +180,10 @@
      m_controlSunAct->setStatusTip(tr("Configure Sun Control"));
      connect(m_controlSunAct, SIGNAL(triggered()), this, SLOT( controlSun()));
 
-     m_handbook = new QAction( QIcon(":/icons/help-contents.png"), tr("Marble Desktop Globe &Handbook"), this);
-     m_handbook->setShortcut(tr("F1"));
-     m_handbook->setStatusTip(tr("Show the Handbook for Marble Desktop Globe"));
-     connect(m_handbook, SIGNAL(triggered()), this, SLOT(handbook()));
+     m_handbookAct = new QAction( QIcon(":/icons/help-contents.png"), tr("Marble Desktop Globe &Handbook"), this);
+     m_handbookAct->setShortcut(tr("F1"));
+     m_handbookAct->setStatusTip(tr("Show the Handbook for Marble Desktop Globe"));
+     connect(m_handbookAct, SIGNAL(triggered()), this, SLOT(handbook()));
 
      m_whatsThisAct = new QAction( QIcon(":/icons/help-whatsthis.png"), tr("What's &This"), this);
      m_whatsThisAct->setShortcut(tr("Shift+F1"));
@@ -201,6 +204,7 @@
 {
     m_fileMenu = menuBar()->addMenu(tr("&File"));
     m_fileMenu->addAction(m_openAct);
+    m_fileMenu->addAction(m_downloadAct);
     m_fileMenu->addAction(m_exportMapAct);
     m_fileMenu->addAction(m_printAct);
     m_fileMenu->addSeparator();
@@ -242,7 +246,7 @@
     m_fileMenu->addAction(m_configDialogAct);
 
     m_helpMenu = menuBar()->addMenu(tr("&Help"));
-    m_helpMenu->addAction(m_handbook);
+    m_helpMenu->addAction(m_handbookAct);
     m_helpMenu->addSeparator();
     m_helpMenu->addAction(m_whatsThisAct);
     m_helpMenu->addSeparator();
@@ -339,6 +343,12 @@
     statusBar()->hide();
 }
 
+void MainWindow::openMapSite()
+{
+    if( !QDesktopServices::openUrl( QUrl( "http://edu.kde.org/marble/maps.php" ) ) )
+    qDebug() << "URL not opened";
+}
+
 void MainWindow::exportMapScreenShot()
 {
     QString fileName = QFileDialog::getSaveFileName(this, tr("Export Map"), // krazy:exclude=qclasses
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.h #1004575:1004576
@@ -76,6 +76,7 @@
     void  enterWhatsThis();
     void  aboutMarble();
     void  handbook();
+    void  openMapSite();
     void  openFile();
     void  setupStatusBar();
     void  lockPosition( bool );
@@ -101,6 +102,7 @@
 
     // File Menu
     QAction *m_exportMapAct;
+    QAction *m_downloadAct;
     QAction *m_printAct;
     QAction *m_workOfflineAct;
     QAction *m_quitAct;
@@ -126,7 +128,7 @@
     QAction *m_aboutQtAct;
     QAction *m_openAct;
     QAction *m_lockFloatItemsAct;
-    QAction *m_handbook;
+    QAction *m_handbookAct;
 
     QString m_position;
     QString m_distance;
** trunk/KDE/kdeedu/marble/src/icons/get-hot-new-stuff.png #property svn:mime-type
   + application/octet-stream
--- trunk/KDE/kdeedu/marble/src/marble.qrc #1004575:1004576
@@ -10,6 +10,7 @@
         <file>icons/document-save-as.png</file>
         <file>icons/edit-copy.png</file>
         <file>icons/go-home.png</file>
+        <file>icons/get-hot-new-stuff.png</file>
         <file>icons/help-contents.png</file>
         <file>icons/help-whatsthis.png</file>
         <file>icons/map-flat.png</file>


More information about the Marble-commits mailing list