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

#include <layout.h>

Diagrama de herencias de Spacer
QWidget QObject QPaintDevice QObject QPaintDevice Qt Qt Qt Qt

Lista de todos los miembros.

Tipos públicos

enum  SizeType {
  Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow|MayShrink,
  MinimumExpanding = Minimum|ExpMask, Expanding = MinimumExpanding|MayShrink
}

Métodos públicos

 Spacer (QWidget *parent, const char *name)
QSize minimumSize () const
QSize sizeHint () const
void setSizeType (SizeType t)
SizeType sizeType () const
int alignment () const
Orientation orientation () const
void setOrientation (Orientation o)
void setInteraciveMode (bool b)
void setSizeHint (const QSize &s)

Métodos protegidos

void paintEvent (QPaintEvent *e)
void resizeEvent (QResizeEvent *e)
void updateMask ()

Atributos protegidos

Qt::Orientation orient
bool interactive
QSize sh

Propiedades

Orientation orientation
SizeType sizeType
QSize sizeHint
 the recommended size for the widget

Documentación de las enumeraciones miembro de la clase

Valores de enumeraciones:
Fixed 
Minimum 
Maximum 
Preferred 
MinimumExpanding 
Expanding 

Documentación del constructor y destructor

Spacer::Spacer ( QWidget parent,
const char *  name 
)

Documentación de las funciones miembro

int Spacer::alignment ( ) const
QSize Spacer::minimumSize ( ) const

Reimplementado de QWidget.

Orientation Spacer::orientation ( ) const
void Spacer::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 Spacer::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 Spacer::setInteraciveMode ( bool  b) [inline]
void Spacer::setOrientation ( Qt::Orientation  o)
void Spacer::setSizeHint ( const QSize s)
void Spacer::setSizeType ( SizeType  t)
QSize Spacer::sizeHint ( ) const [virtual]

Reimplementado de QWidget.

SizeType Spacer::sizeType ( ) const
void Spacer::updateMask ( ) [protected, virtual]

This function can be reimplemented in a subclass to support transparent widgets. It should be called whenever a widget changes state in a way that means that the shape mask must be recalculated.

Ver también:
setAutoMask(), updateMask(), setMask(), clearMask()

Reimplementado de QWidget.


Documentación de los datos miembro

QSize Spacer::sh [protected]

Documentación de propiedades

Qt::Orientation Spacer::orientation [read, write]
QSize Spacer::sizeHint [read, write]

the recommended size for the widget

If the value of this property is an invalid size, no size is recommended.

The default implementation of sizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's preferred size otherwise.

Ver también:
QSize::isValid(), minimumSizeHint(), sizePolicy(), setMinimumSize(), updateGeometry()

Reimplementado de QWidget.

Spacer::SizeType Spacer::sizeType [read, write]

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'