当前位置: 首页>>代码示例>>C++>>正文


C++ KstVCurvePtr::setYError方法代码示例

本文整理汇总了C++中KstVCurvePtr::setYError方法的典型用法代码示例。如果您正苦于以下问题:C++ KstVCurvePtr::setYError方法的具体用法?C++ KstVCurvePtr::setYError怎么用?C++ KstVCurvePtr::setYError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KstVCurvePtr的用法示例。


在下文中一共展示了KstVCurvePtr::setYError方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setYErrorVector

void KstBindCurve::setYErrorVector(KJS::ExecState *exec, const KJS::Value& value) {
  KstVectorPtr vp = extractVector(exec, value);
  if (vp) {
    KstVCurvePtr d = makeCurve(_d);
    if (d) {
      KstWriteLocker wl(d);
      d->setYError(vp);
    }
  }
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例2: edit_I

void KstCurveDialogI::edit_I() {
  int index;
  KstVCurvePtr curve;

  KstVCurveList curves = kstObjectSubList<KstDataObject, KstVCurve>(KST::dataObjectList);
  index = Select->currentItem();
  if (index < 0 || unsigned(index) >= curves.count()) {
    new_I();
    return;
  }

  QString tag_name = Select->currentText();

  /* verify that the curve name is unique */
  if (tag_name != curves[index]->tagName()) {
    if (KST::dataTagNameNotUnique(tag_name)) {
      Select->setFocus();
      return;
    }
  }

  curve = curves[index];
  curve->setTagName(tag_name);

  { // leave this scope here to destroy the iterator
    KstReadLocker ml(&KST::vectorList.lock());
    KstVectorList::Iterator i = KST::vectorList.findTag(_xVector->selectedVector());
    if (i != KST::vectorList.end())
      curve->setXVector(*i);

    i = KST::vectorList.findTag(_yVector->selectedVector());
    if (i != KST::vectorList.end())
      curve->setYVector(*i);

    i = KST::vectorList.findTag(_xError->selectedVector());
    curve->setXError(*i);

    i = KST::vectorList.findTag(_yError->selectedVector());
    curve->setYError(*i);
  }

  curve->setColor(_curveAppearance->color());
  curve->setHasPoints(_curveAppearance->showPoints());
  curve->setHasLines(_curveAppearance->showLines());
  curve->setLineWidth(_curveAppearance->lineWidth());
  curve->setLineStyle(_curveAppearance->lineStyle());
  curve->Point.setType(_curveAppearance->pointType());

  curve->update(-1);
  curve = 0L;
  curves.clear();
  emit modified();
}
开发者ID:,项目名称:,代码行数:53,代码来源:

示例3: main


//.........这里部分代码省略.........

                    KST::dataObjectList.lock().writeLock();
                    KST::dataSourceList.append(file);
                    KST::dataObjectList.lock().unlock();

                    KstRVectorPtr yvector;
                    KstRVectorPtr evector;
                    KstVCurvePtr curve;
                    KstPSDPtr psd;
                    KstHistogramPtr hs;
                    KstRVectorPtr xvector;

                    if (!ycolList.isEmpty()) { // if there are some xy plots
                        // make the x axis vector
                        xvector = GetOrCreateVector(args->getOption("x"), file, in);
                        if (xvector) {
                            // make the y axis vectors
                            for (i_ycol = 0; i_ycol < ycolList.count(); ++i_ycol ) {
                                yvector = GetOrCreateVector(*(ycolList.at(i_ycol)), file, in);
                                if (yvector) {
                                    // make the curves
                                    color = KstColorSequence::next(vcurves,plot->backgroundColor());
                                    curve = new KstVCurve(KST::suggestCurveName(yvector->tag(), false),
                                                          KstVectorPtr(xvector), KstVectorPtr(yvector),
                                                          0L, 0L, 0L, 0L, color);
                                    if (in.has_points) {
                                        curve->setHasPoints(true);
                                        curve->setHasLines(false);
                                    }

                                    if (i_ycol<errorList.count()) {
                                        evector = GetOrCreateVector(*(errorList.at(i_ycol)), file, in);
                                        if (evector) {
                                            curve->setYError(KstVectorPtr(evector));
                                            curve->setYMinusError(KstVectorPtr(evector));
                                        }
                                    }

                                    KST::dataObjectList.lock().writeLock();
                                    KST::dataObjectList.append(curve.data());
                                    KST::dataObjectList.lock().unlock();
                                    plot->addCurve(curve.data());

                                    if (in.sep_plots) {
                                        plot->setTagName(curve->tag());
                                        i_plot++;
                                        if (i_plot < in.n_plots) {
                                            plot = *plist.at(i_plot);
                                        }
                                    } // end (if they are separate plots)
                                }
                            } // next y col
                        }
                    } // end (if there are some xy plots)

                    if (!yEqList.isEmpty()) {
                        QString eqS;
                        double max, min;
                        int n;
                        bool xeq, eq_ok;

                        SetEqXRanges(args->getOption("xe"), &min, &max, &n, &xeq);
                        for (eq_i = yEqList.begin(); eq_i != yEqList.end(); ++eq_i) {
                            KstEquationPtr eq;

                            eqS = *eq_i;
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:67,代码来源:main.cpp


注:本文中的KstVCurvePtr::setYError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。