[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Wed Nov 19 04:15:58 CET 2008
SVN commit 886370 by netterfield:
-dialogDefaults for x axis field in data wizard.
-fix watcher for dirfiles (but now requires getdata 0.4.2 or better)
M +3 -1 datasources/dirfilesource/README
M +1 -10 datasources/dirfilesource/dirfilesource.cpp
M +11 -0 libkstapp/datawizard.cpp
M +1 -0 widgets/dialogdefaults.h
--- branches/work/kst/portto4/kst/src/datasources/dirfilesource/README #886369:886370
@@ -1,5 +1,7 @@
-Kst Data source for reading dirfiles using the getdata library.
+Kst Data source for reading dirfiles using the getdata library
Get and install getdata from http://getdata.sourceforge.net/
or this datasource won't build.
+Requires version 0.4.2 or better.
+
--- branches/work/kst/portto4/kst/src/datasources/dirfilesource/dirfilesource.cpp #886369:886370
@@ -64,18 +64,9 @@
init();
update();
- // In testing using the automatic creator provided by Barth, the FileSystemWatcher is not properly picking up
- // modifications to files in the directory. Temporarily, it's going to check one of the files for updates.
QFileSystemWatcher *watcher = new QFileSystemWatcher();
- // Proper way. See above
- // watcher->addPath(_directoryName);
-
- // Alternate method.
- // FIXME: this breaks for some dirfiles.
- // The truly proper plan is to put a watcher on the reference field
- // whose name getdata needs to provide.
if (_fieldList.count() > 1) {
- QString filePath = _directoryName + "/" + _fieldList[1];
+ QString filePath = _dirfile->ReferenceFilename();
watcher->addPath(filePath);
}
--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #886369:886370
@@ -444,6 +444,16 @@
_xVector->clear();
_xVector->addItems(((DataWizard*)wizard())->dataSourceFieldList());
_pageValid = validOptions();
+
+ int x_index = _xVector->findText(_dialogDefaults->value("curve/xvectorfield","INDEX").toString());
+ if (x_index<0) {
+ x_index = _xVector->findText("INDEX");
+ }
+ if (x_index<0) {
+ x_index = 0;
+ }
+ _xVector->setCurrentIndex(x_index);
+
emit completeChanged();
}
@@ -618,6 +628,7 @@
const QString field = _pageDataPresentation->vectorField();
+ _dialogDefaults->setValue("curve/xvectorfield",field);
Q_ASSERT(_document && _document->objectStore());
DataVectorPtr dxv = _document->objectStore()->createObject<DataVector>();
--- branches/work/kst/portto4/kst/src/widgets/dialogdefaults.h #886369:886370
@@ -64,3 +64,4 @@
// spectrum/output int FFToptions
// spectrum/interpolateHoles bool FFToptions
+// curve/xvectorfield QString datawizard, curvedialog
More information about the Kst
mailing list