Eneboo - Documentación para desarrolladores
Clases | Tipos públicos | Métodos públicos | Métodos protegidos | Propiedades
Referencia de la Clase QwtSlider

The Slider Widget. Más...

#include <qwt_slider.h>

Diagrama de herencias de QwtSlider
QwtAbstractSlider QwtAbstractScale QWidget QwtDoubleRange QObject QPaintDevice QObject QPaintDevice Qt Qt Qt Qt

Lista de todos los miembros.

Clases

class  PrivateData

Tipos públicos

enum  ScalePos {
  NoScale, LeftScale, RightScale, TopScale,
  BottomScale
}
enum  BGSTYLE { BgTrough = 0x1, BgSlot = 0x2, BgBoth = BgTrough | BgSlot }

Métodos públicos

 QwtSlider (QWidget *parent, Qt::Orientation=Qt::Horizontal, ScalePos=NoScale, BGSTYLE bgStyle=BgTrough)
 Constructor.
 QwtSlider (QWidget *parent, const char *name)
 Constructor.
virtual ~QwtSlider ()
virtual void setOrientation (Qt::Orientation)
 Set the orientation.
void setBgStyle (BGSTYLE)
BGSTYLE bgStyle () const
void setScalePosition (ScalePos s)
 Change the scale position (and slider orientation).
ScalePos scalePosition () const
int thumbLength () const
int thumbWidth () const
int borderWidth () const
void setThumbLength (int l)
 Set the slider's thumb length.
void setThumbWidth (int w)
 Change the width of the thumb.
void setBorderWidth (int bw)
 Change the slider's border width.
void setMargins (int x, int y)
 Set distances between the widget's border and internals.
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const
 Return a minimum size hint.
void setScaleDraw (QwtScaleDraw *)
 Set a scale draw.
const QwtScaleDrawscaleDraw () const

Métodos protegidos

virtual double getValue (const QPoint &p)
 Determine the value corresponding to a specified mouse location.
virtual void getScrollMode (const QPoint &p, int &scrollMode, int &direction)
 Determine scrolling mode and direction.
void draw (QPainter *p, const QRect &update_rect)
 Draw the QwtSlider.
virtual void drawSlider (QPainter *p, const QRect &r)
 Draw the slider into the specified rectangle.
virtual void drawThumb (QPainter *p, const QRect &, int pos)
 Draw the thumb at a position.
virtual void resizeEvent (QResizeEvent *e)
 Qt resize event.
virtual void paintEvent (QPaintEvent *e)
 Qt paint event.
virtual void valueChange ()
 Notify change of value.
virtual void rangeChange ()
 Notify change of range.
virtual void scaleChange ()
 Notify changed scale.
virtual void fontChange (const QFont &oldFont)
 Notify change in font.
void layoutSlider (bool update=true)
int xyPosition (double v) const
 Find the x/y position for a given value v.
QwtScaleDrawscaleDraw ()

Propiedades

ScalePos scalePosition
 Return the scale position.
BGSTYLE bgStyle
int thumbLength
int thumbWidth
int borderWidth

Descripción detallada

The Slider Widget.

QwtSlider is a slider widget which operates on an interval of type double. QwtSlider supports different layouts as well as a scale.

sliders.png
Ver también:
QwtAbstractSlider and QwtAbstractScale for the descriptions of the inherited members.

Documentación de las enumeraciones miembro de la clase

Background style.

Ver también:
QwtSlider::QwtSlider
Valores de enumeraciones:
BgTrough 
BgSlot 
BgBoth 

Scale position. QwtSlider tries to enforce valid combinations of its orientation and scale position:

  • Qt::Horizonal combines with NoScale, TopScale and BottomScale
  • Qt::Vertical combines with NoScale, LeftScale and RightScale
Ver también:
QwtSlider::QwtSlider
Valores de enumeraciones:
NoScale 
LeftScale 
RightScale 
TopScale 
BottomScale 

Documentación del constructor y destructor

QwtSlider::QwtSlider ( QWidget parent,
Qt::Orientation  orientation = Qt::Horizontal,
ScalePos  scalePos = NoScale,
BGSTYLE  bgStyle = BgTrough 
) [explicit]

Constructor.

Parámetros:
parentparent widget
orientationOrientation of the slider. Can be Qt::Horizontal or Qt::Vertical. Defaults to Qt::Horizontal.
scalePosPosition of the scale. Defaults to QwtSlider::NoScale.
bgStyleBackground style. QwtSlider::BgTrough draws the slider button in a trough, QwtSlider::BgSlot draws a slot underneath the button. An or-combination of both may also be used. The default is QwtSlider::BgTrough.

QwtSlider enforces valid combinations of its orientation and scale position. If the combination is invalid, the scale position will be set to NoScale. Valid combinations are:

  • Qt::Horizonal with NoScale, TopScale, or BottomScale;
  • Qt::Vertical with NoScale, LeftScale, or RightScale.
QwtSlider::QwtSlider ( QWidget parent,
const char *  name 
) [explicit]

Constructor.

Build a horizontal slider with no scale and BgTrough as background style

Parámetros:
parentparent widget
nameObject name
QwtSlider::~QwtSlider ( ) [virtual]

Documentación de las funciones miembro

BGSTYLE QwtSlider::bgStyle ( ) const
int QwtSlider::borderWidth ( ) const
void QwtSlider::draw ( QPainter p,
const QRect update_rect 
) [protected]

Draw the QwtSlider.

void QwtSlider::drawSlider ( QPainter p,
const QRect r 
) [protected, virtual]

Draw the slider into the specified rectangle.

void QwtSlider::drawThumb ( QPainter p,
const QRect sliderRect,
int  pos 
) [protected, virtual]

Draw the thumb at a position.

void QwtSlider::fontChange ( const QFont oldFont) [protected, virtual]

Notify change in font.

Reimplementado de QWidget.

void QwtSlider::getScrollMode ( const QPoint p,
int scrollMode,
int direction 
) [protected, virtual]

Determine scrolling mode and direction.

Parámetros:
ppoint
scrollModeScrolling mode
directionDirection

Implementa QwtAbstractSlider.

double QwtSlider::getValue ( const QPoint p) [protected, virtual]

Determine the value corresponding to a specified mouse location.

Implementa QwtAbstractSlider.

void QwtSlider::layoutSlider ( bool  update_geometry = true) [protected]

Recalculate the slider's geometry and layout based on the current rect and fonts.

Parámetros:
update_geometrynotify the layout system and call update to redraw the scale
QSize QwtSlider::minimumSizeHint ( ) const [virtual]

Return a minimum size hint.

Atención:
The return value of QwtSlider::minimumSizeHint() depends on the font and the scale.

Reimplementado de QWidget.

void QwtSlider::paintEvent ( QPaintEvent e) [protected, virtual]

Qt paint event.

Reimplementado de QWidget.

void QwtSlider::rangeChange ( ) [protected, virtual]

Notify change of range.

Reimplementado de QwtDoubleRange.

void QwtSlider::resizeEvent ( QResizeEvent e) [protected, virtual]

Qt resize event.

Reimplementado de QWidget.

void QwtSlider::scaleChange ( ) [protected, virtual]

Notify changed scale.

Reimplementado de QwtAbstractScale.

const QwtScaleDraw * QwtSlider::scaleDraw ( ) const
Devuelve:
the scale draw of the slider
Ver también:
setScaleDraw()
QwtScaleDraw * QwtSlider::scaleDraw ( ) [protected]
Devuelve:
the scale draw of the slider
Ver también:
setScaleDraw()
ScalePos QwtSlider::scalePosition ( ) const
void QwtSlider::setBgStyle ( BGSTYLE  st)

Set the background style.

void QwtSlider::setBorderWidth ( int  bd)

Change the slider's border width.

Parámetros:
bdborder width
void QwtSlider::setMargins ( int  xMargin,
int  yMargin 
)

Set distances between the widget's border and internals.

Parámetros:
xMarginHorizontal margin
yMarginVertical margin
void QwtSlider::setOrientation ( Qt::Orientation  o) [virtual]

Set the orientation.

Parámetros:
oOrientation. Allowed values are Qt::Horizontal and Qt::Vertical.

If the new orientation and the old scale position are an invalid combination, the scale position will be set to QwtSlider::NoScale.

Ver también:
QwtAbstractSlider::orientation()

Reimplementado de QwtAbstractSlider.

void QwtSlider::setScaleDraw ( QwtScaleDraw scaleDraw)

Set a scale draw.

For changing the labels of the scales, it is necessary to derive from QwtScaleDraw and overload QwtScaleDraw::label().

Parámetros:
scaleDrawScaleDraw object, that has to be created with new and will be deleted in ~QwtSlider or the next call of setScaleDraw().
void QwtSlider::setScalePosition ( ScalePos  s)

Change the scale position (and slider orientation).

Parámetros:
sPosition of the scale.

A valid combination of scale position and orientation is enforced:

  • if the new scale position is Left or Right, the scale orientation will become Qt::Vertical;
  • if the new scale position is Bottom or Top the scale orientation will become Qt::Horizontal;
  • if the new scale position is QwtSlider::NoScale, the scale orientation will not change.
void QwtSlider::setThumbLength ( int  thumbLength)

Set the slider's thumb length.

Parámetros:
thumbLengthnew length
void QwtSlider::setThumbWidth ( int  w)

Change the width of the thumb.

Parámetros:
wnew width
QSize QwtSlider::sizeHint ( ) const [virtual]
Devuelve:
QwtSlider::minimumSizeHint()

Reimplementado de QWidget.

int QwtSlider::thumbLength ( ) const
int QwtSlider::thumbWidth ( ) const
void QwtSlider::valueChange ( ) [protected, virtual]

Notify change of value.

Reimplementado de QwtAbstractSlider.

int QwtSlider::xyPosition ( double  v) const [protected]

Find the x/y position for a given value v.


Documentación de propiedades

QwtSlider::BGSTYLE QwtSlider::bgStyle [read, write]
Devuelve:
the background style.
int QwtSlider::borderWidth [read, write]
Devuelve:
the border width.
QwtSlider::ScalePos QwtSlider::scalePosition [read, write]

Return the scale position.

int QwtSlider::thumbLength [read, write]
Devuelve:
the thumb length.
int QwtSlider::thumbWidth [read, write]
Devuelve:
the thumb width.

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'