本文整理汇总了C++中QCPGraph::setAntialiased方法的典型用法代码示例。如果您正苦于以下问题:C++ QCPGraph::setAntialiased方法的具体用法?C++ QCPGraph::setAntialiased怎么用?C++ QCPGraph::setAntialiased使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCPGraph
的用法示例。
在下文中一共展示了QCPGraph::setAntialiased方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: graph
/*! \brief Add a Graph to the current Plotter
\param index the index of the graph
\param title the title of the graph
\param color the color of the graph
\param type the type of the graph (bar, lines, points)
\param the tickness of the graph
\param graph_y_scale to multiply the all data points for a scale factor
*/
Graph * Plotter::addGraph(QString remotePort,QString localPort,int index, QString title, QString color, QString type, int size, double graph_y_scale)
{
Graph *graph = NULL;
graph = new Graph(index,title,color,type,size,graph_y_scale,this->size);
for(int i=0;i<graphList.count();i++) {
Graph *g = (Graph *)graphList.at(i);
Connection *con = g->getConnetion();
if(!con){
continue;
}
if(con->remotePortName == remotePort && con->localPortName == localPort){
graph->curr_connection = g->curr_connection;
graph->deleteConnection = false;
break;
}
}
graphList.append(graph);
QCPGraph *customGraph = customPlot.addGraph(); // line
customGraph->setPen(QPen(QColor(color),size));
customGraph->setAntialiased(false);
customGraph->setLineStyle(QCPGraph::lsLine);
if(type == "points"){
customGraph->setLineStyle(QCPGraph::lsNone);
customGraph->setScatterStyle(QCPScatterStyle::ssDot);
}
if(type == "bars"){
customGraph->setLineStyle(QCPGraph::lsImpulse);
customGraph->setScatterStyle(QCPScatterStyle::ssNone);
}
QCPGraph *customGraphPoint = customPlot.addGraph(); // dot
customGraphPoint->setPen(QPen(QColor(color)));
customGraphPoint->setLineStyle(QCPGraph::lsNone);
customGraphPoint->setScatterStyle(QCPScatterStyle::ssDisc);
graph->setCustomGraph(customGraph);
graph->setCustomGraphPoint(customGraphPoint);
customPlot.replot();
return graph;
}