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


C++ QCPGraph::setAntialiasedFill方法代码示例

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


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

示例1: createNewPlot

  void DataBrokerPlotter::createNewPlot() {
    char text[50];
    // create first curve
    std::string cfgName = name;
    std::string tmpString;
    Plot *newPlot = new Plot;
    QCPGraph *newCurve = qcPlot->addGraph();

    newCurve->setAntialiasedFill(false);

    newPlot->dpId = nextPlotId++;
    sprintf(text, "graph%02d", newPlot->dpId);
    newPlot->name = std::string(text);

    cfgName.append("/");
    cfgName.append(newPlot->name);
    cfgName.append("/");

    newCurve->setPen( QPen(colors[(newPlot->dpId-1) % 8], 0.5) );
    newCurve->setLineStyle( QCPGraph::lsLine );

    newPlot->curve = newCurve;
    
    plots.push_back(newPlot);

    // add datapackage for first plot
    mars::data_broker::DataPackage dbPackageX;// = new mars::data_broker::DataPackage;
    mars::data_broker::DataPackage dbPackageY;// = new mars::data_broker::DataPackage;
    dbPackageX.add("xvalue", (double)0.0);
    dbPackageY.add("yvalue", (double)0.0);
    //dbPackage->add("yvalue", (double)0.0);

    tmpString = name;
    tmpString.append("/");
    tmpString.append(text);
    tmpString.append("/xvalue");
    dataBroker->pushData("data_broker_plotter", tmpString,
                         dbPackageX, this,
                         mars::data_broker::DATA_PACKAGE_READ_WRITE_FLAG);
    dataBroker->registerSyncReceiver(this, "data_broker_plotter",
                                     tmpString, newPlot->dpId*10);
    tmpString = name;
    tmpString.append("/");
    tmpString.append(text);
    tmpString.append("/yvalue");
    dataBroker->pushData("data_broker_plotter", tmpString,
                         dbPackageY, this,
                         mars::data_broker::DATA_PACKAGE_READ_WRITE_FLAG);
    dataBroker->registerSyncReceiver(this, "data_broker_plotter",
                                     tmpString, newPlot->dpId*10+1);
    newPlot->gotData = 0;
    
    tmpString = cfgName;
    tmpString.append("sTime");
    newPlot->sTime = cfg->getOrCreateProperty("DataBrokerPlotter",
                                              tmpString.c_str(),
                                              (double)0.0, this);
    tmpString = cfgName;
    tmpString.append("xRange");
    newPlot->xRange = cfg->getOrCreateProperty("DataBrokerPlotter",
                                               tmpString.c_str(),
                                               (double)0.0, this);
    tmpString = cfgName;
    tmpString.append("yScale");
    newPlot->yScale = cfg->getOrCreateProperty("DataBrokerPlotter",
                                               tmpString.c_str(),
                                               (double)1.0, this);
    tmpString = cfgName;
    tmpString.append("yOffset");
    newPlot->yOffset = cfg->getOrCreateProperty("DataBrokerPlotter",
                                                tmpString.c_str(),
                                                (double)0.0, this);

    cfgParamIdToPlot[newPlot->sTime.paramId] = newPlot;
    cfgParamIdToPlot[newPlot->xRange.paramId] = newPlot;
    cfgParamIdToPlot[newPlot->yScale.paramId] = newPlot;
    cfgParamIdToPlot[newPlot->yOffset.paramId] = newPlot;
    newPlot->cfgParamIdProp[newPlot->sTime.paramId] = &newPlot->sTime;
    newPlot->cfgParamIdProp[newPlot->xRange.paramId] = &newPlot->xRange;
    newPlot->cfgParamIdProp[newPlot->yScale.paramId] = &newPlot->yScale;
    newPlot->cfgParamIdProp[newPlot->yOffset.paramId] = &newPlot->yOffset;
  }
开发者ID:EwaldHartmann,项目名称:mars,代码行数:82,代码来源:DataBrokerPlotter.cpp


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