[Marble-commits] KDE/kdeedu/marble/src
Utku Aydın
utkuaydin34 at gmail.com
Thu Jan 6 17:45:12 CET 2011
SVN commit 1212356 by aydin:
Add about dialogs for compass and crosshairs plugins and a minor fix for GeoWriter
M +1 -1 lib/geodata/writer/GeoWriter.cpp
M +27 -0 plugins/render/compass/CompassFloatItem.cpp
M +4 -0 plugins/render/compass/CompassFloatItem.h
M +28 -0 plugins/render/crosshairs/CrosshairsPlugin.cpp
M +5 -0 plugins/render/crosshairs/CrosshairsPlugin.h
--- trunk/KDE/kdeedu/marble/src/lib/geodata/writer/GeoWriter.cpp #1212355:1212356
@@ -39,7 +39,7 @@
if( writer ) {
//FIXME is this too much of a hack?
//geodataobject is never used in this context
- GeoNode* node;
+ GeoNode* node = new GeoNode;
writer->write( node, *this );
} else {
qDebug() << "There is no GeoWriter registered for: " << name;
--- trunk/KDE/kdeedu/marble/src/plugins/render/compass/CompassFloatItem.cpp #1212355:1212356
@@ -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 at gentoo.org";
+ authors.append( earthwings );
+
+ tackat.name = "Torsten Rahn";
+ tackat.task = tr( "Developer" );
+ tackat.email = "tackat at kde.org";
+ authors.append( tackat );
+ m_aboutDialog->setAuthors( authors );
+ }
+ return m_aboutDialog;
+}
+
void CompassFloatItem::initialize()
{
readSettings();
--- trunk/KDE/kdeedu/marble/src/plugins/render/compass/CompassFloatItem.h #1212355:1212356
@@ -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;
--- trunk/KDE/kdeedu/marble/src/plugins/render/crosshairs/CrosshairsPlugin.cpp #1212355:1212356
@@ -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( "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, cezar;
+
+ cezar.name = QString::fromUtf8( "Cezar Mocan" );
+ cezar.task = tr( "Developer" );
+ cezar.email = "cezarmocan at gmail.com";
+ authors.append( cezar );
+
+ tackat.name = "Torsten Rahn";
+ tackat.task = tr( "Developer" );
+ tackat.email = "tackat at kde.org";
+ authors.append( tackat );
+
+ m_aboutDialog->setAuthors( authors );
+ }
+ return m_aboutDialog;
+}
+
void CrosshairsPlugin::initialize ()
{
readSettings();
--- trunk/KDE/kdeedu/marble/src/plugins/render/crosshairs/CrosshairsPlugin.h #1212355:1212356
@@ -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;
More information about the Marble-commits
mailing list