[Kde-imaging] [Bug 139793] kmz kml google export import

Gilles Caulier caulier.gilles at gmail.com
Sat Apr 7 17:39:34 CEST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=139793         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From caulier.gilles gmail com  2007-04-07 17:39 -------
SVN commit 651402 by cgilles:

kipi-plugins from trunk : GPSSync : patch from Stéphane Pontier to add new option for export GPS position from pictures to a KML file. This one can be viewed in GoogleEarth or GoogleMaps !

BUG: 139793
CCMAIL: shadow.walker free fr
CCMAIL: kde-imaging kde org

 M  +4 -2      Makefile.am  
 M  +1 -1      gpsdataparser.h  
 AM            kmlexport.cpp   [License: GPL (v2+) (wrong address)]
 AM            kmlexport.h   [License: GPL (v2+) (wrong address)]
 AM            kmlexportconfig.cpp   [License: GPL (v2+) (wrong address)]
 AM            kmlexportconfig.h   [License: GPL (v2+) (wrong address)]
 AM            kmlgpsdataparser.cpp   [License: GPL (v2+) (wrong address)]
 AM            kmlgpsdataparser.h   [License: GPL (v2+) (wrong address)]
 M  +42 -0     plugin_gpssync.cpp  
 M  +4 -0      plugin_gpssync.h  


--- trunk/extragear/libs/kipi-plugins/gpssync/Makefile.am #651401:651402
 @ -10,11 +10,13  @
 # Srcs for the plugin
 kipiplugin_gpssync_la_SOURCES = plugin_gpssync.cpp gpssyncdialog.cpp gpslistviewitem.cpp \
 	                        gpsbabelbinary.cpp gpsdataparser.cpp gpseditdialog.cpp \
-	                        gpsmapwidget.cpp 
+	                        gpsmapwidget.cpp kmlexport.cpp kmlexportconfig.cpp \
+				kmlgpsdataparser.cpp 
 
 # Libs needed by the plugin
 kipiplugin_gpssync_la_LIBADD = $(LIBKEXIV2_LIBS) -lkipiplugins $(LIBKIPI_LIBS) $(LIB_KHTML) \
-	                       $(LIB_KPARTS) $(LIB_KIO) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT)
+	                       $(LIB_KPARTS) $(LIB_KIO) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) \
+	                       $(LIB_KFILE)
 
 # LD flags for the plugin
 kipiplugin_gpssync_la_LDFLAGS = $(KIPI_PLUGINS_COMMON_LDFLAGS) -module $(KDE_PLUGIN) $(all_libraries)
--- trunk/extragear/libs/kipi-plugins/gpssync/gpsdataparser.h #651401:651402
 @ -60,7 +60,7  @
     QDateTime findNextDate(QDateTime dateTime, int secs);
     QDateTime findPrevDate(QDateTime dateTime, int secs);
 
-private: 
+protected: 
 
     typedef QMap<QDateTime, GPSDataContainer> GPSDataMap; 
 
** trunk/extragear/libs/kipi-plugins/gpssync/kmlexport.cpp #property svn:eol-style
   + native
** trunk/extragear/libs/kipi-plugins/gpssync/kmlexport.h #property svn:eol-style
   + native
** trunk/extragear/libs/kipi-plugins/gpssync/kmlexportconfig.cpp #property svn:eol-style
   + native
** trunk/extragear/libs/kipi-plugins/gpssync/kmlexportconfig.h #property svn:eol-style
   + native
** trunk/extragear/libs/kipi-plugins/gpssync/kmlgpsdataparser.cpp #property svn:eol-style
   + native
** trunk/extragear/libs/kipi-plugins/gpssync/kmlgpsdataparser.h #property svn:eol-style
   + native
--- trunk/extragear/libs/kipi-plugins/gpssync/plugin_gpssync.cpp #651401:651402
 @ -50,7 +50,10  @
 #include "gpssyncdialog.h"
 #include "plugin_gpssync.h"
 #include "plugin_gpssync.moc"
+#include "kmlexport.h"
+#include "kmlexportconfig.h"
 
+
 typedef KGenericFactory<Plugin_GPSSync> Factory;
 
 K_EXPORT_COMPONENT_FACTORY( kipiplugin_gpssync, Factory("kipiplugin_gpssync"))
 @ -96,6 +99,17  @
 
     addAction( m_action_geolocalization );
 
+   // this is our action shown in the menubar/toolbar of the mainwindow
+    m_actionKMLExport = new KAction (i18n("Export kml..."),
+                                     "www",	// icon
+                                   0,	// do never set shortcuts from plugins.
+                                   this,
+                                   SLOT(slotKMLExport()),
+                                   actionCollection(),
+                                   "kmlexport");
+
+    addAction( m_actionKMLExport );
+
     m_interface = dynamic_cast< KIPI::Interface* >( parent() );
 
     if ( !m_interface )
 @ -305,10 +319,38  @
     }
 }
 
+
+void Plugin_GPSSync::slotKMLExport()
+{
+    KIPI::ImageCollection selection = m_interface->currentSelection();
+
+    if ( !selection.isValid() ) {
+        kdDebug( 51000) << "No Selection!" << endl;
+    }
+    else {
+        KIPIGPSSyncPlugin::KMLExportConfig *kmlExportConfigGui = new KIPIGPSSyncPlugin::KMLExportConfig( kapp->activeWindow(), i18n("KMLExport").ascii());
+        connect(kmlExportConfigGui, SIGNAL(okButtonClicked()), this, SLOT(slotKMLGenerate()));
+        kmlExportConfigGui->show();
+
+    }
+}
+
+void Plugin_GPSSync::slotKMLGenerate()
+{
+    KIPI::ImageCollection selection = m_interface->currentSelection();
+    KIPIGPSSyncPlugin::kmlExport myExport(m_interface);
+    if(!myExport.getConfig())
+        return;
+    myExport.generate();
+}
+
+
 KIPI::Category Plugin_GPSSync::category( KAction* action ) const
 {
     if ( action == m_action_geolocalization )
        return KIPI::IMAGESPLUGIN;
+    if ( action == m_actionKMLExport )
+       return KIPI::EXPORTPLUGIN;
 
     kdWarning( 51000 ) << "Unrecognized action for plugin category identification" << endl;
     return KIPI::IMAGESPLUGIN; // no warning from compiler, please
--- trunk/extragear/libs/kipi-plugins/gpssync/plugin_gpssync.h #651401:651402
 @ -27,6 +27,7  @
 #include <libkipi/plugin.h>
 
 class KActionMenu;
+class KAction;
 
 class Plugin_GPSSync : public KIPI::Plugin
 {
 @ -44,6 +45,8  @
     void slotGPSSync();
     void slotGPSEdit();
     void slotGPSRemove();
+    void slotKMLGenerate();
+    void slotKMLExport();
 
 private:
 
 @ -52,6 +55,7  @
 private:
 
     KActionMenu     *m_action_geolocalization;
+    KAction         *m_actionKMLExport;
 
     KIPI::Interface *m_interface;
 };


More information about the Kde-imaging mailing list