[Kst] branches/work/kst/portto4/kst/src

Barth Netterfield netterfield at astro.utoronto.ca
Mon Sep 29 21:24:26 CEST 2008


SVN commit 866007 by netterfield:

Remove metadata from datasources.
metadata is now to be handled as dataScalars and dataStrings, which have both
been added to the datasource ui.

The other data sources can now be ported.



 M  +0 -27     libkst/datasource.cpp  
 M  +0 -15     libkst/datasource.h  
 M  +2 -2      libkstapp/scalartab.ui  


--- branches/work/kst/portto4/kst/src/libkst/datasource.cpp #866006:866007
@@ -583,9 +583,6 @@
 
 
 void DataSource::deleteDependents() {
-  for (QHash<QString, String*>::Iterator it = _metaData.begin(); it != _metaData.end(); ++it) {
-    _store->removeObject(it.value());
-  }
 }
 
 
@@ -811,30 +808,6 @@
 }
 
 
-const QHash<QString, String*>& DataSource::metaData() const {
-  return _metaData;
-}
-
-
-QString DataSource::metaData(const QString& key) const {
-  if (_metaData[key]) {
-    return _metaData[key]->value();
-  } else {
-    return QString::null;
-  }
-}
-
-
-bool DataSource::hasMetaData() const {
-  return !_metaData.isEmpty();
-}
-
-
-bool DataSource::hasMetaData(const QString& key) const {
-  return (_metaData[key] != NULL);
-}
-
-
 bool DataSource::supportsTimeConversions() const {
   return false;
 }
--- branches/work/kst/portto4/kst/src/libkst/datasource.h #866006:866007
@@ -135,19 +135,6 @@
     virtual QString descriptionTip() const;
 
     /************************************************************/
-    /* Methods for Metadata:                                    */
-    /* not currently used.  Will be replaced with strings and   */
-    /* scalars, and will probably all be removed                */
-    /************************************************************/
-    virtual const QHash<QString, String*>& metaData() const;
-
-    virtual QString metaData(const QString& key) const;
-
-    virtual bool hasMetaData() const;
-
-    virtual bool hasMetaData(const QString& key) const;
-
-    /************************************************************/
     /* Methods for writing                                      */
     /* only used by d2d - may be reworked (remove this note     */
     /* if you use it)                                           */
@@ -328,8 +315,6 @@
     /** The source type name. */
     QString _source;
 
-    QHash<QString, String*> _metaData;
-
     QSettings *_cfg;
 
     UpdateCheckType _updateCheckType;
--- branches/work/kst/portto4/kst/src/libkstapp/scalartab.ui #866006:866007
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>698</width>
-    <height>269</height>
+    <width>348</width>
+    <height>307</height>
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout" >


More information about the Kst mailing list