Пример #1
0
/*!
  \brief Notify a change of the range

  Called by QwtAbstractSlider
*/
void QwtKnob::rangeChange()
{
    if ( autoScale() )
        rescale( minValue(), maxValue() );

    layoutKnob( true );
    recalcAngle();
}
Пример #2
0
/*!
  \brief Set the total angle by which the knob can be turned
  \param angle Angle in degrees.

  The default angle is 270 degrees. It is possible to specify
  an angle of more than 360 degrees so that the knob can be
  turned several times around its axis.
*/
void QwtKnob::setTotalAngle (double angle)
{
    if (angle < 10.0)
       d_totalAngle = 10.0;
    else
       d_totalAngle = angle;
    scaleDraw()->setAngleRange( -0.5 * d_totalAngle, 0.5 * d_totalAngle);
    layoutKnob();
}
Пример #3
0
/*!
  \brief Notify a change of the range

  Called by QwtSliderBase
*/
void QwtKnob::rangeChange()
{
    if (!hasUserScale())
    {
        scaleDraw()->setScale(minValue(), maxValue(),
            scaleMaxMajor(), scaleMaxMinor());
    }
    layoutKnob();
    recalcAngle();
}
Пример #4
0
/*! 
  Handle QEvent::StyleChange and QEvent::FontChange;
  \param event Change event
*/
void QwtKnob::changeEvent( QEvent *event )
{
    switch( event->type() )
    {
        case QEvent::StyleChange:
        case QEvent::FontChange:
            layoutKnob( true );
            break;
        default:
            break;
    }
}
Пример #5
0
/*!
    Recalculates the layout
    \sa layoutKnob()
*/
void QwtKnob::scaleChange()
{
    layoutKnob( true );
}
Пример #6
0
/*!
  \brief Set the knob's border width
  \param borderWidth new border width
*/
void QwtKnob::setBorderWidth( int borderWidth )
{
    d_data->borderWidth = qMax( borderWidth, 0 );
    layoutKnob( true );
}
Пример #7
0
/*!
  \brief Change the knob's width.

  The specified width must be >= 5, or it will be clipped.
  \param width New width
*/
void QwtKnob::setKnobWidth( int width )
{
    d_data->knobWidth = qMax( width, 5 );
    layoutKnob( true );
}
Пример #8
0
/*!
  Qt Resize Event
  \param event Resize event
*/
void QwtKnob::resizeEvent( QResizeEvent *event )
{
    Q_UNUSED( event );
    layoutKnob( false );
}
Пример #9
0
/*!
    Recalculates the layout
    \sa QwtKnob::layoutKnob()
*/
void QwtKnob::fontChange(const QFont &f)
{
    QwtSliderBase::fontChange( f );
    layoutKnob();
}
Пример #10
0
/*!
  \brief Set the knob's border width
  \param bw new border width
*/
void QwtKnob::setBorderWidth(int bw)
{
    d_borderWidth = qwtMax(bw, 0);
    layoutKnob();
}
Пример #11
0
/*!
  \brief Change the knob's width.

  The specified width must be >= 5, or it will be clipped.
  \param w New width
*/
void QwtKnob::setKnobWidth(int w)
{
    d_knobWidth = qwtMax(w,5);
    layoutKnob();
}
Пример #12
0
/*!
  \brief Qt Resize Event
*/
void QwtKnob::resizeEvent(QResizeEvent *)
{
    layoutKnob( FALSE );
}
Пример #13
0
void QwtKnob::fontChange(const QFont &f)
{
    QwtAbstractSlider::fontChange( f );
    layoutKnob();
}
Пример #14
0
/*!
  Qt Resize Event
*/
void QwtKnob::resizeEvent(QResizeEvent *event)
{                                                               // lehrig R Kardell begin
    d_data->knobWidth = qwtMax(event->size().width() -50 , 5 ); // make room for knob inside box
                                                                // lehrig R Kardell end
    layoutKnob( false );
}
Пример #15
0
/*!
  \brief Qt Resize Event
*/
void QwtKnob::resizeEvent(QResizeEvent *)
{
    layoutKnob( false );
}