本文整理汇总了C++中KstRMatrixPtr::change方法的典型用法代码示例。如果您正苦于以下问题:C++ KstRMatrixPtr::change方法的具体用法?C++ KstRMatrixPtr::change怎么用?C++ KstRMatrixPtr::change使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstRMatrixPtr
的用法示例。
在下文中一共展示了KstRMatrixPtr::change方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: editSingleRMatrix
//.........这里部分代码省略.........
int yNumSteps;
int skip;
if (_fileNameDirty) {
KstDataSourceList::iterator it;
//
// if there is not an active KstFile, create one...
//
KST::dataSourceList.lock().writeLock();
// xxx it = KST::dataSourceList.findReusableFileName(_w->_fileName->url());
if (it == KST::dataSourceList.end()) {
// xxx file = KstDataSource::loadSource(_w->_fileName->url());
if (!file || !file->isValid()) {
KST::dataSourceList.lock().unlock();
QMessageBox::warning(this, QObject::tr("Kst"), QObject::tr("The file could not be opened."));
return false;
}
if (file->isEmpty()) {
KST::dataSourceList.lock().unlock();
QMessageBox::warning(this, QObject::tr("Kst"), QObject::tr("The file does not contain data."));
return false;
}
KST::dataSourceList.append(file);
} else {
file = *it;
}
KST::dataSourceList.lock().unlock();
pField = _w->_field->currentText();
if (!file->isValidMatrix(pField)) {
QMessageBox::warning(this, QObject::tr("Kst"), QObject::tr("The requested field is not defined for the requested file."));
file->unlock();
return false;
}
} else {
rmp->readLock();
file = rmp->dataSource();
pField = rmp->field();
rmp->unlock();
}
rmp->readLock();
if (_xStartDirty || _xStartCountFromEndDirty) {
xStart = _w->_xStartCountFromEnd->isChecked() ? -1 : _w->_xStart->value();
} else {
xStart = rmp->reqXStart();
}
if (_yStartDirty || _yStartCountFromEndDirty) {
yStart = _w->_yStartCountFromEnd->isChecked() ? -1 : _w->_yStart->value();
} else {
yStart = rmp->reqYStart();
}
if (_xNumStepsDirty || _xNumStepsReadToEndDirty) {
xNumSteps = _w->_xNumStepsReadToEnd->isChecked() ? -1 : _w->_xNumSteps->value();
} else {
xNumSteps = rmp->reqXNumSteps();
}
if (_yNumStepsDirty || _yNumStepsReadToEndDirty) {
yNumSteps = _w->_yNumStepsReadToEnd->isChecked() ? -1 : _w->_yNumSteps->value();
} else {
yNumSteps = rmp->reqYNumSteps();
}
if (_doSkipDirty) {
doSkip = _w->_doSkip->isChecked();
} else {
doSkip = rmp->doSkip();
}
if (_doAveDirty) {
doAve = _w->_doAve->isChecked();
} else {
doAve = rmp->doAverage();
}
if (_skipDirty) {
skip = _w->_skip->value();
} else {
skip = rmp->skip();
}
rmp->unlock();
rmp->writeLock();
rmp->change(file, pField, KstObjectTag(rmp->tag().tag(), rmp->tag().context()), xStart, yStart, xNumSteps, yNumSteps, doAve, doSkip, skip);
rmp->unlock();
return true;
}