Beispiel #1
0
void KstImageDialogI::fillFieldsForEditNoUpdate() {
  KstImagePtr ip = kst_cast<KstImage>(_dp);
  if (!ip) {
    return; // shouldn't be needed
  }

  KstImageList images = kstObjectSubList<KstDataObject, KstImage>(KST::dataObjectList);

  ip->readLock();
  // fill in the tag name
  _tagName->setText(ip->tagName());

  // fill in the other parameters
  _w->_lowerZ->setText(QString::number(ip->lowerThreshold()));
  _w->_upperZ->setText(QString::number(ip->upperThreshold()));
  _w->_realTimeAutoThreshold->setChecked(ip->autoThreshold());

  _w->_colorPalette->refresh(ip->paletteName());
  _w->_numContourLines->setValue(ip->numContourLines());
  _w->_contourColor->setColor(ip->contourColor());
  int tempWeight = ip->contourWeight();
  _w->_useVariableWeight->setChecked(tempWeight == -1);
  if (tempWeight >= 0) {
    _w->_contourWeight->setValue(tempWeight);
  }

  ip->unlock();

  //don't place the image in edits
  _w->_curvePlacement->hide();

  updateEnables();
}