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

List:       kde-commits
Subject:    branches/extragear/graphics/digikam
From:       Aditya Jitesh Bhatt <adityabhatt1991 () gmail ! com>
Date:       2010-08-01 1:34:00
Message-ID: 20100801013400.69B4EAC783 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1157728 by adityab:

A dummy forgetFaces() method for the image preview, and a dummy method in TagsCache \
named getAllSubTags(int tagId) which will in the future give a list of all child tags \
for a specified tag.

 M  +15 -0     digikam/imagepreviewviewv2.cpp  
 M  +2 -0      digikam/imagepreviewviewv2.h  
 M  +1 -0      libs/database/imagetagpair.h  
 M  +6 -0      libs/database/tagscache.cpp  
 M  +2 -0      libs/database/tagscache.h  


--- branches/extragear/graphics/digikam/digikam/imagepreviewviewv2.cpp \
#1157727:1157728 @@ -555,5 +555,20 @@
     return pair.hasProperty("scannedForFaces");
 }
 
+void ImagePreviewViewV2::forgetFaces()
+{
+    clearFaceItems();
+    d->currentFaces.clear();
 
+    if(hasBeenScanned())
+    {
+        // Remove the "scanned for faces" tag.
+        ImageTagPair pair1(d->item->imageInfo().id(), d->scannedForFacesTagId);
+        pair1.unAssignTag();
+        
+        // Remove the "People" tag and all subtags of it.
+        //FIXME: How to do the above?
+    }
+}
+
 }  // namespace Digikam
--- branches/extragear/graphics/digikam/digikam/imagepreviewviewv2.h #1157727:1157728
@@ -69,6 +69,8 @@
     
     bool hasBeenScanned();
 
+    void forgetFaces();
+
 Q_SIGNALS:
 
     void signalNextItem();
--- branches/extragear/graphics/digikam/libs/database/imagetagpair.h #1157727:1157728
@@ -99,6 +99,7 @@
     /// Remove all occurrences of the property
     void removeProperties(const QString& key);
 
+
 private:
 
     QExplicitlySharedDataPointer<ImageTagPairPriv> d;
--- branches/extragear/graphics/digikam/libs/database/tagscache.cpp #1157727:1157728
@@ -426,6 +426,12 @@
     return id;
 }
 
+QList< int > TagsCache::getAllSubtags(int tagId)
+{
+    
+}
+
+
 void TagsCache::slotTagChanged(const TagChangeset& changeset)
 {
     if (!d->changingDB && changeset.operation() != TagChangeset::IconChanged)
--- branches/extragear/graphics/digikam/libs/database/tagscache.h #1157727:1157728
@@ -116,6 +116,8 @@
     int getOrCreateTag(const QString& tagPath);
     QList<int> getOrCreateTags(const QStringList& tagPaths);
 
+    QList<int> getAllSubtags(int tagId);
+
 signals:
 
     /** These signals are provided for convenience; for finer grained information


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

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