[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Oct 22 04:08:54 CEST 2003


CVS commit by staikos: 

- pushed some functionality from the plugins up into the base class
- added the beginning (uncompilable) of the dirfile plugin


  A            datasources/dirfile/.cvsignore   1.1
  A            datasources/dirfile/Makefile.am   1.1
  A            datasources/dirfile/dirfile.cpp   1.1 [GPL (v2+)]
  A            datasources/dirfile/dirfile.h   1.1 [GPL (v2+)]
  A            datasources/dirfile/kstdata_dirfile.desktop   1.1
  M +3 -4      kstdatasource.cpp   1.7
  M +6 -0      kstdatasource.h   1.4
  M +1 -11     datasources/ascii/ascii.cpp   1.5
  M +0 -5      datasources/ascii/ascii.h   1.3
  M +0 -10     datasources/template/template.cpp   1.2
  M +0 -4      datasources/template/template.h   1.2


--- kdeextragear-2/kst/kst/kstdatasource.cpp  #1.6:1.7
@@ -189,6 +189,5 @@ KstDataSourcePtr KstDataSource::loadSour
  
 KstDataSource::KstDataSource(const QString& filename, const QString& type)
-: KstObject() {
-  Q_UNUSED(filename)
+: KstObject(), _filename(filename) {
   Q_UNUSED(type)
   _valid = false;
@@ -245,10 +244,10 @@ int KstDataSource::frameCount() const {
 
 QString KstDataSource::fileName() const {
-  return QString::null;
+  return _filename;
 }
 
 
 QStringList KstDataSource::fieldList() const {
-  return QStringList();
+  return _fieldList;
 }
 

--- kdeextragear-2/kst/kst/kstdatasource.h  #1.3:1.4
@@ -84,4 +84,10 @@ protected:
   bool _valid;
 
+  /** Place to store the list of fields.  Base implementation returns this. */
+  QStringList _fieldList;
+
+  /** The filename.  Populated by the base class constructor.  */
+  QString _filename;
+
 private:
   /** Read filename from indirect file: return 1 if file changes */

--- kdeextragear-2/kst/kst/datasources/ascii/ascii.cpp  #1.4:1.5
@@ -28,5 +28,5 @@
  
 AsciiSource::AsciiSource(const QString& filename, const QString& type)
-: KstDataSource(filename, type), _filename(filename) {
+: KstDataSource(filename, type) {
   if (!type.isEmpty() && type != "ASCII") {
     return;
@@ -235,14 +235,4 @@ int AsciiSource::samplesPerFrame(const Q
 int AsciiSource::frameCount() const {
   return _numFrames;
-}
-
-
-QString AsciiSource::fileName() const {
-  return _filename;
-}
-
-
-QStringList AsciiSource::fieldList() const {
-  return QStringList(); // No fields
 }
 

--- kdeextragear-2/kst/kst/datasources/ascii/ascii.h  #1.2:1.3
@@ -41,8 +41,4 @@ public:
   virtual int frameCount() const;
 
-  virtual QString fileName() const;
-
-  virtual QStringList fieldList() const;
-
   virtual QString fileType() const;
 
@@ -51,5 +47,4 @@ public:
 private:
   int *_rowIndex;
-  QString _filename;
   int _numLinesAlloc;
   int _numFrames;

--- kdeextragear-2/kst/kst/datasources/template/template.cpp  #1.1:1.2
@@ -65,14 +65,4 @@ int TemplateSource::frameCount() const {
 
 
-QString TemplateSource::fileName() const {
-  return QString::null;
-}
-
-
-QStringList TemplateSource::fieldList() const {
-  return QStringList();
-}
-
-
 QString TemplateSource::fileType() const {
   return QString::null;

--- kdeextragear-2/kst/kst/datasources/template/template.h  #1.1:1.2
@@ -39,8 +39,4 @@ public:
   virtual int frameCount() const;
 
-  virtual QString fileName() const;
-
-  virtual QStringList fieldList() const;
-
   virtual QString fileType() const;
 




More information about the Kst mailing list