[Kst] extragear/graphics/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Mon Jul 18 23:00:20 CEST 2005
SVN commit 436009 by rchern:
Some matrix defaults
M +1 -0 Makefile.am
M +3 -0 kst.cpp
M +2 -0 kstdoc.cpp
A kstmatrixdefaults.cpp [License: GPL (v2+)]
A kstmatrixdefaults.h [License: GPL (v2+)]
M +16 -11 kstmatrixdialog_i.cpp
--- trunk/extragear/graphics/kst/kst/Makefile.am #436008:436009
@@ -42,6 +42,7 @@
kstvcurve.cpp \
kstimage.cpp \
kstvectordefaults.cpp \
+ kstmatrixdefaults.cpp \
kstgraphicdefaults.cpp \
kstdefaultnames.cpp \
ksthistogram.cpp \
--- trunk/extragear/graphics/kst/kst/kst.cpp #436008:436009
@@ -63,6 +63,7 @@
#include "kstimagedialog_i.h"
#include "kstlabeldialog_i.h"
#include "kstmatrixdialog_i.h"
+#include "kstmatrixdefaults.h"
#include "kstmonochromedialog_i.h"
#include "kstplotdialog_i.h"
#include "kstplugindialog_i.h"
@@ -962,6 +963,7 @@
config->writeEntry("MDIMode", (int)mdiMode());
KST::vectorDefaults.writeConfig(config);
+ KST::matrixDefaults.writeConfig(config);
config->sync();
}
@@ -973,6 +975,7 @@
int mdiMode = config->readNumEntry("MDIMode", (int)KMdi::TabPageMode);
KST::vectorDefaults.readConfig(config);
+ KST::matrixDefaults.readConfig(config);
switch (mdiMode) {
case KMdi::ToplevelMode:
--- trunk/extragear/graphics/kst/kst/kstdoc.cpp #436008:436009
@@ -47,6 +47,7 @@
#include "kstgraphfiledialog_i.h"
#include "kstequation.h"
#include "ksthistogram.h"
+#include "kstmatrixdefaults.h"
#include "kstplugin.h"
#include "kstpsd.h"
#include "kstrvector.h"
@@ -673,6 +674,7 @@
void KstDoc::deleteContents() {
KST::vectorDefaults.sync();
+ KST::matrixDefaults.sync();
KstApp *app = KstApp::inst();
if (app) { // Can be null on application exit
--- trunk/extragear/graphics/kst/kst/kstmatrixdialog_i.cpp #436008:436009
@@ -33,6 +33,7 @@
// application specific includes
#include "editmultiplewidget.h"
+#include "kstmatrixdefaults.h"
#include "kstmatrixdialog_i.h"
#include "kstviewwindow.h"
#include "vectorselector.h"
@@ -233,26 +234,30 @@
void KstMatrixDialogI::_fillFieldsForNew() {
- /* set tag name */
+ // set tag name
_tagName->setText("<New_Matrix>");
- //fill some default values for the grid parameters
+ // set defaults using KstMatrixDefaults
+ KST::matrixDefaults.sync();
+ _fileName->setURL(KST::matrixDefaults.dataSource());
_minX->setText("0");
_minY->setText("1");
_xStep->setText("1");
_yStep->setText("1");
- _xStart->setValue(0);
- _yStart->setValue(0);
- _xNumSteps->setValue(1);
- _yNumSteps->setValue(1);
+ _xStart->setValue(KST::matrixDefaults.xStart());
+ _yStart->setValue(KST::matrixDefaults.yStart());
+ _xNumSteps->setValue(KST::matrixDefaults.xNumSteps());
+ _yNumSteps->setValue(KST::matrixDefaults.yNumSteps());
_gradientZAtMin->setText("0");
_gradientZAtMax->setText("100");
- _xStartCountFromEnd->setChecked(false);
- _yStartCountFromEnd->setChecked(false);
- _xNumStepsReadToEnd->setChecked(true);
- _yNumStepsReadToEnd->setChecked(true);
- _doSkip->setChecked(false);
+ _xStartCountFromEnd->setChecked(KST::matrixDefaults.xCountFromEnd());
+ _yStartCountFromEnd->setChecked(KST::matrixDefaults.yCountFromEnd());
+ _xNumStepsReadToEnd->setChecked(KST::matrixDefaults.xReadToEnd());
+ _yNumStepsReadToEnd->setChecked(KST::matrixDefaults.yReadToEnd());
+ _doSkip->setChecked(KST::matrixDefaults.doSkip());
+ _doAve->setChecked(KST::matrixDefaults.doAverage());
+ _skip->setValue(KST::matrixDefaults.skip());
_gradientX->setChecked(true);
_gradientY->setChecked(false);
More information about the Kst
mailing list