Go to the documentation of this file.
22 const int tValue = slider->
transform( value );
33 for (
int j = 0; j < ticks.size(); j++ )
35 if ( slider->
transform( ticks[ j ] ) == tValue )
97 setFocusPolicy( Qt::StrongFocus );
146 setFocusPolicy( on ? Qt::StrongFocus : Qt::NoFocus );
307 #if QT_VERSION < 0x050000
308 const int wheelDelta =
event->delta();
310 const QPoint delta =
event->angleDelta();
311 const int wheelDelta = ( qAbs( delta.x() ) > qAbs( delta.y() ) )
312 ? delta.x() : delta.y();
317 if ( ( event->modifiers() & Qt::ControlModifier ) ||
318 (
event->modifiers() & Qt::ShiftModifier ) )
322 if ( wheelDelta < 0 )
323 numSteps = -numSteps;
327 const int numTurns = ( wheelDelta / 120 );
332 numSteps = -numSteps;
384 switch ( event->key() )
390 numSteps = -numSteps;
398 numSteps = -numSteps;
406 numSteps = -numSteps;
413 numSteps = -numSteps;
421 numSteps = -numSteps;
424 case Qt::Key_PageDown:
428 numSteps = -numSteps;
671 double value,
int stepCount )
const
679 if ( transformation == NULL )
698 v = qRound( v / stepSize ) * stepSize;
719 if ( qFuzzyCompare(
scaleMap().pDist(), 360.0 ) )
723 if ( qFuzzyCompare(
value, vmax ) )
729 const double range = vmax - vmin;
733 value += std::ceil( ( vmin -
value ) / range ) * range;
735 else if (
value > vmax )
737 value -= std::ceil( (
value - vmax ) / range ) * range;
745 else if (
value > vmax )
764 if (
scaleMap().transformation() == NULL )
767 if ( stepSize > 0.0 )
777 if ( stepSize > 0.0 )
782 qRound( ( v -
scaleMap().p1() ) / stepSize ) * stepSize;
788 if ( qAbs( stepSize ) > 1e-12 )
790 if ( qFuzzyCompare(
value + 1.0, 1.0 ) )
835 #include "moc_qwt_abstract_slider.cpp"
virtual ~QwtAbstractSlider()
Destructor.
double invTransform(double p) const
const QwtScaleMap & scaleMap() const
void valueChanged(double value)
Notify a change of value.
double alignedValue(double) const
virtual void wheelEvent(QWheelEvent *) QWT_OVERRIDE
virtual void sliderChange()
Calling update()
virtual void keyPressEvent(QKeyEvent *) QWT_OVERRIDE
void setValue(double value)
static double qwtAlignToScaleDiv(const QwtAbstractSlider *slider, double value)
void setInvertedControls(bool)
virtual void scaleChange() QWT_OVERRIDE
double lowerBound() const
An abstract base class for widgets having a scale.
void sliderMoved(double value)
void setPageSteps(uint)
Set the number of steps for a page increment.
void setTracking(bool)
Enables or disables tracking.
virtual void mousePressEvent(QMouseEvent *) QWT_OVERRIDE
QList< double > ticks(int tickType) const
virtual void mouseReleaseEvent(QMouseEvent *) QWT_OVERRIDE
void incrementValue(int stepCount)
@ NTickTypes
Number of valid tick types.
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
int transform(double) const
const QwtScaleDiv & scaleDiv() const
double upperBound() const
void setTotalSteps(uint)
Set the number of steps.
virtual double scrolledTo(const QPoint &pos) const =0
Determine the value for a new position of the movable part of the slider.
void setStepAlignment(bool)
Enable step alignment.
double value
Returns the current value.
virtual bool isScrollPosition(const QPoint &pos) const =0
Determine what to do when the user presses a mouse button.
double transform(double s) const
double incrementedValue(double value, int stepCount) const
void setScale(double lowerBound, double upperBound)
Specify a scale.
virtual void mouseMoveEvent(QMouseEvent *) QWT_OVERRIDE
void setSingleSteps(uint)
Set the number of steps for a single increment.
A class representing a scale division.
QwtAbstractSlider(QWidget *parent=NULL)
Constructor.
const QwtTransform * transformation() const
Get the transformation.
An abstract base class for slider widgets with a scale.
double boundedValue(double) const
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45