本文整理汇总了C++中KstDataSourcePtr::fileName方法的典型用法代码示例。如果您正苦于以下问题:C++ KstDataSourcePtr::fileName方法的具体用法?C++ KstDataSourcePtr::fileName怎么用?C++ KstDataSourcePtr::fileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstDataSourcePtr
的用法示例。
在下文中一共展示了KstDataSourcePtr::fileName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fileName
KJS::Value KstBindDataSource::fileName(KJS::ExecState *exec) const {
Q_UNUSED(exec)
KstDataSourcePtr s = makeSource(_d);
if (s) {
KstReadLocker rl(s);
return KJS::String(s->fileName());
}
return KJS::String();
}
示例2: main
//.........这里部分代码省略.........
hs = new KstHistogram(KST::suggestHistogramName(yvector->tag()),
KstVectorPtr(yvector), min, max, N, KST_HS_NUMBER);
KstVCurvePtr vc = new KstVCurve(KST::suggestCurveName(hs->tag(), true),
hs->vX(), hs->vY(),
0L, 0L, 0L, 0L, color);
vc->setHasPoints(false);
vc->setHasLines(false);
vc->setHasBars(true);
vc->setBarStyle(1);
KST::dataObjectList.lock().writeLock();
KST::dataObjectList.append(hs.data());
KST::dataObjectList.append(vc.data());
KST::dataObjectList.lock().unlock();
plot->addCurve(vc.data());
if (in.sep_plots) {
plot->setTagName(hs->tag());
i_plot++;
if (i_plot < in.n_plots) {
plot = *plist.at(i_plot);
}
}
}
} // next histogram
} // end (if there are some histograms)
if (matrixList.count() > 0) { // if there are some matrixes
for (mat_i = matrixList.begin(); mat_i != matrixList.end(); ++mat_i) {
QString tag_name = KST::suggestMatrixName(*mat_i);
if (!file->isValidMatrix(*mat_i)) {
startupErrors.append(i18n("Failed to create matrix '%1' from file '%2'.").arg(*mat_i).arg(file->fileName()));
}
KstRMatrixPtr matrix = new KstRMatrix(file, *mat_i,
KstObjectTag(tag_name, file->tag()),
0,0,-1,-1,false,false,0);
// xStart, yStart, xNumSteps, yNumSteps,
//doAve, doSkip, skip);
// Time to create the image from the matrix
tag_name = KST::suggestImageName(matrix->tag());
QStringList palList = KPalette::getPaletteList();
QString pal;
if (palList.contains("IDL 13 RAINBOW")) {
pal = QString("IDL 13 RAINBOW");
} else {
pal = QString(*palList.at(0));
}
KPalette* newPal = new KPalette(pal);
KstImagePtr image = new KstImage(tag_name, KstMatrixPtr(matrix), 0.0, 1.0,
true, newPal);
plot->addCurve(KstBaseCurvePtr(image));
KST::dataObjectList.lock().writeLock();
KST::dataObjectList.append(image.data());
KST::dataObjectList.lock().unlock();
image = 0L; // drop the reference
if (in.sep_plots) {
plot->setTagName(matrix->tag());
i_plot++;
if (i_plot < in.n_plots) {
plot = *plist.at(i_plot);
}