[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Tue Oct 25 16:06:12 CEST 2005


SVN commit 474098 by staikos:

remove all references to filter sets


 M  +1 -44     kstdatamanager_i.cpp  
 M  +0 -2      kstdatamanager_i.h  


--- trunk/extragear/graphics/kst/kst/kstdatamanager_i.cpp #474097:474098
@@ -47,7 +47,6 @@
 
 
 static QMap<int,Kst2DPlotPtr> PlotMap;
-static QMap<int,QString> FilterMap;
 
 #define RTTI_OBJ_VECTOR          4201
 #define RTTI_OBJ_OBJECT          4202
@@ -429,22 +428,6 @@
 }
 
 
-void KstObjectItem::applyFilter(int id) {
-  /* Replace with new filtering logic
-     KST::filterSetList.lock().readLock();
-     KstFilterSetPtr p = KST::filterSetList.find(FilterMap[id]);
-     KST::filterSetList.lock().readUnlock();
-     KST::vectorList.lock().readLock();
-     KstVectorPtr v = *KST::vectorList.findTag(_name);
-     KST::vectorList.lock().readUnlock();
-     if (p && v) {
-     KstFilteredVectorPtr fv = new KstFilteredVector(v, p);
-     emit updated();
-     }
-   */
-}
-
-
 void KstObjectItem::activateHint(int id) {
   KstDataObjectPtr d = dataObject();
   const KstCurveHintList* hints = d->curveHints();
@@ -554,9 +537,6 @@
   connect(NewCSD, SIGNAL(clicked()),
           KstCsdDialogI::globalInstance(), SLOT(show_New()));
 
-  // FIXME: Filters disabled for now...
-  //  connect(Filter, SIGNAL(clicked()), this, SLOT(filter_I()));
-
   connect(DataView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), this, SLOT(contextMenu(QListViewItem*, const QPoint&, int)));
 }
 
@@ -765,11 +745,6 @@
 }
 
 
-void KstDataManagerI::filter_I() {
-//  static_cast<KstApp*>(doc->parent())->showFilterListEditor();
-}
-
-
 void KstDataManagerI::edit_I() {
   QListViewItem *qi;
 
@@ -897,7 +872,7 @@
 
 // Menu IDs:
 // 100->499 reserved for plots
-// 500->999 reserver for filters
+// 500->999 reserved for filters
 
 void KstDataManagerI::contextMenu(QListViewItem *i, const QPoint& p, int col) {
   Q_UNUSED(col)
@@ -919,24 +894,6 @@
     id = m->insertItem(i18n("&Edit..."), this, SLOT(edit_I()));
   }
 
-  if (koi->rtti() == RTTI_OBJ_DATA_VECTOR ||
-      koi->rtti() == RTTI_OBJ_VECTOR) {
-    KPopupMenu *fMenu = new KPopupMenu(this);
-    id = 500;
-    FilterMap.clear();
-#if 0
-    KST::filterSetList.lock().readLock();
-    for (KstFilterSetList::Iterator f = KST::filterSetList.begin(); f != KST::filterSetList.end(); ++f) {
-      fMenu->insertItem((*f)->name(), koi, SLOT(applyFilter(int)), 0, id);
-      FilterMap[id] = (*f)->name();
-      ++id;
-    }
-    KST::filterSetList.lock().readUnlock();
-#endif
-    id = m->insertItem(i18n("Apply &Filter"), fMenu);
-    m->setItemEnabled(id, !FilterMap.isEmpty());
-  }
-
   if (koi->dataObject()) {
     const KstCurveHintList* hints = koi->dataObject()->curveHints();
     if (!hints->isEmpty()) {
--- trunk/extragear/graphics/kst/kst/kstdatamanager_i.h #474097:474098
@@ -41,7 +41,6 @@
     void updateContents();
     void show_I();
     void edit_I();
-    void filter_I();
     void delete_I();
 
   private slots:
@@ -84,7 +83,6 @@
     void updateButtons();
 
   public slots:
-    void applyFilter(int);
     void addToPlot(int);
     void activateHint(int);
     void removeFromPlot(int);


More information about the Kst mailing list