[Digikam-devel] [Bug 111560] Be able to locate photos on a map

Gilles Caulier caulier.gilles at free.fr
Wed Sep 27 13:27:48 BST 2006


------- 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=111560         




------- Additional Comments From caulier.gilles free fr  2006-09-27 14:27 -------
SVN commit 589005 by cgilles:

kipi-plugins from trunk : GPSSync tool : added capabilty to add/remove GPS position manually to more than one pictures at the same time. Just take your pictures selection on the list using SHIFT/CTRL keys and push "Edit Coordinates" button.

CCMAIL: gerhard kulzer net

CCBUGS: 133359, 111560

 M  +4 -8      gpslistviewitem.cpp  
 M  +1 -1      gpslistviewitem.h  
 M  +32 -6     gpssyncdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/gpssync/gpslistviewitem.cpp #589004:589005
 @ -93,6 +93,7  @
     setEnabled(true);
     d->dirty   = dirty;
     d->gpsData = gpsData;
+    d->erase   = false;
     setText(2, QString::number(d->gpsData.altitude(),  'g', 12));
     setText(3, QString::number(d->gpsData.latitude(),  'g', 12));
     setText(4, QString::number(d->gpsData.longitude(), 'g', 12));
 @ -187,16 +188,11  @
     return d->dirty;
 }
 
-void GPSListViewItem::eraseGPSInfo(bool e)
+void GPSListViewItem::eraseGPSInfo()
 {
-    d->erase = e;
+    d->erase = true;
     d->dirty = true;
-
-    if (e)
-        setText(6, i18n("Deleted!"));
-    else 
-        setText(6, "");
-
+    setText(6, i18n("Deleted!"));
     repaint();
 }
 
--- trunk/extragear/libs/kipi-plugins/gpssync/gpslistviewitem.h #589004:589005
 @ -57,7 +57,7  @
 
     void setGPSInfo(GPSDataContainer gpsData, bool dirty=true, bool addedManually=false);
     GPSDataContainer getGPSInfo();
-    void eraseGPSInfo(bool e);
+    void eraseGPSInfo();
 
     void setDateTime(QDateTime date);
     QDateTime getDateTime();
--- trunk/extragear/libs/kipi-plugins/gpssync/gpssyncdialog.cpp #589004:589005
 @ -150,7 +150,7  @
     d->listView->setAllColumnsShowFocus(true);
     d->listView->setSorting(-1);
     d->listView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-    d->listView->setSelectionMode(QListView::Single);
+    d->listView->setSelectionMode(QListView::Extended);
     d->listView->setMinimumWidth(450);
 
     // ---------------------------------------------------------------
 @ -401,7 +401,7  @
                              .arg(itemsUpdated), i18n("GPS Sync"));    
 }
 
-// Launch the GPS coordinates editor.
+// Start the GPS coordinates editor dialog.
 void GPSSyncDialog::slotUser2()
 {
     if (!d->listView->currentItem())
 @ -417,11 +417,37  @
     switch (dlg.exec())
     {
         case KDialogBase::Accepted:
-            item->setGPSInfo(dlg.getGPSInfo(), true, true);
-        break;
+        {
+            QListViewItemIterator it(d->listView);
+
+            while (it.current())
+            {
+                if (it.current()->isSelected())
+                {
+                    GPSListViewItem *selItem = (GPSListViewItem*)it.current();
+                    selItem->setGPSInfo(dlg.getGPSInfo(), true, true);
+                }
+                ++it;
+            }
+
+            break;
+        }
         case(-1):   // Erase all GPS tags
-            item->eraseGPSInfo(true);
-        break;
+        {
+            QListViewItemIterator it(d->listView);
+
+            while (it.current())
+            {
+                if (it.current()->isSelected())
+                {
+                    GPSListViewItem *selItem = (GPSListViewItem*)it.current();
+                    selItem->eraseGPSInfo();
+                }
+                ++it;
+            }
+
+            break;
+        }
     }
 }



More information about the Digikam-devel mailing list