~ubuntu-branches/ubuntu/karmic/kst/karmic

« back to all changes in this revision

Viewing changes to kst/kst/ksteqdialog_i.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-06-30 19:11:30 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060630191130-acumuar75bz4puty
Tags: 1.2.1-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
// include files for Qt
20
20
#include <qcheckbox.h>
 
21
#include <qlistbox.h>
21
22
#include <qradiobutton.h>
22
23
#include <qregexp.h>
23
24
#include <qspinbox.h>
 
25
#include <qvbox.h>
24
26
 
25
27
// include files for KDE
26
28
#include <kcombobox.h>
27
 
#include <kdebug.h>
 
29
#include "ksdebug.h"
28
30
#include <kmessagebox.h>
29
31
 
30
32
// application specific includes
31
33
#include "curveappearancewidget.h"
32
34
#include "curveplacementwidget.h"
 
35
#include "editmultiplewidget.h"
 
36
#include "eqdialogwidget.h"
33
37
#include "eparse-eh.h"
 
38
#include "kst2dplot.h"
34
39
#include "kstdefaultnames.h"
35
40
#include "ksteqdialog_i.h"
36
41
#include "kstuinames.h"
39
44
#include "scalarselector.h"
40
45
#include "vectorselector.h"
41
46
 
42
 
#define DIALOGTYPE KstEqDialogI
43
 
#define DTYPE "Equation"
44
 
#include "dataobjectdialog.h"
45
 
 
46
47
const QString& KstEqDialogI::defaultTag = KGlobal::staticQString("<Auto Name>");
47
48
 
48
49
QGuardedPtr<KstEqDialogI> KstEqDialogI::_inst;
56
57
 
57
58
 
58
59
KstEqDialogI::KstEqDialogI(QWidget* parent, const char* name, bool modal, WFlags fl)
59
 
: KstEqDialog(parent, name, modal, fl) {
60
 
  Init();
61
 
 
62
 
  connect(_vectors, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified()));
63
 
  connect(_xVectors, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified()));
64
 
  connect(_scalars, SIGNAL(newScalarCreated()), this, SIGNAL(modified()));
 
60
: KstDataDialog(parent, name, modal, fl) {
 
61
  _w = new EqDialogWidget(_contents);
 
62
  setMultiple(true);
 
63
  connect(_w->_vectors, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified()));
 
64
  connect(_w->_xVectors, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified()));
 
65
  connect(_w->_scalars, SIGNAL(newScalarCreated()), this, SIGNAL(modified()));
 
66
  
 
67
  // for edit multiple mode
 
68
  connect(_w->_doInterpolation, SIGNAL(clicked()), this, SLOT(setDoInterpolationDirty()));
65
69
  populateFunctionList();
66
70
}
67
71
 
68
72
 
69
73
KstEqDialogI::~KstEqDialogI() {
70
 
  DP = 0L;
71
 
}
72
 
 
73
 
 
74
 
KstEquationPtr KstEqDialogI::_getPtr(const QString& tagin) {
75
 
  KstEquationList c = kstObjectSubList<KstDataObject, KstEquation>(KST::dataObjectList);
76
 
  return *c.findTag(tagin);
77
74
}
78
75
 
79
76
 
80
77
void KstEqDialogI::updateWindow() {
81
 
  _curvePlacement->update();
 
78
  _w->_curvePlacement->update();
82
79
}
83
80
 
84
81
 
85
 
void KstEqDialogI::_fillFieldsForEdit() {
86
 
  if (DP == 0L) {
 
82
void KstEqDialogI::fillFieldsForEdit() {
 
83
  KstEquationPtr ep = kst_cast<KstEquation>(_dp);
 
84
  if (!ep) {
87
85
    return; // shouldn't be needed
88
86
  }
89
87
 
90
 
  DP->readLock();
91
 
  _tagName->setText(DP->tagName());
92
 
 
93
 
  Equation->setText(DP->equation());
94
 
 
95
 
  DoInterpolation->setChecked(DP->doInterp());
96
 
  if (DP->vX()) {
97
 
    _xVectors->setSelection(DP->vX()->tagName());
 
88
  ep->readLock();
 
89
  _tagName->setText(ep->tagName());
 
90
  _w->_equation->setText(ep->equation());
 
91
 
 
92
  _w->_doInterpolation->setChecked(ep->doInterp());
 
93
  if (ep->vX()) {
 
94
    _w->_xVectors->setSelection(ep->vX()->tagName());
98
95
  }
99
96
 
100
 
  DP->readUnlock();
101
 
 
102
 
  _curveAppearance->hide();
103
 
  _curvePlacement->hide();
104
 
 
 
97
  ep->readUnlock();
 
98
 
 
99
  _w->_curveAppearance->hide();
 
100
  _w->_curvePlacement->hide();
 
101
  _legendText->hide();
 
102
  _legendLabel->hide();
 
103
  
105
104
  adjustSize();
106
105
  resize(minimumSizeHint());
107
106
  setFixedHeight(height());
108
107
}
109
108
 
110
109
 
111
 
void KstEqDialogI::_fillFieldsForNew() {
 
110
void KstEqDialogI::fillFieldsForNew() {
112
111
  KstEquationList eqs = kstObjectSubList<KstDataObject, KstEquation>(KST::dataObjectList);
113
112
 
114
113
  /* set tag name */
115
114
  _tagName->setText(defaultTag);
 
115
  _legendText->setText(defaultTag);
 
116
  _legendText->show();
 
117
  _legendLabel->show();
116
118
 
117
119
  /* set the curve placement window  */
118
 
  _curvePlacement->update();
 
120
  _w->_curvePlacement->update();
119
121
 
120
 
  Equation->clear();
 
122
  _w->_equation->clear();
121
123
 
122
124
  //for some reason the lower widget needs to be shown first to prevent overlapping?
123
 
  _curveAppearance->hide();
124
 
  _curvePlacement->show();
125
 
  _curveAppearance->show();
126
 
  _curveAppearance->reset();
127
 
 
 
125
  _w->_curveAppearance->hide();
 
126
  _w->_curvePlacement->show();
 
127
  _w->_curveAppearance->show();
 
128
  _w->_curveAppearance->reset();
128
129
  adjustSize();
129
130
  resize(minimumSizeHint());
130
131
  setFixedHeight(height());
132
133
 
133
134
 
134
135
void KstEqDialogI::update() {
135
 
  _curvePlacement->update();
136
 
  _vectors->update();
137
 
  _xVectors->update();
138
 
  _scalars->update();
 
136
  _w->_curvePlacement->update();
 
137
  _w->_vectors->update();
 
138
  _w->_xVectors->update();
 
139
  _w->_scalars->update();
139
140
}
140
141
 
141
142
 
142
 
bool KstEqDialogI::new_I() {
143
 
  KstEquationPtr eq;
144
 
 
 
143
bool KstEqDialogI::newObject() {
145
144
  QString tag_name = _tagName->text();
146
 
  QString etext = Equation->text();
 
145
  QString etext = _w->_equation->text();
147
146
  etext.remove(QRegExp("[^a-zA-Z0-9\\(\\)\\+\\-\\*/\\%\\^\\|\\&\\!<>=_]"));
148
147
  if (etext.length() > 12) {
149
148
    etext.truncate(12);
150
149
    etext += "...";
151
150
  }
152
151
 
153
 
  if (tag_name==defaultTag) {
 
152
  if (tag_name == defaultTag) {
154
153
    tag_name = KST::suggestEQName(etext);
155
154
  }
156
155
 
157
156
  /* verify that the curve name is unique */
158
 
  if (KST::dataTagNameNotUnique(tag_name)) {
 
157
  if (KstData::self()->dataTagNameNotUnique(tag_name)) {
159
158
    _tagName->setFocus();
160
159
    return false;
161
160
  }
162
161
 
163
 
  if (!_checkEntries()) {
 
162
  if (!checkEntries()) {
164
163
    return false;
165
164
  }
166
165
 
167
166
  KST::vectorList.lock().readLock();
168
167
  /* find *V */
169
 
  KstVectorList::Iterator i = KST::vectorList.findTag(_xVectors->selectedVector());
170
 
  if (i == KST::vectorList.end()) {
171
 
    kdFatal() << "Bug in kst: the Vector field in plotDialog (Eq) "
172
 
              << "refers to a non-existent vector..." << endl;
 
168
  KstVectorPtr vp = *KST::vectorList.findTag(_w->_xVectors->selectedVector());
 
169
  if (!vp) {
 
170
    kstdFatal() << "Bug in kst: the Vector field in plotDialog (Eq) "
 
171
                << "refers to a non-existent vector..." << endl;
173
172
  }
174
173
  KST::vectorList.lock().readUnlock();
175
174
 
176
175
  /** Create the equation here */
177
 
  eq = new KstEquation(tag_name, Equation->text(), *i, DoInterpolation->isChecked());
 
176
  vp->readLock();
 
177
  KstEquationPtr eq = new KstEquation(tag_name, _w->_equation->text(), vp, _w->_doInterpolation->isChecked());
 
178
  vp->readUnlock();
178
179
 
179
180
  if (!eq->isValid()) {
180
181
    eq = 0L;
184
185
      parseErrors += "\n";
185
186
    }
186
187
 
187
 
    KMessageBox::detailedSorry(this, i18n("There is an error in the equation you entered.  Please fix it."), parseErrors);
 
188
    KMessageBox::detailedSorry(this, i18n("There is an error in the equation you entered."), parseErrors);
188
189
    return false;
189
190
  }
190
191
 
191
 
  KstVCurvePtr vc = new KstVCurve(KST::suggestCurveName(tag_name, true), eq->vX(), eq->vY(), 0L, 0L, 0L, 0L, _curveAppearance->color());
192
 
  vc->setHasPoints(_curveAppearance->showPoints());
193
 
  vc->setHasLines(_curveAppearance->showLines());
194
 
  vc->setHasBars(_curveAppearance->showBars());
195
 
  vc->setLineWidth(_curveAppearance->lineWidth());
196
 
  vc->setLineStyle(_curveAppearance->lineStyle());
197
 
  vc->Point.setType(_curveAppearance->pointType());
198
 
  vc->setBarStyle(_curveAppearance->barStyle());
 
192
  KstVCurvePtr vc = new KstVCurve(KST::suggestCurveName(tag_name, true), eq->vX(), eq->vY(), 0L, 0L, 0L, 0L, _w->_curveAppearance->color());
 
193
  vc->setHasPoints(_w->_curveAppearance->showPoints());
 
194
  vc->setHasLines(_w->_curveAppearance->showLines());
 
195
  vc->setHasBars(_w->_curveAppearance->showBars());
 
196
  vc->setLineWidth(_w->_curveAppearance->lineWidth());
 
197
  vc->setLineStyle(_w->_curveAppearance->lineStyle());
 
198
  vc->Point.setType(_w->_curveAppearance->pointType());
 
199
  vc->setPointDensity(_w->_curveAppearance->pointDensity());
 
200
  vc->setBarStyle(_w->_curveAppearance->barStyle());
 
201
  
 
202
  QString legend_text = _legendText->text();
 
203
  if (legend_text == defaultTag) {
 
204
    vc->setLegendText(QString(""));
 
205
  } else {
 
206
    vc->setLegendText(legend_text);
 
207
  }
199
208
 
200
 
  KstViewWindow *w = dynamic_cast<KstViewWindow*>(KstApp::inst()->findWindow(_curvePlacement->_plotWindow->currentText()));
 
209
  KstViewWindow *w = dynamic_cast<KstViewWindow*>(KstApp::inst()->findWindow(_w->_curvePlacement->_plotWindow->currentText()));
201
210
  if (!w) {
202
211
    QString n = KstApp::inst()->newWindow(KST::suggestWinName());
203
212
    w = dynamic_cast<KstViewWindow*>(KstApp::inst()->findWindow(n));
205
214
 
206
215
  if (w) {
207
216
    Kst2DPlotPtr plot;
208
 
    if (_curvePlacement->existingPlot()) {
 
217
    if (_w->_curvePlacement->existingPlot()) {
209
218
      /* assign curve to plot */
210
 
      plot = kst_cast<Kst2DPlot>(w->view()->findChild(_curvePlacement->plotName()));
 
219
      plot = kst_cast<Kst2DPlot>(w->view()->findChild(_w->_curvePlacement->plotName()));
211
220
      if (plot) {
212
221
        plot->addCurve(vc.data());
213
222
      }
214
223
    }
215
224
 
216
 
    if (_curvePlacement->newPlot()) {
 
225
    if (_w->_curvePlacement->newPlot()) {
217
226
      /* assign curve to plot */
218
227
      QString name = w->createPlot<Kst2DPlot>(KST::suggestPlotName());
219
 
      if (_curvePlacement->reGrid()) {
220
 
        w->view()->cleanup(_curvePlacement->columns());
 
228
      if (_w->_curvePlacement->reGrid()) {
 
229
        w->view()->cleanup(_w->_curvePlacement->columns());
221
230
      }
222
231
      plot = kst_cast<Kst2DPlot>(w->view()->findChild(name));
223
232
      if (plot) {
224
 
        _curvePlacement->update();
225
 
        _curvePlacement->setCurrentPlot(plot->tagName());
 
233
        _w->_curvePlacement->update();
 
234
        _w->_curvePlacement->setCurrentPlot(plot->tagName());
226
235
        plot->addCurve(vc.data());
227
 
        plot->GenerateDefaultLabels();
 
236
        plot->generateDefaultLabels();
228
237
      }
229
238
    }
230
239
  }
241
250
}
242
251
 
243
252
 
244
 
bool KstEqDialogI::_checkEntries() {
245
 
  if (_xVectors->selectedVector().isEmpty()) {
 
253
bool KstEqDialogI::checkEntries() {
 
254
  if (_w->_xVectors->selectedVector().isEmpty() && !_editMultipleMode) {
246
255
    KMessageBox::sorry(this, i18n("An X vector must be defined first."));
247
256
    return false;
248
257
  }
250
259
}
251
260
 
252
261
 
253
 
bool KstEqDialogI::edit_I() {
254
 
  /* verify that the curve name is unique */
255
 
  DP->writeLock();
256
 
  if (_tagName->text() != DP->tagName()) {
257
 
    if (KST::dataTagNameNotUnique(_tagName->text())) {
258
 
      DP->writeUnlock();
259
 
      return false;
 
262
bool KstEqDialogI::editSingleObject(KstEquationPtr eqPtr) {
 
263
  eqPtr->writeLock();
 
264
  if (!checkEntries()) {
 
265
    eqPtr->writeUnlock();
 
266
    return false;
 
267
  }
 
268
 
 
269
  // update the vector only if it is dirty 
 
270
  KstVectorPtr vp;
 
271
  if (_xVectorsDirty) {
 
272
    KST::vectorList.lock().readLock();
 
273
    /* find *V */
 
274
    KstVectorList::Iterator i = KST::vectorList.findTag(_w->_xVectors->selectedVector());
 
275
    if (i == KST::vectorList.end()) {
 
276
      kstdFatal() << "Bug in kst: the Vector field in plotDialog (Eq) "
 
277
                  << "refers to a non existant vector..." << endl;
260
278
    }
261
 
  }
262
 
 
263
 
  DP->setTagName(_tagName->text());
264
 
  if (!_checkEntries()) {
265
 
    DP->writeUnlock();
266
 
    return false;
267
 
  }
268
 
 
269
 
  KST::vectorList.lock().readLock();
270
 
  /* find *V */
271
 
  KstVectorList::Iterator i =
272
 
    KST::vectorList.findTag(_xVectors->selectedVector());
273
 
  if (i == KST::vectorList.end()) {
274
 
    kdFatal() << "Bug in kst: the Vector field in plotDialog (Eq) "
275
 
              << "refers to a non existant vector..." << endl;
276
 
  }
277
 
 
278
 
  KstVectorPtr vp = *i;
 
279
    vp = *i;
 
280
  } else {
 
281
    vp = eqPtr->vX();
 
282
  }
279
283
  KST::vectorList.lock().readUnlock();
280
 
 
281
 
  DP->setExistingXVector(vp, DoInterpolation->isChecked());
282
 
 
283
 
  DP->setEquation(Equation->text());
284
 
  if (!DP->isValid()) {
285
 
    QString parseErrors;
286
 
    for (QStringList::ConstIterator i = Equation::errorStack.begin(); i != Equation::errorStack.end(); ++i) {
287
 
      parseErrors += *i;
288
 
      parseErrors += "\n";
289
 
    }
290
 
 
291
 
    KMessageBox::detailedSorry(this, i18n("There is an error in the equation you entered.  Please fix it."), parseErrors);
292
 
    DP->writeUnlock();
293
 
    return false;
294
 
  }
295
 
  DP->writeUnlock();
296
 
 
 
284
  
 
285
  // update the DoInterpolation only if it is dirty
 
286
  if (_doInterpolationDirty) {
 
287
    eqPtr->setExistingXVector(vp, _w->_doInterpolation->isChecked());
 
288
  } else {
 
289
    eqPtr->setExistingXVector(vp, eqPtr->doInterp());
 
290
  }
 
291
  
 
292
  if (_equationDirty) {
 
293
    eqPtr->setEquation(_w->_equation->text());
 
294
    if (!eqPtr->isValid()) {
 
295
      QString parseErrors;
 
296
      for (QStringList::ConstIterator i = Equation::errorStack.begin(); i != Equation::errorStack.end(); ++i) {
 
297
        parseErrors += *i;
 
298
        parseErrors += "\n";
 
299
      }
 
300
      KMessageBox::detailedSorry(this, i18n("There is an error in the equation you entered."), parseErrors);
 
301
      eqPtr->writeUnlock();
 
302
      return false;
 
303
    }
 
304
  }
 
305
  eqPtr->writeUnlock();
 
306
  return true;
 
307
}
 
308
 
 
309
 
 
310
bool KstEqDialogI::editObject() {
 
311
  KstEquationList eqList = kstObjectSubList<KstDataObject,KstEquation>(KST::dataObjectList);
 
312
  
 
313
  // if editing multiple objects, edit each one
 
314
  if (_editMultipleMode) { 
 
315
    // if the user selected no vector, treat it as non-dirty
 
316
    _xVectorsDirty = _w->_xVectors->_vector->currentItem() != 0;
 
317
    _equationDirty = !_w->_equation->text().isEmpty();
 
318
  
 
319
    bool didEdit = false;
 
320
    for (uint i = 0; i < _editMultipleWidget->_objectList->count(); i++) {
 
321
      if (_editMultipleWidget->_objectList->isSelected(i)) {
 
322
        // get the pointer to the object
 
323
        KstEquationList::Iterator eqIter = eqList.findTag(_editMultipleWidget->_objectList->text(i));
 
324
        if (eqIter == eqList.end()) {
 
325
          return false;
 
326
        }
 
327
          
 
328
        KstEquationPtr eqPtr = *eqIter;
 
329
        if (!editSingleObject(eqPtr)) {
 
330
          return false;
 
331
        }
 
332
        didEdit = true;
 
333
      }
 
334
    } 
 
335
    if (!didEdit) {
 
336
      KMessageBox::sorry(this, i18n("Select one or more objects to edit."));
 
337
      return false;  
 
338
    }
 
339
  } else {
 
340
    // verify that the curve name is unique
 
341
    QString tag_name = _tagName->text();
 
342
    KstEquationPtr ep = kst_cast<KstEquation>(_dp);
 
343
    if (!ep || tag_name != ep->tagName() && KstData::self()->dataTagNameNotUnique(tag_name)) {
 
344
      _tagName->setFocus();
 
345
      return false;
 
346
    }
 
347
    
 
348
    ep->writeLock();
 
349
    ep->setTagName(tag_name);
 
350
    ep->writeUnlock();
 
351
    
 
352
    // then edit the object
 
353
    _equationDirty = true;
 
354
    _xVectorsDirty = true;
 
355
    _doInterpolationDirty = true;
 
356
    if (!editSingleObject(ep)) {
 
357
      return false;
 
358
    }
 
359
  }
297
360
  emit modified();
298
 
 
299
361
  return true;
300
362
}
301
363
 
302
364
 
303
365
void KstEqDialogI::populateFunctionList() {
304
 
  Operators->clear();
305
 
  Operators->insertItem("+");
306
 
  Operators->insertItem("-");
307
 
  Operators->insertItem("*");
308
 
  Operators->insertItem("/");
309
 
  Operators->insertItem("%");
310
 
  Operators->insertItem("^");
311
 
  Operators->insertItem("&");
312
 
  Operators->insertItem("|");
313
 
  Operators->insertItem("&&");
314
 
  Operators->insertItem("||");
315
 
  Operators->insertItem("!");
316
 
  Operators->insertItem("<");
317
 
  Operators->insertItem("<=");
318
 
  Operators->insertItem("==");
319
 
  Operators->insertItem(">=");
320
 
  Operators->insertItem(">");
321
 
  Operators->insertItem("!=");
322
 
  Operators->insertItem("PI");
323
 
  Operators->insertItem("e");
324
 
  Operators->insertItem("STEP()");
325
 
  Operators->insertItem("ABS()");
326
 
  Operators->insertItem("SQRT()");
327
 
  Operators->insertItem("CBRT()");
328
 
  Operators->insertItem("SIN()");
329
 
  Operators->insertItem("COS()");
330
 
  Operators->insertItem("TAN()");
331
 
  Operators->insertItem("ASIN()");
332
 
  Operators->insertItem("ACOS()");
333
 
  Operators->insertItem("ATAN()");
334
 
  Operators->insertItem("SEC()");
335
 
  Operators->insertItem("CSC()");
336
 
  Operators->insertItem("COT()");
337
 
  Operators->insertItem("SINH()");
338
 
  Operators->insertItem("COSH()");
339
 
  Operators->insertItem("TANH()");
340
 
  Operators->insertItem("EXP()");
341
 
  Operators->insertItem("LN()");
342
 
  Operators->insertItem("LOG()");
343
 
  Operators->insertItem("PLUGIN()");
 
366
  _w->Operators->clear();
 
367
  _w->Operators->insertItem("+");
 
368
  _w->Operators->insertItem("-");
 
369
  _w->Operators->insertItem("*");
 
370
  _w->Operators->insertItem("/");
 
371
  _w->Operators->insertItem("%");
 
372
  _w->Operators->insertItem("^");
 
373
  _w->Operators->insertItem("&");
 
374
  _w->Operators->insertItem("|");
 
375
  _w->Operators->insertItem("&&");
 
376
  _w->Operators->insertItem("||");
 
377
  _w->Operators->insertItem("!");
 
378
  _w->Operators->insertItem("<");
 
379
  _w->Operators->insertItem("<=");
 
380
  _w->Operators->insertItem("==");
 
381
  _w->Operators->insertItem(">=");
 
382
  _w->Operators->insertItem(">");
 
383
  _w->Operators->insertItem("!=");
 
384
  _w->Operators->insertItem("PI");
 
385
  _w->Operators->insertItem("e");
 
386
  _w->Operators->insertItem("STEP()");
 
387
  _w->Operators->insertItem("ABS()");
 
388
  _w->Operators->insertItem("SQRT()");
 
389
  _w->Operators->insertItem("CBRT()");
 
390
  _w->Operators->insertItem("SIN()");
 
391
  _w->Operators->insertItem("COS()");
 
392
  _w->Operators->insertItem("TAN()");
 
393
  _w->Operators->insertItem("ASIN()");
 
394
  _w->Operators->insertItem("ACOS()");
 
395
  _w->Operators->insertItem("ATAN()");
 
396
  _w->Operators->insertItem("SEC()");
 
397
  _w->Operators->insertItem("CSC()");
 
398
  _w->Operators->insertItem("COT()");
 
399
  _w->Operators->insertItem("SINH()");
 
400
  _w->Operators->insertItem("COSH()");
 
401
  _w->Operators->insertItem("TANH()");
 
402
  _w->Operators->insertItem("EXP()");
 
403
  _w->Operators->insertItem("LN()");
 
404
  _w->Operators->insertItem("LOG()");
 
405
  _w->Operators->insertItem("PLUGIN()");
 
406
}
 
407
 
 
408
 
 
409
void KstEqDialogI::populateEditMultiple() {
 
410
  // list of objects
 
411
  KstEquationList eqlist = kstObjectSubList<KstDataObject,KstEquation>(KST::dataObjectList);
 
412
  _editMultipleWidget->_objectList->insertStringList(eqlist.tagNames());
 
413
 
 
414
  // also intermediate state for multiple edit
 
415
  _w->_xVectors->_vector->insertItem("", 0);
 
416
  _w->_xVectors->_vector->setCurrentItem(0);
 
417
  _w->_doInterpolation->setTristate(true);
 
418
  _w->_doInterpolation->setNoChange();
 
419
  _w->_equation->setText("");
 
420
  
 
421
  // and clean all the fields
 
422
  _equationDirty = false;
 
423
  _xVectorsDirty = false;
 
424
  _doInterpolationDirty = false;
 
425
}
 
426
 
 
427
 
 
428
void KstEqDialogI::setDoInterpolationDirty() {
 
429
  _w->_doInterpolation->setTristate(false); 
 
430
  _doInterpolationDirty = true;
344
431
}
345
432
 
346
433
#include "ksteqdialog_i.moc"