Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos protegidos
Referencia de la Clase QAquaFocusWidget

#include <qaquastyle_p.h>

Diagrama de herencias de QAquaFocusWidget
QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject

Lista de todos los miembros.

Métodos públicos

 QAquaFocusWidget (bool noerase=TRUE, QWidget *w=NULL)
 ~QAquaFocusWidget ()
void setFocusWidget (QWidget *widget)
QWidgetwidget ()
QSize sizeHint ()
 QAquaFocusWidget (bool noerase=TRUE, QWidget *w=NULL)
 ~QAquaFocusWidget ()
void setFocusWidget (QWidget *widget)
QWidgetwidget ()
QSize sizeHint ()

Métodos protegidos

bool eventFilter (QObject *o, QEvent *e)
virtual void paintEvent (QPaintEvent *)=0
virtual int focusOutset ()
virtual QRegion focusRegion ()
bool eventFilter (QObject *o, QEvent *e)
virtual void paintEvent (QPaintEvent *)=0
virtual int focusOutset ()
virtual QRegion focusRegion ()

Documentación del constructor y destructor

QAquaFocusWidget::QAquaFocusWidget ( bool  noerase = TRUE,
QWidget w = NULL 
)
QAquaFocusWidget::~QAquaFocusWidget ( ) [inline]
QAquaFocusWidget::QAquaFocusWidget ( bool  noerase = TRUE,
QWidget w = NULL 
)
QAquaFocusWidget::~QAquaFocusWidget ( ) [inline]

Documentación de las funciones miembro

bool QAquaFocusWidget::eventFilter ( QObject ,
QEvent  
) [protected, virtual]

Filters events if this object has been installed as an event filter for the watched object.

In your reimplementation of this function, if you want to filter the event e, out, i.e. stop it being handled further, return TRUE; otherwise return FALSE.

Example:

    class MyMainWindow : public QMainWindow
    {
    public:
        MyMainWindow( QWidget *parent = 0, const char *name = 0 );

    protected:
        bool eventFilter( QObject *obj, QEvent *ev );

    private:
        QTextEdit *textEdit;
    };

    MyMainWindow::MyMainWindow( QWidget *parent, const char *name )
        : QMainWindow( parent, name )
    {
        textEdit = new QTextEdit( this );
        setCentralWidget( textEdit );
        textEdit->installEventFilter( this );
    }

    bool MyMainWindow::eventFilter( QObject *obj, QEvent *ev )
    {
        if ( obj == textEdit ) {
            if ( e->type() == QEvent::KeyPress ) {
                QKeyEvent *k = (QKeyEvent*)ev;
                qDebug( "Ate key press %d", k->key() );
                return TRUE;
            } else {
                return FALSE;
            }
        } else {
            // pass the event on to the parent class
            return QMainWindow::eventFilter( obj, ev );
        }
    }

Notice in the example above that unhandled events are passed to the base class's eventFilter() function, since the base class might have reimplemented eventFilter() for its own internal purposes.

Atención:
If you delete the receiver object in this function, be sure to return TRUE. Otherwise, Qt will forward the event to the deleted object and the program might crash.
Ver también:
installEventFilter()

Reimplementado de QObject.

bool QAquaFocusWidget::eventFilter ( QObject ,
QEvent  
) [protected, virtual]

Filters events if this object has been installed as an event filter for the watched object.

In your reimplementation of this function, if you want to filter the event e, out, i.e. stop it being handled further, return TRUE; otherwise return FALSE.

Example:

    class MyMainWindow : public QMainWindow
    {
    public:
        MyMainWindow( QWidget *parent = 0, const char *name = 0 );

    protected:
        bool eventFilter( QObject *obj, QEvent *ev );

    private:
        QTextEdit *textEdit;
    };

    MyMainWindow::MyMainWindow( QWidget *parent, const char *name )
        : QMainWindow( parent, name )
    {
        textEdit = new QTextEdit( this );
        setCentralWidget( textEdit );
        textEdit->installEventFilter( this );
    }

    bool MyMainWindow::eventFilter( QObject *obj, QEvent *ev )
    {
        if ( obj == textEdit ) {
            if ( e->type() == QEvent::KeyPress ) {
                QKeyEvent *k = (QKeyEvent*)ev;
                qDebug( "Ate key press %d", k->key() );
                return TRUE;
            } else {
                return FALSE;
            }
        } else {
            // pass the event on to the parent class
            return QMainWindow::eventFilter( obj, ev );
        }
    }

Notice in the example above that unhandled events are passed to the base class's eventFilter() function, since the base class might have reimplemented eventFilter() for its own internal purposes.

Atención:
If you delete the receiver object in this function, be sure to return TRUE. Otherwise, Qt will forward the event to the deleted object and the program might crash.
Ver también:
installEventFilter()

Reimplementado de QObject.

virtual int QAquaFocusWidget::focusOutset ( ) [inline, protected, virtual]
virtual int QAquaFocusWidget::focusOutset ( ) [inline, protected, virtual]
virtual QRegion QAquaFocusWidget::focusRegion ( ) [inline, protected, virtual]
virtual QRegion QAquaFocusWidget::focusRegion ( ) [inline, protected, virtual]
virtual void QAquaFocusWidget::paintEvent ( QPaintEvent ) [protected, pure 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.

virtual void QAquaFocusWidget::paintEvent ( QPaintEvent ) [protected, pure 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 QAquaFocusWidget::setFocusWidget ( QWidget widget)
void QAquaFocusWidget::setFocusWidget ( QWidget widget)
QSize QAquaFocusWidget::sizeHint ( ) [inline]
QSize QAquaFocusWidget::sizeHint ( ) [inline]
QWidget* QAquaFocusWidget::widget ( ) [inline]
QWidget* QAquaFocusWidget::widget ( ) [inline]

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'