本文整理汇总了C++中QwtPlot::axisScaleDraw方法的典型用法代码示例。如果您正苦于以下问题:C++ QwtPlot::axisScaleDraw方法的具体用法?C++ QwtPlot::axisScaleDraw怎么用?C++ QwtPlot::axisScaleDraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QwtPlot
的用法示例。
在下文中一共展示了QwtPlot::axisScaleDraw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalcXExtent
int PlotItem::CalcXExtent (QwtPlot& plot) const
{
int result = 0;
if (LeftAxisEnabled_)
result += plot.axisScaleDraw (QwtPlot::yLeft)->
extent (plot.axisFont (QwtPlot::yLeft));
return result;
}
示例2: updateLayout
void PlotMatrix::updateLayout()
{
for ( int row = 0; row < numRows(); row++ )
{
for ( int col = 0; col < numColumns(); col++ )
{
QwtPlot *p = plot( row, col );
if ( p )
{
bool showAxis[QwtPlot::axisCnt];
showAxis[QwtPlot::xBottom] =
axisEnabled( QwtPlot::xBottom ) && row == numRows() - 1;
showAxis[QwtPlot::xTop] =
axisEnabled( QwtPlot::xTop ) && row == 0;
showAxis[QwtPlot::yLeft] =
axisEnabled( QwtPlot::yLeft ) && col == 0;
showAxis[QwtPlot::yRight] =
axisEnabled( QwtPlot::yRight ) && col == numColumns() - 1;
for ( int axis = 0; axis < QwtPlot::axisCnt; axis++ )
{
if ( axis == QwtPlot::xBottom || axis == QwtPlot::xTop )
p->enableAxis( axis, showAxis[axis] );
else
{
p->enableAxis( axis, true );
QwtScaleDraw *sd = p->axisScaleDraw( axis );
sd->enableComponent(
QwtScaleDraw::Backbone, showAxis[axis] );
sd->enableComponent(
QwtScaleDraw::Ticks, showAxis[axis] );
sd->enableComponent(
QwtScaleDraw::Labels, showAxis[axis] );
}
}
}
}
}
for ( int col = 0; col < numColumns(); col++ )
{
alignVAxes( col, QwtPlot::yLeft );
alignVAxes( col, QwtPlot::yRight );
}
for ( int row = 0; row < numRows(); row++ )
{
for ( int col = 0; col < numColumns(); col++ )
{
QwtPlot *p = plot( row, col );
if ( p )
p->replot();
}
}
}
示例3: CalcYExtent
int PlotItem::CalcYExtent (QwtPlot& plot) const
{
int result = 0;
if (BottomAxisEnabled_)
result += plot.axisScaleDraw (QwtPlot::xBottom)->
extent (plot.axisFont (QwtPlot::xBottom));
if (!PlotTitle_.isEmpty ())
result += plot.titleLabel ()->sizeHint ().height ();
return result;
}