本文整理汇总了C++中KstMatrixPtr::setTag方法的典型用法代码示例。如果您正苦于以下问题:C++ KstMatrixPtr::setTag方法的具体用法?C++ KstMatrixPtr::setTag怎么用?C++ KstMatrixPtr::setTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstMatrixPtr
的用法示例。
在下文中一共展示了KstMatrixPtr::setTag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: editObject
bool KstMatrixDialog::editObject() {
//
// if editing multiple objects, edit each one...
//
if (_editMultipleMode) {
// xxx _fileNameDirty = !_w->_fileName->url().isEmpty();
_gradientZAtMinDirty = !_w->_gradientZAtMin->text().isEmpty();
_gradientZAtMaxDirty = !_w->_gradientZAtMax->text().isEmpty();
_minXDirty = !_w->_minX->text().isEmpty();
_minYDirty = !_w->_minY->text().isEmpty();
_yStepDirty = !_w->_yStep->text().isEmpty();
_xStepDirty = !_w->_xStep->text().isEmpty();
_xStartDirty = _w->_xStart->text() != " ";
_yStartDirty = _w->_yStart->text() != " ";
_xNumStepsDirty = _w->_xNumSteps->text() != " ";
_yNumStepsDirty = _w->_yNumSteps->text() != " ";
_skipDirty = _w->_skip->text() != " ";
_nXDirty = _w->_nX->text() != " ";
_nYDirty = _w->_nY->text() != " ";
bool didEdit = false;
int i;
for (i = 0; i < _editMultipleWidget->_objectList->count(); i++) {
if (_editMultipleWidget->_objectList->item(i)->isSelected()) {
KstMatrixPtr mxPtr;
//
// get the pointer to the object...
//
KST::matrixList.lock().readLock();
mxPtr = *KST::matrixList.findTag(_editMultipleWidget->_objectList->item(i)->text());
KST::matrixList.lock().unlock();
if (!mxPtr) {
return false;
}
if (!editSingleObject(mxPtr)) {
return false;
}
didEdit = true;
}
}
if (!didEdit) {
QMessageBox::warning(this, QObject::tr("Kst"), QObject::tr("Select one or more objects to edit."));
return false;
}
} else {
KstMatrixPtr mp;
QString tagName;
mp = kst_cast<KstMatrix>(_dp);
tagName = _tagName->text();
if (!mp || (tagName != mp->tagName() && KstData::self()->dataTagNameNotUnique(tagName))) {
_tagName->setFocus();
return false;
}
mp->writeLock();
mp->setTag(KstObjectTag(tagName, mp->tag().context())); // FIXME: can't change tag context
mp->unlock();
//
// then edit the object...
//
_fileNameDirty = true;
_fieldDirty = true;
_xStartDirty = true;
_xStartCountFromEndDirty = true;
_yStartDirty = true;
_yStartCountFromEndDirty = true;
_xNumStepsDirty = true;
_xNumStepsReadToEndDirty = true;
_yNumStepsDirty = true;
_yNumStepsReadToEndDirty = true;
_gradientXDirty = true;
_gradientYDirty = true;
_gradientZAtMinDirty = true;
_gradientZAtMaxDirty = true;
_minXDirty = true;
_minYDirty = true;
_xStepDirty = true;
_yStepDirty = true;
_doSkipDirty = true;
_skipDirty = true;
_doAveDirty = true;
_nXDirty = true;
_nYDirty = true;
if (!editSingleObject(mp)) {
//.........这里部分代码省略.........