[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Wed Nov 14 02:59:02 CET 2007
SVN commit 736370 by netterfield:
-Add first glimps of dialog defaults.
-The vector dialog was not filling all of its fields when editing a
vector.
-vectordefaults is going to go away. Remove the include.
A libkst/dialogdefaults.h [License: GPL (v2+)]
M +4 -0 libkstapp/application.cpp
M +6 -2 libkstapp/vectordialog.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/application.cpp #736369:736370
@@ -22,6 +22,7 @@
#include "datacollection.h"
#include "dialoglaunchergui.h"
#include "datasource.h"
+#include "dialogdefaults.h"
namespace Kst {
@@ -42,6 +43,9 @@
QSettings *settingsObject = new QSettings("kstdatarc", QSettings::IniFormat);
DataSource::setupOnStartup(settingsObject);
+ // Initialize the dialogDefaults settings
+ Kst::dialogDefaults = new QSettings("kstdialogrc", QSettings::NativeFormat);
+
_mainWindow = new MainWindow;
//Replace the data singleton with one that actually works
--- branches/work/kst/portto4/kst/src/libkstapp/vectordialog.cpp #736369:736370
@@ -8,7 +8,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
-
+#include <stdio.h>
#include "vectordialog.h"
#include "dialogpage.h"
@@ -22,7 +22,8 @@
#include "document.h"
#include "objectstore.h"
-#include "vectordefaults.h"
+#include "dialogdefaults.h"
+//#include "vectordefaults.h"
#include <QDir>
@@ -251,11 +252,14 @@
void VectorDialog::configureTab(ObjectPtr vector) {
+ printf("in configureTab\n");
if (DataVectorPtr dataVector = kst_cast<DataVector>(vector)) {
_vectorTab->setVectorMode(VectorTab::DataVector);
_vectorTab->setFile(dataVector->dataSource()->fileName());
_vectorTab->setDataSource(dataVector->dataSource());
_vectorTab->setField(dataVector->field());
+ _vectorTab->dataRange()->setRange(dataVector->numFrames());
+ _vectorTab->dataRange()->setStart(dataVector->startFrame());
_vectorTab->dataRange()->setCountFromEnd(dataVector->countFromEOF());
_vectorTab->dataRange()->setReadToEnd(dataVector->readToEOF());
_vectorTab->dataRange()->setSkip(dataVector->skip());
More information about the Kst
mailing list