[Marble-commits] KDE/kdeedu/marble/src/plugins/render/positionmarker

Torsten Rahn tackat at kde.org
Wed Dec 29 23:53:39 CET 2010


SVN commit 1210180 by rahn:

Patch by Daniel Marth:
About dialog for the position marker plugin.
This patch was created for the following GCI task:
http://www.google-melange.com/gci/task/show/google/gci2010/kde/t129347320534



 M  +33 -0     PositionMarker.cpp  
 M  +5 -0      PositionMarker.h  


--- trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/PositionMarker.cpp #1210179:1210180
@@ -8,6 +8,7 @@
 // Copyright 2007   Andrew Manson   <g.real.ate at gmail.com>
 // Copyright 2009   Eckhart Wörner  <ewoerner at kde.org>
 // Copyright 2010   Thibaut Gridel  <tgridel at free.fr>
+// Copyright 2010   Daniel Marth    <danielmarth at gmx.at>
 //
 
 #include "PositionMarker.h"
@@ -28,6 +29,7 @@
 PositionMarker::PositionMarker ()
     : RenderPlugin(),
       m_isInitialized( false ),
+      m_aboutDialog( 0 ),
       m_viewport( 0 )
 {
 }
@@ -76,6 +78,37 @@
     return QIcon();
 }
 
+QDialog *PositionMarker::aboutDialog() const
+{
+    if ( !m_aboutDialog ) {
+        // Initializing about dialog
+        m_aboutDialog = new PluginAboutDialog();
+        m_aboutDialog->setName( "Position Marker Plugin" );
+        m_aboutDialog->setVersion( "0.1" );
+        // FIXME: Can we store this string for all of Marble
+        m_aboutDialog->setAboutText( tr( "<br />(c) 2009, 2010 The Marble Project<br /><br /><a href=\"http://edu.kde.org/marble\">http://edu.kde.org/marble</a>" ) );
+        QList<Author> authors;
+        Author amanson, ewoerner, tgridel, dmarth;
+        amanson.name = "Andrew Manson";
+        amanson.task = tr( "Developer" );
+        amanson.email = "g.real.ate at gmail.com";
+        ewoerner.name = "Eckhart Woerner";
+        ewoerner.task = tr( "Developer" );
+        ewoerner.email = "ewoerner at kde.org";
+        tgridel.name = "Thibaut Gridel";
+        tgridel.task = tr( "Developer" );
+        tgridel.email = "tgridel at free.fr";
+        dmarth.name = "Daniel Marth";
+        dmarth.task = tr( "Developer" );
+        dmarth.email = "danielmarth at gmx.at";
+        authors.append( amanson );
+        authors.append( ewoerner );
+        authors.append( tgridel );
+        authors.append( dmarth );
+        m_aboutDialog->setAuthors( authors );
+    }
+    return m_aboutDialog;
+}
 
 void PositionMarker::initialize()
 {
--- trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/PositionMarker.h #1210179:1210180
@@ -17,6 +17,7 @@
 
 #include "RenderPlugin.h"
 #include "GeoDataCoordinates.h"
+#include "PluginAboutDialog.h"
 
 namespace Marble
 {
@@ -46,6 +47,8 @@
 
     QIcon icon () const;
 
+    QDialog *aboutDialog() const;
+
     void initialize ();
 
     bool isInitialized () const;
@@ -66,6 +69,8 @@
 
     bool           m_isInitialized;
 
+    mutable PluginAboutDialog *m_aboutDialog;
+
     ViewportParams     *m_viewport;
     GeoDataCoordinates  m_currentPosition;
     GeoDataCoordinates  m_previousPosition;


More information about the Marble-commits mailing list