コード例 #1
0
/*!
  \brief Set the maximum number of minor tick intervals

  The scale's minor ticks are calculated automatically such that
  the number of minor intervals does not exceed ticks.
  The default value is 3.
  \param ticks
  \sa QwtAbstractScaleDraw
*/
void QwtAbstractScale::setScaleMaxMinor(int ticks)
{
    if ( ticks != d_data->maxMinor)
    {
        d_data->maxMinor = ticks;
        updateScaleDraw();
    }
}
コード例 #2
0
/*!
   \brief Set the step size used for calculating a scale division

   The step size is hint for calculating the intervals for
   the major ticks of the scale. A value of 0.0 is interpreted
   as no hint.

   \param stepSize Hint for the step size of the scale

   \sa scaleStepSize(), QwtScaleEngine::divideScale()

   \note Position and distance between the major ticks also
         depends on scaleMaxMajor().
*/
void QwtAbstractScale::setScaleStepSize( double stepSize )
{
    if ( stepSize != d_data->stepSize )
    {
        d_data->stepSize = stepSize;
        updateScaleDraw();
    }
}