Bug 142700

Summary: Cross power spectrum plugin has useless default values
Product: [Applications] kst Reporter: Andrew Walker <arwalker>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: use kst defaults for fft options

Description Andrew Walker 2007-03-08 20:48:53 UTC
Version:           HEAD (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM:

When using the cross power spectrum plugin the default values for FFT Length and Sample Rate are both 0

STEPS TO REPRODUCE:

Start Kst
Create two curves
Select the Cross Power Spectrum plugin

RESULTS:

The default values for FFT Length and Sample Rate are both zero

EXPECTED RESULTS;

The default values for FFT Length and Sample Rate should at least make numerical sense
Comment 1 Netterfield 2007-03-08 21:14:20 UTC
I think we should remove this from the build for 1.4.0, and work on it for 
1.4.1.  I think there may also be numerical errors.

On Thursday 08 March 2007 2:48:54 pm Andrew Walker wrote:
[bugs.kde.org quoted mail]
Comment 2 Andrew Walker 2007-03-08 21:31:33 UTC
The LFI group expressed a request for exactly this plugin so it would be better to work out the bugs for this build.
Comment 3 Netterfield 2007-03-16 18:59:27 UTC
Created attachment 20001 [details]
use kst defaults for fft options
Comment 4 George Staikos 2007-03-16 19:05:11 UTC
Looks good to me.

--
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/
Comment 5 Netterfield 2007-03-16 19:24:38 UTC
SVN commit 643256 by netterfield:

BUG: 142700
Use kst defaults... reviewed by George.



 M  +4 -0      crossspectrumdialog_i.cpp  


--- trunk/extragear/graphics/kst/src/plugins/crossspectrum/crossspectrumdialog_i.cpp #643255:643256
@@ -48,6 +48,7 @@
 #include <vectorselector.h>
 #include <kstdefaultnames.h>
 #include <kstdataobjectcollection.h>
+#include <kstobjectdefaults.h>
 
 const QString& CrossSpectrumDialogI::defaultTag = KGlobal::staticQString("<Auto Name>");
 
@@ -268,6 +269,9 @@
   _tagName->setText(defaultTag);
   _legendText->setText(defaultTag);
 
+  _w->_fft->_scalar->setCurrentText(QString::number(KST::objectDefaults.fftLen()));
+  _w->_sample->_scalar->setCurrentText(QString::number(KST::objectDefaults.psdFreq()));
+
   adjustSize();
   resize(minimumSizeHint());
   setFixedHeight(height());