[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Fri Dec 12 23:23:51 CET 2003


CVS commit by staikos: 

much more of the UI fixed and activated, but it still needs very much work


  A            filterintermediate.h   1.1 [GPL (v2+)]
  M +2 -0      filterlisteditor.ui   1.6
  M +31 -15    filterlisteditor.ui.h   1.4
  M +1 -0      kstfilter.h   1.5


--- kdeextragear-2/kst/kst/filterlisteditor.ui  #1.5:1.6
@@ -474,8 +474,10 @@
     <include location="local" impldecl="in implementation">kstdatacollection.h</include>
     <include location="global" impldecl="in implementation">kmessagebox.h</include>
+    <include location="local" impldecl="in declaration">filterintermediate.h</include>
     <include location="local" impldecl="in implementation">filterlisteditor.ui.h</include>
 </includes>
 <variables>
     <variable access="private">QString _currentSet;</variable>
+    <variable access="private">QMap&lt;QString, IFilterSet&gt; _filterSets;</variable>
 </variables>
 <signals>

--- kdeextragear-2/kst/kst/filterlisteditor.ui.h  #1.3:1.4
@@ -21,4 +21,5 @@ void FilterListEditor::init()
 void FilterListEditor::update()
 {
+    _filterSets.clear();
     _filters->clear();
     PluginCollection *pc = PluginCollection::self();
@@ -39,4 +40,14 @@ void FilterListEditor::update()
     }
   
+    for (KstFilterSetList::Iterator fit = KST::filterSetList.begin(); fit != KST::filterSetList.end(); ++fit) {
+        QString name = (*fit)->name();
+        IFilterSet& ifs(_filterSets[name]);
+        for (KstFilterSet::Iterator fsit = (*fit)->begin(); fsit != (*fit)->end(); ++fsit) {
+            QString pname = (*fsit)->plugin()->data()._name;
+            ifs.filters += pname;
+            ifs.arguments[pname] = (*fsit)->inputScalars();
+        }
+    }
+    
     comboChanged();
 }
@@ -208,8 +219,15 @@ void FilterListEditor::filtersetModified
 void FilterListEditor::applyChanges()
 {
+    IFilterSet& ifs(_filterSets[_currentSet]);
+    KstFilterSetPtr p = KST::filterSetList.find(_currentSet);
+    if (!p) {
+        p = new KstFilterSet;
+        p->setName(_currentSet);
+        KST::filterSetList.append(p);
+    }
+
+    p->clear();
     for (unsigned int i = 0; i < _applied->count(); ++i) {
         QString txt = _applied->text(i);
-        KstFilterSetPtr p = KST::filterSetList.find(txt);
-        if (p) {
             KSharedPtr<Plugin> pp = PluginCollection::self()->plugin(txt);
             if (pp) {
@@ -223,5 +241,3 @@ void FilterListEditor::applyChanges()
             }
         }
-        // FIXME: if !p, invalidate
-    }
 }

--- kdeextragear-2/kst/kst/kstfilter.h  #1.4:1.5
@@ -43,4 +43,5 @@ class KstFilterSet : public KstObjectLis
       for (Iterator it = begin(); it != end(); ++it) {
         // FIXME: must use temps here
+        // FIXME: add the inline optimization
         (*it)->apply(v);
       }





More information about the Kst mailing list