本文整理汇总了C++中KstVCurvePtr::tagName方法的典型用法代码示例。如果您正苦于以下问题:C++ KstVCurvePtr::tagName方法的具体用法?C++ KstVCurvePtr::tagName怎么用?C++ KstVCurvePtr::tagName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstVCurvePtr
的用法示例。
在下文中一共展示了KstVCurvePtr::tagName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createPowerSpectrum
QString KstIfaceImpl::createPowerSpectrum(const QString & name,
const QString& vector,
bool appodize,
bool removeMean,
int fftLength,
const QString& rateUnits,
double sampleRate,
const QString& vectorUnits,
const QColor& color) {
QStringList objList = createPowerSpectrum(name, vector, appodize, removeMean,
fftLength, rateUnits, sampleRate,
vectorUnits);
if (objList.isEmpty())
{
return QString::null;
}
KST::vectorList.lock().readLock();
KstVectorPtr vx = *KST::vectorList.findTag(objList[1]);
KstVectorPtr vy = *KST::vectorList.findTag(objList[2]);
KST::vectorList.lock().unlock();
QString n = objList[0] + "-C";
KST::dataObjectList.lock().readLock();
while (KST::dataObjectList.findTag(n) != KST::dataObjectList.end()) {
n += "'";
}
KST::dataObjectList.lock().unlock();
// create curve as well (but don't plot the curve)
KstVCurvePtr vc = new KstVCurve(n, vx, vy,
0L, 0L, 0L, 0L,
color.isValid() ? color : QColor("darkBlue"));
KST::dataObjectList.lock().writeLock();
KST::dataObjectList.append(KstDataObjectPtr(vc));
KST::dataObjectList.lock().unlock();
_doc->forceUpdate();
_doc->setModified();
return vc->tagName(); //return the curve name so user can plot it
}
示例2: createHistogram
QString KstIfaceImpl::createHistogram(const QString& name,
const QString& vector,
double min,
double max,
int numBins,
int normalizationType,
const QColor& color) {
QStringList objList = createHistogram(name, vector, min, max, numBins, normalizationType);
if (objList.isEmpty())
{
return QString::null;
}
// also create the curve for the histogram
QString n = objList[0] + "-C";
KST::vectorList.lock().readLock();
KstVectorPtr vx = *KST::vectorList.findTag(objList[1]);
KstVectorPtr vy = *KST::vectorList.findTag(objList[2]);
KST::vectorList.lock().unlock();
KST::dataObjectList.lock().readLock();
while (KST::dataObjectList.findTag(n) != KST::dataObjectList.end()) {
n += "'";
}
KST::dataObjectList.lock().unlock();
KstVCurvePtr c = new KstVCurve(n, vx, vy, 0L, 0L, 0L, 0L, color);
c->setHasPoints(false);
c->setHasLines(false);
c->setHasBars(true);
c->setBarStyle(1);
KST::dataObjectList.lock().writeLock();
KST::dataObjectList.append(KstDataObjectPtr(c));
KST::dataObjectList.lock().unlock();
_doc->forceUpdate();
_doc->setModified();
return c->tagName(); //return the curve name so user can plot it
}
示例3: while
const QString& KstIfaceImpl::createCurve(const QString& name, const QString& xVector, const QString& yVector, const QString& xErrorVector, const QString& yErrorVector, const QColor& color) {
QString n = name;
KST::vectorList.lock().readLock();
KstVectorPtr vx = *KST::vectorList.findTag(xVector);
KstVectorPtr vy = *KST::vectorList.findTag(yVector);
KstVectorPtr ex = *KST::vectorList.findTag(xErrorVector);
KstVectorPtr ey = *KST::vectorList.findTag(yErrorVector);
KST::vectorList.lock().unlock();
KST::dataObjectList.lock().writeLock();
while (KST::dataObjectList.findTag(n) != KST::dataObjectList.end()) {
n += "'";
}
KstVCurvePtr c = new KstVCurve(n, vx, vy, ex, ey, ex, ey, color);
KST::dataObjectList.append(KstDataObjectPtr(c));
KST::dataObjectList.lock().unlock();
_doc->forceUpdate();
_doc->setModified();
return c->tagName();
}