本文整理汇总了C++中KstPSDPtr::setTagName方法的典型用法代码示例。如果您正苦于以下问题:C++ KstPSDPtr::setTagName方法的具体用法?C++ KstPSDPtr::setTagName怎么用?C++ KstPSDPtr::setTagName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstPSDPtr
的用法示例。
在下文中一共展示了KstPSDPtr::setTagName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: editObject
bool KstPsdDialog::editObject() {
KstPSDList psList;
//
// if the user selected no vector, treat it as non-dirty...
//
_vectorDirty = _w->_vector->_vector->currentIndex() != 0;
_apodizeFxnDirty = _w->_kstFFTOptions->ApodizeFxn->currentIndex() != 0;
_fFTLenDirty = _w->_kstFFTOptions->FFTLen->text() != " ";
_sampRateDirty = !_w->_kstFFTOptions->SampRate->text().isEmpty();
_vectorUnitsDirty = !_w->_kstFFTOptions->VectorUnits->text().isEmpty();
_rateUnitsDirty = !_w->_kstFFTOptions->RateUnits->text().isEmpty();
_outputDirty = _w->_kstFFTOptions->Output->currentIndex() != 0;
psList = kstObjectSubList<KstDataObject,KstPSD>(KST::dataObjectList);
if (_editMultipleMode) {
bool didEdit = false;
int i;
for (i = 0; i < _editMultipleWidget->_objectList->count(); i++) {
if (_editMultipleWidget->_objectList->item(i)->isSelected()) {
KstPSDList::Iterator psIter;
KstPSDPtr psPtr;
psIter = psList.findTag(_editMultipleWidget->_objectList->item(i)->text());
if (psIter == psList.end()) {
return false;
}
psPtr = *psIter;
if (!editSingleObject(psPtr)) {
return false;
}
didEdit = true;
}
}
if (!didEdit) {
QMessageBox::warning(this, QObject::tr("Kst"), QObject::tr("Select one or more objects to edit."));
return false;
}
} else {
KstPSDPtr pp;
QString tag_name;
pp = kst_cast<KstPSD>(_dp);
tag_name = _tagName->text();
if (!pp || (tag_name != pp->tagName() && KstData::self()->dataTagNameNotUnique(tag_name))) {
_tagName->setFocus();
return false;
}
pp->writeLock();
pp->setTagName(tag_name);
pp->unlock();
// then edit the object
_vectorDirty = true;
_apodizeDirty = true;
_apodizeFxnDirty = true;
_gaussianSigmaDirty = true;
_removeMeanDirty = true;
_interleavedDirty = true;
_sampRateDirty = true;
_vectorUnitsDirty = true;
_rateUnitsDirty = true;
_fFTLenDirty = true;
_outputDirty = true;
_interpolateHolesDirty = true;
if (!editSingleObject(pp)) {
return false;
}
}
emit modified();
return true;
}