本文整理汇总了C++中QCPGraph::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ QCPGraph::setVisible方法的具体用法?C++ QCPGraph::setVisible怎么用?C++ QCPGraph::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCPGraph
的用法示例。
在下文中一共展示了QCPGraph::setVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateChannel
void RealTimePlot::updateChannel(int index)
{
Channel *chan = channels[index];
// Get parameters from channel
QCPGraph *line = chan->getPtrGraphLine();
QCPGraph *marker = chan->getPtrGraphMarker();
QColor color = chan->getGraphColor();
// Set parameters of line graph
line->setPen(QPen(color));
line->setLineStyle(QCPGraph::lsLine);
line->setVisible(chan->getVisible(LINE));
// Set parameters of marker graph
marker->setName(chan->getName());
marker->setPen(QPen(color));
marker->setLineStyle(QCPGraph::lsNone);
marker->setScatterStyle(chan->getMarkerStyle());
marker->setVisible(chan->getVisible(MARKER));
}
示例2: addBodePlot
void BodeWidget::addBodePlot(BodeData *data, const QString& name){
QCPGraph* dbGraph = dbPlot->addGraph();
QCPGraph* paGraph = paPlot->addGraph();
dbGraph->setData(data->at(0), data->at(1));
paGraph->setData(data->at(0), data->at(2));
dbGraph->setName(name);
paGraph->setName(name);
dbGraph->setPen(QPen(QColor::fromHsv(hue, 255, 255, 192)));
paGraph->setPen(QPen(QColor::fromHsv(hue, 255, 255, 192)));
paGraph->setVisible(false);
dbGraph->rescaleAxes();
paGraph->rescaleAxes();
hue += 17;
hue %= 360;
this->paGraphMap[dbGraph] = paGraph;
}