Eneboo - Documentación para desarrolladores
Tipos públicos | Slots públicos | Señales | Métodos públicos | Métodos protegidos
Referencia de la Clase QSpinWidget

The QSpinWidget class is an internal range control related class. Más...

#include <qrangecontrol.h>

Diagrama de herencias de QSpinWidget
QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QDateTimeSpinWidget

Lista de todos los miembros.

Tipos públicos

enum  ButtonSymbols { UpDownArrows, PlusMinus, UpDownArrows, PlusMinus }
enum  ButtonSymbols { UpDownArrows, PlusMinus, UpDownArrows, PlusMinus }

Slots públicos

void stepUp ()
void stepDown ()
void stepUp ()
void stepDown ()

Señales

void stepUpPressed ()
void stepDownPressed ()
void stepUpPressed ()
void stepDownPressed ()

Métodos públicos

 QSpinWidget (QWidget *parent=0, const char *name=0)
 ~QSpinWidget ()
void setEditWidget (QWidget *widget)
QWidgeteditWidget ()
QRect upRect () const
QRect downRect () const
void setUpEnabled (bool on)
void setDownEnabled (bool on)
bool isUpEnabled () const
bool isDownEnabled () const
virtual void setButtonSymbols (ButtonSymbols bs)
ButtonSymbols buttonSymbols () const
void arrange ()
 QSpinWidget (QWidget *parent=0, const char *name=0)
 ~QSpinWidget ()
void setEditWidget (QWidget *widget)
QWidgeteditWidget ()
QRect upRect () const
QRect downRect () const
void setUpEnabled (bool on)
void setDownEnabled (bool on)
bool isUpEnabled () const
bool isDownEnabled () const
virtual void setButtonSymbols (ButtonSymbols bs)
ButtonSymbols buttonSymbols () const
void arrange ()

Métodos protegidos

void mousePressEvent (QMouseEvent *e)
void resizeEvent (QResizeEvent *ev)
void mouseReleaseEvent (QMouseEvent *e)
void mouseMoveEvent (QMouseEvent *e)
void wheelEvent (QWheelEvent *)
void styleChange (QStyle &)
void paintEvent (QPaintEvent *)
void enableChanged (bool old)
void windowActivationChange (bool)
void mousePressEvent (QMouseEvent *e)
void resizeEvent (QResizeEvent *ev)
void mouseReleaseEvent (QMouseEvent *e)
void mouseMoveEvent (QMouseEvent *e)
void wheelEvent (QWheelEvent *)
void styleChange (QStyle &)
void paintEvent (QPaintEvent *)
void enableChanged (bool old)
void windowActivationChange (bool)

Descripción detallada

The QSpinWidget class is an internal range control related class.


Documentación de las enumeraciones miembro de la clase

Valores de enumeraciones:
UpDownArrows 
PlusMinus 
UpDownArrows 
PlusMinus 
Valores de enumeraciones:
UpDownArrows 
PlusMinus 
UpDownArrows 
PlusMinus 

Documentación del constructor y destructor

QSpinWidget::QSpinWidget ( QWidget parent = 0,
const char *  name = 0 
)
QSpinWidget::~QSpinWidget ( )

Destroys the object and frees any allocated resources.

QSpinWidget::QSpinWidget ( QWidget parent = 0,
const char *  name = 0 
)
QSpinWidget::~QSpinWidget ( )

Documentación de las funciones miembro

void QSpinWidget::arrange ( )
void QSpinWidget::arrange ( )
QSpinWidget::ButtonSymbols QSpinWidget::buttonSymbols ( ) const
ButtonSymbols QSpinWidget::buttonSymbols ( ) const
QRect QSpinWidget::downRect ( ) const
QRect QSpinWidget::downRect ( ) const
QWidget * QSpinWidget::editWidget ( )
QWidget* QSpinWidget::editWidget ( )
void QSpinWidget::enableChanged ( bool  old) [protected]
void QSpinWidget::enableChanged ( bool  old) [protected]

The previous enabled state is passed in old.

bool QSpinWidget::isDownEnabled ( ) const
bool QSpinWidget::isDownEnabled ( ) const
bool QSpinWidget::isUpEnabled ( ) const
bool QSpinWidget::isUpEnabled ( ) const
void QSpinWidget::mouseMoveEvent ( QMouseEvent e) [protected, virtual]

The event is passed in e.

Reimplementado de QWidget.

void QSpinWidget::mouseMoveEvent ( QMouseEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive mouse move events for the widget.

If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.

QMouseEvent::pos() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt.

Ver también:
setMouseTracking(), mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), event(), QMouseEvent

Reimplementado de QWidget.

void QSpinWidget::mousePressEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QWidget.

void QSpinWidget::mousePressEvent ( QMouseEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive mouse press events for the widget.

If you create new widgets in the mousePressEvent() the mouseReleaseEvent() may not end up where you expect, depending on the underlying window system (or X11 window manager), the widgets' location and maybe more.

The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.

Ver también:
mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), QMouseEvent

Reimplementado de QWidget.

void QSpinWidget::mouseReleaseEvent ( QMouseEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive mouse release events for the widget.

Ver también:
mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), event(), QMouseEvent

Reimplementado de QWidget.

void QSpinWidget::mouseReleaseEvent ( QMouseEvent e) [protected, virtual]

The event is passed in e.

Reimplementado de QWidget.

void QSpinWidget::paintEvent ( QPaintEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive paint events.

A paint event is a request to repaint all or part of the widget. It can happen as a result of repaint() or update(), or because the widget was obscured and has now been uncovered, or for many other reasons.

Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: QPaintEvent::region(). This speed optimization does not change the result, as painting is clipped to that region during event processing. QListView and QCanvas do this, for example.

Qt also tries to speed up painting by merging multiple paint events into one. When update() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see QRegion::unite()). repaint() does not permit this optimization, so we suggest using update() when possible.

When the paint event occurs, the update region has normally been erased, so that you're painting on the widget's background. There are a couple of exceptions and QPaintEvent::erased() tells you whether the widget has been erased or not.

The background can be set using setBackgroundMode(), setPaletteBackgroundColor() or setBackgroundPixmap(). The documentation for setBackgroundMode() elaborates on the background; we recommend reading it.

Ver también:
event(), repaint(), update(), QPainter, QPixmap, QPaintEvent

Reimplementado de QWidget.

void QSpinWidget::paintEvent ( QPaintEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive paint events.

A paint event is a request to repaint all or part of the widget. It can happen as a result of repaint() or update(), or because the widget was obscured and has now been uncovered, or for many other reasons.

Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: QPaintEvent::region(). This speed optimization does not change the result, as painting is clipped to that region during event processing. QListView and QCanvas do this, for example.

Qt also tries to speed up painting by merging multiple paint events into one. When update() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see QRegion::unite()). repaint() does not permit this optimization, so we suggest using update() when possible.

When the paint event occurs, the update region has normally been erased, so that you're painting on the widget's background. There are a couple of exceptions and QPaintEvent::erased() tells you whether the widget has been erased or not.

The background can be set using setBackgroundMode(), setPaletteBackgroundColor() or setBackgroundPixmap(). The documentation for setBackgroundMode() elaborates on the background; we recommend reading it.

Ver también:
event(), repaint(), update(), QPainter, QPixmap, QPaintEvent

Reimplementado de QWidget.

void QSpinWidget::resizeEvent ( QResizeEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget resize events. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through QResizeEvent::oldSize().

The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.

Widgets that have been created with the WNoAutoErase flag will not be erased. Nevertheless, they will receive a paint event for their entire area afterwards. Again, no drawing needs to be done inside this handler.

The default implementation calls updateMask() if the widget has automatic masking enabled.

Ver también:
moveEvent(), event(), resize(), QResizeEvent, paintEvent()

Reimplementado de QWidget.

void QSpinWidget::resizeEvent ( QResizeEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget resize events. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through QResizeEvent::oldSize().

The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.

Widgets that have been created with the WNoAutoErase flag will not be erased. Nevertheless, they will receive a paint event for their entire area afterwards. Again, no drawing needs to be done inside this handler.

The default implementation calls updateMask() if the widget has automatic masking enabled.

Ver también:
moveEvent(), event(), resize(), QResizeEvent, paintEvent()

Reimplementado de QWidget.

virtual void QSpinWidget::setButtonSymbols ( ButtonSymbols  bs) [virtual]
void QSpinWidget::setButtonSymbols ( ButtonSymbols  bs) [virtual]

Sets the button symbol to bs.

void QSpinWidget::setDownEnabled ( bool  on)

Sets down-enabled to on.

void QSpinWidget::setDownEnabled ( bool  on)
void QSpinWidget::setEditWidget ( QWidget w)

Sets the editing widget to w.

void QSpinWidget::setEditWidget ( QWidget widget)
void QSpinWidget::setUpEnabled ( bool  on)

Sets up-enabled to on.

void QSpinWidget::setUpEnabled ( bool  on)
void QSpinWidget::stepDown ( ) [slot]
void QSpinWidget::stepDown ( ) [slot]
void QSpinWidget::stepDownPressed ( ) [signal]
void QSpinWidget::stepDownPressed ( ) [signal]
void QSpinWidget::stepUp ( ) [slot]
void QSpinWidget::stepUp ( ) [slot]
void QSpinWidget::stepUpPressed ( ) [signal]
void QSpinWidget::stepUpPressed ( ) [signal]
void QSpinWidget::styleChange ( QStyle old) [protected, virtual]

The previous style is passed in old.

Reimplementado de QWidget.

void QSpinWidget::styleChange ( QStyle ) [protected, virtual]

This virtual function is called when the style of the widgets changes. oldStyle is the previous GUI style; you can get the new style from style().

Reimplement this function if your widget needs to know when its GUI style changes. You will almost certainly need to update the widget using update().

The default implementation updates the widget including its geometry.

Ver también:
QApplication::setStyle(), style(), update(), updateGeometry()

Reimplementado de QWidget.

QRect QSpinWidget::upRect ( ) const
QRect QSpinWidget::upRect ( ) const
void QSpinWidget::wheelEvent ( QWheelEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive wheel events for the widget.

If you reimplement this handler, it is very important that you ignore() the event if you do not handle it, so that the widget's parent can interpret it.

The default implementation ignores the event.

Ver también:
QWheelEvent::ignore(), QWheelEvent::accept(), event(), QWheelEvent

Reimplementado de QWidget.

Reimplementado en QDateTimeSpinWidget.

void QSpinWidget::wheelEvent ( QWheelEvent e) [protected, virtual]

The event is passed in e.

Reimplementado de QWidget.

Reimplementado en QDateTimeSpinWidget.

void QSpinWidget::windowActivationChange ( bool  oldActive) [protected, virtual]

This virtual function is called for a widget when its window is activated or deactivated by the window system. oldActive is the previous state; you can get the new setting from isActiveWindow().

Reimplement this function if your widget needs to know when its window becomes activated or deactivated.

The default implementation updates the visible part of the widget if the inactive and the active colorgroup are different for colors other than the highlight and link colors.

Ver también:
setActiveWindow(), isActiveWindow(), update(), palette()

Reimplementado de QWidget.

void QSpinWidget::windowActivationChange ( bool  oldActive) [protected, virtual]

This virtual function is called for a widget when its window is activated or deactivated by the window system. oldActive is the previous state; you can get the new setting from isActiveWindow().

Reimplement this function if your widget needs to know when its window becomes activated or deactivated.

The default implementation updates the visible part of the widget if the inactive and the active colorgroup are different for colors other than the highlight and link colors.

Ver también:
setActiveWindow(), isActiveWindow(), update(), palette()

Reimplementado de QWidget.


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'