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

Mike Fenton mike at staikos.net
Mon Oct 6 16:09:40 CEST 2008


SVN commit 868530 by fenton:

Add Knee Frequency Fits Plugin.
Add Error Message provision for Plugins and display in Filter Fit Dialog.


 M  +3 -1      libkstapp/filterfitdialog.cpp  
 M  +2 -1      libkstmath/basicplugin.h  
 M  +1 -0      plugins/fits/fits.pro  
 A             plugins/fits/kneefrequency (directory)  
 AM            plugins/fits/kneefrequency/fitkneefrequency.cpp   [License: GPL (v2+)]
 AM            plugins/fits/kneefrequency/fitkneefrequency.h   [License: GPL (v2+)]
 AM            plugins/fits/kneefrequency/fitkneefrequencyconfig.ui  
 AM            plugins/fits/kneefrequency/kneefrequency.pro  
 AM            plugins/fits/kneefrequency/kstplugin_fits_kneefrequency.desktop  


--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.cpp #868529:868530
@@ -170,7 +170,9 @@
 
   if (!dataObject->isValid()) {
     _document->objectStore()->removeObject(dataObject);
-    QMessageBox::warning(this, tr("Kst"), tr("Unable to create Plugin Object using provided parameters."));
+    QString msg(tr("Unable to create Plugin Object using provided parameters.\n\n"));
+    msg += dataObject->errorMessage();
+    QMessageBox::warning(this, tr("Kst"), msg);
 
     return 0;
   }
--- branches/work/kst/portto4/kst/src/libkstmath/basicplugin.h #868529:868530
@@ -53,6 +53,7 @@
 
     // Validator of plugin data.  Expensive, only use to verify successful creation.
     bool isValid() { return algorithm(); }
+    QString errorMessage() { return _errorString; }
 
   public slots:
     //Pure virtual slots from DataObject
@@ -99,7 +100,7 @@
     virtual ~BasicPlugin();
 
     virtual QString parameterName(int index) const;
-    bool _isFit;
+    QString _errorString;
 
   private:
     bool inputsExist() const;
--- branches/work/kst/portto4/kst/src/plugins/fits/fits.pro #868529:868530
@@ -4,6 +4,7 @@
 SUBDIRS += \
     gradient_weighted \
     gradient_unweighted \
+    kneefrequency \
     linear_weighted \
     linear_unweighted \
     polynomial_unweighted \
** branches/work/kst/portto4/kst/src/plugins/fits/kneefrequency/fitkneefrequency.cpp #property svn:executable
   + *
** branches/work/kst/portto4/kst/src/plugins/fits/kneefrequency/fitkneefrequency.h #property svn:executable
   + *
** branches/work/kst/portto4/kst/src/plugins/fits/kneefrequency/fitkneefrequencyconfig.ui #property svn:executable
   + *
** branches/work/kst/portto4/kst/src/plugins/fits/kneefrequency/kneefrequency.pro #property svn:executable
   + *
** branches/work/kst/portto4/kst/src/plugins/fits/kneefrequency/kstplugin_fits_kneefrequency.desktop #property svn:executable
   + *


More information about the Kst mailing list