[Digikam-devel] extragear/graphics/digikam/digikam

Gilles Caulier caulier.gilles at gmail.com
Mon Jul 16 10:31:52 BST 2007


SVN commit 688541 by cgilles:

KDE4 port. This is the last one to complete digiKam port under KDE4 !

Note : this port is uncomplete. It just to be able to compile and link digiKam as well, and start testing...

Marcel : QCUstomMenuItem implementation need to be ported to QWidgetAction. Still TODO..

CCMAIL: marcel.wiesweg at gmx.de
CCMAIL: digikam-devel at kde.org



 M  +1 -1      CMakeLists.txt  
 M  +21 -15    tagspopupmenu.cpp  


--- trunk/extragear/graphics/digikam/digikam/CMakeLists.txt #688540:688541
@@ -122,7 +122,7 @@
                       tagcreatedlg.cpp 
                       tagfilterview.cpp 
                       tagfolderview.cpp 
-#                      tagspopupmenu.cpp 
+                      tagspopupmenu.cpp 
                       welcomepageview.cpp 
                       main.cpp
    )
--- trunk/extragear/graphics/digikam/digikam/tagspopupmenu.cpp #688540:688541
@@ -57,6 +57,9 @@
 namespace Digikam
 {
 
+#warning "TODO: kde4 port it";
+/*  // TODO: KDE4PORT: use KWidgetAction API instead QCustomMenuItem
+
 class TagsPopupCheckedMenuItem : public QCustomMenuItem
 {
 
@@ -114,6 +117,7 @@
 
     QPixmap     m_pix;
 };
+*/
 
 // ------------------------------------------------------------------------
 
@@ -123,14 +127,14 @@
 
     TagsPopupMenuPriv(){}
 
-    int                 addToID;
+    int                    addToID;
 
-    QPixmap             addTagPix;
+    QPixmap                addTagPix;
 
-    Q3ValueList<int>     assignedTags;
+    Q3ValueList<int>       assignedTags;
     Q3ValueList<qlonglong> selectedImageIDs;
 
-    TagsPopupMenu::Mode mode;
+    TagsPopupMenu::Mode    mode;
 };
 
 TagsPopupMenu::TagsPopupMenu(const Q3ValueList<qlonglong>& selectedImageIDs, int addToID, Mode mode)
@@ -142,11 +146,8 @@
     d->mode             = mode;
 
     KIconLoader *iconLoader = KIconLoader::global();
-    d->addTagPix            = iconLoader->loadIcon("tag",
-                                        KIcon::NoGroup,
-                                        KIcon::SizeSmall,
-                                        KIcon::DefaultState,
-                                        0, true);
+    d->addTagPix            = iconLoader->loadIcon("tag", K3Icon::NoGroup, K3Icon::SizeSmall,
+                                                   K3Icon::DefaultState, 0, true);
     
     connect(this, SIGNAL(aboutToShow()),
             this, SLOT(slotAboutToShow()));
@@ -186,8 +187,10 @@
         QPixmap pix = SyncJob::getTagThumbnail(album);
         if ((d->mode == ASSIGN) && (d->assignedTags.contains(album->id())))
         {
+#warning "TODO: kde4 port it";
+/*  // TODO: KDE4PORT: use KWidgetAction API instead QCustomMenuItem
             popup->insertItem(new TagsPopupCheckedMenuItem(popup, album->title(), pix),
-                              d->addToID + album->id());
+                              d->addToID + album->id());*/
         }
         else
         {
@@ -231,8 +234,8 @@
             return;
 
         // also add the parents of the assigned tags
-        IntList tList;
-        for (IntList::iterator it = d->assignedTags.begin();
+        QLinkedList<int> tList;
+        for (QLinkedList<int>::iterator it = d->assignedTags.begin();
              it != d->assignedTags.end(); ++it)
         {
             TAlbum* album = man->findTAlbum(*it);
@@ -247,7 +250,7 @@
             }
         }
 
-        for (IntList::iterator it = tList.begin();
+        for (QLinkedList<int>::iterator it = tList.begin();
              it != tList.end(); ++it)
         {
             d->assignedTags.append(*it);
@@ -301,8 +304,7 @@
         
         if (d->mode == REMOVE)
         {
-            IntList::iterator it = qFind(d->assignedTags.begin(), 
-                                         d->assignedTags.end(), a->id());
+            QLinkedList<int>::iterator it = qFind(d->assignedTags.begin(), d->assignedTags.end(), a->id());
             if (it == d->assignedTags.end())
                 continue;
         }
@@ -319,8 +321,12 @@
         {
             if ((d->mode == ASSIGN) && (d->assignedTags.contains(a->id())))
             {
+#warning "TODO: kde4 port it";
+/*  // TODO: KDE4PORT: use KWidgetAction API instead QCustomMenuItem
+            
                 menu->insertItem(new TagsPopupCheckedMenuItem(this, a->title(), pix),
                                                               d->addToID + a->id());
+*/
             }
             else
             {



More information about the Digikam-devel mailing list