[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Fri Jun 20 07:48:48 CEST 2003


CVS commit by staikos: 

- add a demo dcop interface.  has methods to list the scalars, list the vectors,
create an equation plot (basic, slightly incomplete, but usable), and show the
data manager dialog

- add a method to kstobjectlist to generate a list of the tagnames

- notes on refactoring

- 


  A            kstiface.h   1.1
  A            kstiface_impl.cpp   1.1
  A            kstiface_impl.h   1.1
  M +2 -0      Makefile.am   1.33
  M +11 -7     kst.cpp   1.21
  M +5 -4      kst.h   1.10
  M +1 -0      kstcurvedialog_i.cpp   1.15
  M +9 -0      kstobject.h   1.6


--- kdeextragear-2/kst/kst/Makefile.am  #1.32:1.33
@@ -23,4 +23,6 @@
 
 kst_SOURCES = \
+        kstiface.skel \
+        kstiface_impl.cpp \
         kstobject.cpp \
         kstdataobject.cpp \

--- kdeextragear-2/kst/kst/kst.cpp  #1.20:1.21
@@ -57,4 +57,5 @@
 #include "kstplugindialog_i.h"
 #include "kstdatamanager_i.h"
+#include "kstiface_impl.h"
 //#include "resource.h"
 
@@ -63,7 +64,6 @@
 #define KST_STATUSBAR_STATUS 2
 
-KstApp::KstApp(QWidget *parent, const char* name):
-  KMainWindow(parent, name){
-
+KstApp::KstApp(QWidget *parent, const char* name)
+: KMainWindow(parent, name) {
 
   stopping = false;
@@ -162,7 +162,11 @@ KstApp::KstApp(QWidget *parent, const ch
   connect(pluginDialog->PluginManager, SIGNAL(clicked()),
           this, SLOT(showPluginManager()));
+
+  _dcopIface = new KstIfaceImpl(doc, this);
 }
 
 KstApp::~KstApp(){
+  delete _dcopIface;
+  _dcopIface = 0L;
 }
 

--- kdeextragear-2/kst/kst/kst.h  #1.9:1.10
@@ -38,4 +37,5 @@
 
 // forward declaration of the Kst classes
+class KstIfaceImpl;
 class KstDoc;
 class KstView;
@@ -192,7 +192,7 @@ public slots:
   void slotViewToolBar();
 
-  void slotEditCut() {};
-  void slotEditCopy() {};
-  void slotEditPaste() {};
+  //void slotEditCut() {}
+  //void slotEditCopy() {}
+  //void slotEditPaste() {}
 
   /** toggles the statusbar */
@@ -367,4 +367,5 @@ private:
 
   bool stopping;
+  KstIfaceImpl *_dcopIface;
 };
 

--- kdeextragear-2/kst/kst/kstcurvedialog_i.cpp  #1.14:1.15
@@ -330,4 +330,5 @@ void KstCurveDialogI::addPlot() {
 
   cols = _curvePlacement->columns();
+  // FIXME: refactor this (arrangePlots()?)
   n_plots = KST::plotList.count();
   rows = (n_plots-1)/cols + 1;

--- kdeextragear-2/kst/kst/kstobject.h  #1.5:1.6
@@ -21,4 +21,5 @@
 #include <ksharedptr.h>
 #include <qstring.h>
+#include <qstringlist.h>
 #include <qobject.h>
 
@@ -53,4 +54,12 @@ class KstObjectList : public QValueList<
     KstObjectList(const QValueList<T>& x) : QValueList<T>(x) {}
     virtual ~KstObjectList() {}
+
+    virtual QStringList tagNames() {
+      QStringList rc;
+      for (typename QValueList<T>::Iterator it = begin(); it != end(); ++it) {
+        rc << (*it)->tagName();
+      }
+      return rc;
+    }
 
     virtual typename QValueList<T>::Iterator findTag(const QString& x) {




More information about the Kst mailing list