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

List:       kde-commits
Subject:    branches/extragear/graphics/digikam/libs/widgets/common
From:       Martin Klapetek <martin.klapetek () gmail ! com>
Date:       2010-07-23 13:44:46
Message-ID: 20100723134446.BF860AC7E2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1153547 by mklapetek:

Preparation for FilterManager

 M  +9 -1      imagefiltershistorymodel.cpp  
 M  +3 -0      imagefiltershistorymodel.h  


--- branches/extragear/graphics/digikam/libs/widgets/common/imagefiltershistorymodel.cpp #1153546:1153547
@@ -43,6 +43,9 @@
 ImageFiltersHistoryModel::ImageFiltersHistoryModel(QObject* parent, const KUrl& url)
                         : QAbstractItemModel(parent)
 {
+    m_filterStack = new QList<FilterAction>();
+//    m_filterManager = new DImgFilterManager();
+
     if(!url.isEmpty())
     {
         kDebug() << "Creating model with url" << url.toLocalFile();
@@ -184,12 +187,15 @@
     parents << parent;
 
     QString itemData;
+    m_filterStack->clear();
 
     for(int i = 0; i < entries.count(); i++)
     {
         if(entries.at(i).filterEntry)
         {
-            itemData = entries.at(i).action.identifier();
+            m_filterStack->append(entries.at(i).action);
+            
+            itemData = entries.at(i).action.displayableName();
             kDebug() << "Adding an entry: " << itemData;
             parents.first()->appendChild(new ImageFiltersHistoryTreeItem(itemData, parents.first()));
             filters << parents.last()->child(parents.last()->childCount()-1);
@@ -224,7 +230,9 @@
     {
         beginResetModel();
         m_rootItem->removeChild(row);
+        m_filterStack->removeAt(row);
         endResetModel();
+        //TODO: emit signal starting FilterManager
         return true;
     }
     return false;
--- branches/extragear/graphics/digikam/libs/widgets/common/imagefiltershistorymodel.h #1153546:1153547
@@ -37,6 +37,7 @@
 
 #include "dimagehistory.h"
 #include "digikam_export.h"
+#include "dimgfiltermanager.h"
 
 namespace Digikam
 {
@@ -74,6 +75,8 @@
 private:
 
     ImageFiltersHistoryTreeItem* m_rootItem;
+    QList<FilterAction>         *m_filterStack;
+    DImgFilterManager           *m_filterManager;
 };
 
 } //namespace Digikam
[prev in list] [next in list] [prev in thread] [next in thread] 

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