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

List:       kde-commits
Subject:    branches/marble/marble-1.1/src/plugins/render
From:       Utku Aydın <utkuaydin34 () gmail ! com>
Date:       2011-01-08 9:31:51
Message-ID: 20110108093151.E23C3AC8B0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1212851 by aydin:

Add about dialogs for Crosshairs, Earthquake, Compass and APRS plugins


 M  +25 -0     aprs/AprsPlugin.cpp  
 M  +3 -0      aprs/AprsPlugin.h  
 M  +27 -0     compass/CompassFloatItem.cpp  
 M  +4 -0      compass/CompassFloatItem.h  
 M  +28 -0     crosshairs/CrosshairsPlugin.cpp  
 M  +5 -0      crosshairs/CrosshairsPlugin.h  
 M  +30 -1     earthquake/EarthquakePlugin.cpp  
 M  +6 -1      earthquake/EarthquakePlugin.h  


--- branches/marble/marble-1.1/src/plugins/render/aprs/AprsPlugin.cpp \
#1212850:1212851 @@ -43,6 +43,7 @@
       m_ttyGatherer( 0 ),
       m_fileGatherer( 0 ),
       m_action( 0 ),
+      m_aboutDialog( 0 ),
       m_configDialog( 0 ),
       ui_configWidget( 0 )
 {
@@ -135,6 +136,30 @@
     return QIcon();
 }
 
+QDialog* AprsPlugin::aboutDialog() const
+{
+    if ( !m_aboutDialog )
+    {
+        // Initializing about dialog
+        m_aboutDialog = new PluginAboutDialog();
+        m_aboutDialog->setName( "APRS 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 hardaker;
+        
+        hardaker.name = QString::fromUtf8( "Wes Hardaker" );
+        hardaker.task = tr( "Developer" );
+        hardaker.email = "hardaker@users.sourceforge.net";
+        authors.append( hardaker );
+        m_aboutDialog->setAuthors( authors );
+        
+        m_aboutDialog->setLicense( PluginAboutDialog::License_LGPL_V2 );
+    }
+    return m_aboutDialog;
+}
+
 void AprsPlugin::stopGatherers()
 {
 
--- branches/marble/marble-1.1/src/plugins/render/aprs/AprsPlugin.h #1212850:1212851
@@ -21,6 +21,7 @@
 #include "../lib/HttpDownloadManager.h"
 #include "../lib/CacheStoragePolicy.h"
 #include "GeoDataLatLonAltBox.h"
+#include "PluginAboutDialog.h"
 
 #include "ui_AprsConfigWidget.h"
 
@@ -53,6 +54,7 @@
         QString nameId() const;
         QString description() const;
         QIcon icon () const;
+        QDialog *aboutDialog() const;
 
         void initialize ();
         bool isInitialized () const;
@@ -86,6 +88,7 @@
         QString                        m_filter;
         QAction                       *m_action;
 
+        mutable PluginAboutDialog     *m_aboutDialog;
         mutable QDialog               *m_configDialog;
         mutable Ui::AprsConfigWidget  *ui_configWidget;
         QHash<QString,QVariant>        m_settings;
--- branches/marble/marble-1.1/src/plugins/render/compass/CompassFloatItem.cpp \
#1212850:1212851 @@ -29,6 +29,7 @@
 CompassFloatItem::CompassFloatItem ( const QPointF &point, const QSizeF &size )
     : AbstractFloatItem( point, size ),
       m_isInitialized( false ),
+      m_aboutDialog(0),
       m_svgobj( 0 ),
       m_compass(),
       m_polarity( 0 ),
@@ -72,6 +73,32 @@
     return QIcon();
 }
 
+QDialog* CompassFloatItem::aboutDialog() const
+{
+    if ( !m_aboutDialog ) {
+        // Initializing about dialog
+        m_aboutDialog = new PluginAboutDialog();
+        m_aboutDialog->setName( "Compass 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 tackat, earthwings;
+        
+        earthwings.name = QString::fromUtf8( "Dennis Nienhüser" );
+        earthwings.task = tr( "Developer" );
+        earthwings.email = "earthwings@gentoo.org";
+        authors.append( earthwings );
+        
+        tackat.name = "Torsten Rahn";
+        tackat.task = tr( "Developer" );
+        tackat.email = "tackat@kde.org";
+        authors.append( tackat );
+        m_aboutDialog->setAuthors( authors );
+    }
+    return m_aboutDialog;
+}
+
 void CompassFloatItem::initialize()
 {
     readSettings();
--- branches/marble/marble-1.1/src/plugins/render/compass/CompassFloatItem.h \
#1212850:1212851 @@ -14,6 +14,7 @@
 #include <QtCore/QObject>
 
 #include "AbstractFloatItem.h"
+#include "PluginAboutDialog.h"
 
 class QSvgRenderer;
 
@@ -51,6 +52,8 @@
 
     QIcon icon () const;
 
+    QDialog *aboutDialog() const;
+    
     void initialize ();
 
     bool isInitialized () const;
@@ -78,6 +81,7 @@
 
     bool           m_isInitialized;
 
+    mutable PluginAboutDialog *m_aboutDialog;
     mutable QSvgRenderer  *m_svgobj;
     mutable QPixmap        m_compass;
 
--- branches/marble/marble-1.1/src/plugins/render/crosshairs/CrosshairsPlugin.cpp \
#1212850:1212851 @@ -30,6 +30,7 @@
 
 CrosshairsPlugin::CrosshairsPlugin ( )
     : m_isInitialized( false ),
+      m_aboutDialog( 0 ),
       m_svgobj( 0 ),
       m_configDialog( 0 ),
       m_uiConfigWidget( 0 )
@@ -83,6 +84,33 @@
     return QIcon( ":/icons/crosshairs.png" );
 }
 
+QDialog* CrosshairsPlugin::aboutDialog() const
+{
+    if ( !m_aboutDialog ) {
+        // Initializing about dialog
+        m_aboutDialog = new PluginAboutDialog();
+        m_aboutDialog->setName( "Crosshairs 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 tackat, cezar;
+        
+        cezar.name = QString::fromUtf8( "Cezar Mocan" );
+        cezar.task = tr( "Developer" );
+        cezar.email = "cezarmocan@gmail.com";
+        authors.append( cezar );
+        
+        tackat.name = "Torsten Rahn";
+        tackat.task = tr( "Developer" );
+        tackat.email = "tackat@kde.org";
+        authors.append( tackat );
+        
+        m_aboutDialog->setAuthors( authors );
+    }
+    return m_aboutDialog;
+}
+
 void CrosshairsPlugin::initialize ()
 {
     readSettings();
--- branches/marble/marble-1.1/src/plugins/render/crosshairs/CrosshairsPlugin.h \
#1212850:1212851 @@ -19,6 +19,7 @@
 #include <QtCore/QObject>
 
 #include "AbstractFloatItem.h"
+#include "PluginAboutDialog.h"
 
 #include "RenderPlugin.h"
 
@@ -64,6 +65,8 @@
 
     QIcon icon () const;
 
+    QDialog *aboutDialog() const;
+
     void initialize ();
 
     bool isInitialized () const;
@@ -86,6 +89,8 @@
 
     bool m_isInitialized;
 
+    mutable PluginAboutDialog *m_aboutDialog;
+
     mutable QSvgRenderer *m_svgobj;
     mutable QPixmap m_crosshairs;
 
--- branches/marble/marble-1.1/src/plugins/render/earthquake/EarthquakePlugin.cpp \
#1212850:1212851 @@ -5,7 +5,7 @@
 // find a copy of this license in LICENSE.txt in the top directory of
 // the source code.
 //
-// Copyright 2010 Utku Aydin <utkuaydin34@gmail.com>
+// Copyright 2011 Utku Aydın <utkuaydin34@gmail.com>
 //
 
 #include "EarthquakePlugin.h"
@@ -19,6 +19,7 @@
 
 EarthquakePlugin::EarthquakePlugin()
     : m_isInitialized( false ),
+      m_aboutDialog( 0 ),
       m_configDialog( 0 )
 {
     setNameId( "earthquake" );
@@ -65,6 +66,34 @@
     return QIcon();
 }
 
+QDialog* EarthquakePlugin::aboutDialog() const
+{
+    if ( !m_aboutDialog )
+    {
+        // Initializing about dialog
+        m_aboutDialog = new PluginAboutDialog();
+        m_aboutDialog->setName( "Earthquake 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 utku, daniel;
+
+        utku.name = QString::fromUtf8( "Utku Aydın" );
+        utku.task = tr( "Developer" );
+        utku.email = "utkuaydin34@gmail.com";
+        authors.append( utku );
+
+        daniel.name = QString::fromUtf8( "Daniel Marth" );
+        daniel.task = tr( "Configuration Plugin" );
+        authors.append( daniel );
+        m_aboutDialog->setAuthors( authors );
+
+        m_aboutDialog->setLicense( PluginAboutDialog::License_LGPL_V2 );
+    }
+    return m_aboutDialog;
+}
+
 QDialog *EarthquakePlugin::configDialog() const
 {
     if ( !m_configDialog ) {
--- branches/marble/marble-1.1/src/plugins/render/earthquake/EarthquakePlugin.h \
#1212850:1212851 @@ -5,7 +5,7 @@
 // find a copy of this license in LICENSE.txt in the top directory of
 // the source code.
 //
-// Copyright 2010 Utku Aydin <utkuaydin34@gmail.com>
+// Copyright 2011 Utku Aydın <utkuaydin34@gmail.com>
 //
 
 #ifndef EARTHQUAKEPLUGIN_H
@@ -15,6 +15,8 @@
 #include "RenderPlugin.h"
 #include "RenderPluginInterface.h"
 
+#include "PluginAboutDialog.h"
+
 #include <QtCore/QHash>
 #include <QtGui/QIcon>
 #include <QtGui/QAbstractButton>
@@ -50,6 +52,8 @@
 
     QIcon icon() const;
 
+    QDialog *aboutDialog() const;
+
     QDialog *configDialog() const;
 
     /**
@@ -69,6 +73,7 @@
 
 private:
     bool m_isInitialized;
+    mutable PluginAboutDialog *m_aboutDialog;
     mutable Ui::EarthquakeConfigWidget *ui_configWidget;
     mutable QDialog *m_configDialog;
     QHash<QString,QVariant> m_settings;


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

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