The Slider Widget.
Más...
#include <qwt_slider.h>
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 QwtScaleDraw * | scaleDraw () 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.
|
QwtScaleDraw * | scaleDraw () |
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.
- Ver también:
- QwtAbstractSlider and QwtAbstractScale for the descriptions of the inherited members.
Documentación de las enumeraciones miembro de la clase
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
Constructor.
- Parámetros:
-
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:
-
parent | parent widget |
name | Object 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] |
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:
-
p | point |
scrollMode | Scrolling mode |
direction | Direction |
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_geometry | notify the layout system and call update to redraw the scale |
QSize QwtSlider::minimumSizeHint |
( |
| ) |
const [virtual] |
void QwtSlider::paintEvent |
( |
QPaintEvent * |
e | ) |
[protected, virtual] |
void QwtSlider::rangeChange |
( |
| ) |
[protected, virtual] |
void QwtSlider::resizeEvent |
( |
QResizeEvent * |
e | ) |
[protected, virtual] |
void QwtSlider::scaleChange |
( |
| ) |
[protected, virtual] |
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:
-
void QwtSlider::setMargins |
( |
int |
xMargin, |
|
|
int |
yMargin |
|
) |
| |
Set distances between the widget's border and internals.
- Parámetros:
-
xMargin | Horizontal margin |
yMargin | Vertical margin |
Set a scale draw.
For changing the labels of the scales, it is necessary to derive from QwtScaleDraw and overload QwtScaleDraw::label().
- Parámetros:
-
scaleDraw | ScaleDraw 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:
-
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:
-
void QwtSlider::setThumbWidth |
( |
int |
w | ) |
|
Change the width of the thumb.
- Parámetros:
-
QSize QwtSlider::sizeHint |
( |
| ) |
const [virtual] |
int QwtSlider::thumbLength |
( |
| ) |
const |
int QwtSlider::thumbWidth |
( |
| ) |
const |
void QwtSlider::valueChange |
( |
| ) |
[protected, virtual] |
int QwtSlider::xyPosition |
( |
double |
v | ) |
const [protected] |
Find the x/y position for a given value v.
Documentación de propiedades
- Devuelve:
- the background style.
int QwtSlider::borderWidth [read, write] |
- Devuelve:
- the border width.
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: