本文整理汇总了C++中ScaleDraw::enableComponent方法的典型用法代码示例。如果您正苦于以下问题:C++ ScaleDraw::enableComponent方法的具体用法?C++ ScaleDraw::enableComponent怎么用?C++ ScaleDraw::enableComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScaleDraw
的用法示例。
在下文中一共展示了ScaleDraw::enableComponent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: outputGraphs
void FFT::outputGraphs()
{
createOutputGraph();
MultiLayer *ml = d_output_graph->multiLayer();
d_output_graph->setTitle(QString::null);
d_output_graph->setYAxisTitle(tr("Angle (deg)"));
d_output_graph->enableAxis(QwtPlot::xTop, true);
d_output_graph->enableAxis(QwtPlot::yRight, true);
if (!d_inverse)
d_output_graph->setAxisTitle(QwtPlot::xTop, tr("Frequency") + " (" + tr("Hz") + ")");
else
d_output_graph->setAxisTitle(QwtPlot::xTop, tr("Time") + + " (" + tr("s") + ")");
ScaleDraw *sd = (ScaleDraw *)d_output_graph->axisScaleDraw(QwtPlot::yLeft);
if (sd)
sd->setShowTicksPolicy(ScaleDraw::HideBegin);
sd = (ScaleDraw *)d_output_graph->axisScaleDraw(QwtPlot::yRight);
if (sd)
sd->setShowTicksPolicy(ScaleDraw::HideBegin);
sd = (ScaleDraw *)d_output_graph->axisScaleDraw(QwtPlot::xBottom);
if (sd){
sd->setShowTicksPolicy(ScaleDraw::HideBeginEnd);
sd->enableComponent(QwtAbstractScaleDraw::Backbone, false);
}
QString tableName = d_result_table->objectName();
PlotCurve *pc = d_output_graph->insertCurve(d_result_table, 0, tableName + "_" + tr("Angle"), 0);
pc->setPen(QPen(d_curveColor, 1));
d_output_graph->removeLegend();
d_output_graph->updatePlot();
Graph *g = ml->addLayer(0, 0, 0, 0, true);
g->setTitle(QString::null);
if (!d_inverse)
g->setXAxisTitle(tr("Frequency") + " (" + tr("Hz") + ")");
else
g->setXAxisTitle(tr("Time") + + " (" + tr("s") + ")");
g->setYAxisTitle(tr("Amplitude"));
g->removeLegend();
sd = (ScaleDraw *)g->axisScaleDraw(QwtPlot::xTop);
if (sd)
sd->setShowTicksPolicy(ScaleDraw::HideBeginEnd);
PlotCurve *c = g->insertCurve(d_result_table, 0, tableName + "_" + tr("Amplitude"), 0);
c->setPen(QPen(d_curveColor, 1));
g->updatePlot();
double rb = g->axisScaleDiv(QwtPlot::xBottom)->upperBound();
d_output_graph->setAxisScale(QwtPlot::xBottom, 0, rb);
d_output_graph->setAxisScale(QwtPlot::xTop, 0, rb);
g->setAxisScale(QwtPlot::xBottom, 0, rb);
g->setAxisScale(QwtPlot::xTop, 0, rb);
ml->setAlignPolicy(MultiLayer::AlignCanvases);
ml->setRows(2);
ml->setCols(1);
ml->setSpacing(0, 0);
ml->linkXLayerAxes();
ml->setCommonLayerAxes(false, true);
ml->arrangeLayers(false, false);
}