Eneboo - Documentación para desarrolladores
Slots públicos | Señales | Métodos públicos | Métodos protegidos | Amigas
Referencia de la Clase QWorkspaceChild
Diagrama de herencias de QWorkspaceChild
QFrame QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject

Lista de todos los miembros.

Slots públicos

void activate ()
void showMinimized ()
void showMaximized ()
void showNormal ()
void showShaded ()
void setCaption (const QString &)
void internalRaise ()
void titleBarDoubleClicked ()
void move (int x, int y)

Señales

void showOperationMenu ()
void popupOperationMenu (const QPoint &)

Métodos públicos

 QWorkspaceChild (QWidget *window, QWorkspace *parent=0, const char *name=0)
 ~QWorkspaceChild ()
void setActive (bool)
bool isActive () const
void adjustToFullscreen ()
void setStatusBar (QStatusBar *)
QWidgetwindowWidget () const
QWidgeticonWidget () const
void doResize ()
void doMove ()
QSize sizeHint () const
QSize minimumSizeHint () const
QSize baseSize () const

Métodos protegidos

bool event (QEvent *)
void enterEvent (QEvent *)
void leaveEvent (QEvent *)
void childEvent (QChildEvent *)
void resizeEvent (QResizeEvent *)
void moveEvent (QMoveEvent *)
bool eventFilter (QObject *, QEvent *)
bool focusNextPrevChild (bool)
void drawFrame (QPainter *)
void styleChange (QStyle &)

Amigas

class QWorkspace
class QTitleBar

Documentación del constructor y destructor

QWorkspaceChild::QWorkspaceChild ( QWidget window,
QWorkspace parent = 0,
const char *  name = 0 
)
QWorkspaceChild::~QWorkspaceChild ( )

Documentación de las funciones miembro

void QWorkspaceChild::activate ( ) [slot]
void QWorkspaceChild::adjustToFullscreen ( )
QSize QWorkspaceChild::baseSize ( ) const

Reimplementado de QWidget.

void QWorkspaceChild::childEvent ( QChildEvent ) [protected, virtual]

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

Child events are sent to objects when children are inserted or removed.

Note that events with QEvent::type() QEvent::ChildInserted are posted (with {QApplication::postEvent()}) to make sure that the child's construction is completed before this function is called.

If a child is removed immediately after it is inserted, the ChildInserted event may be suppressed, but the ChildRemoved event will always be sent. In such cases it is possible that there will be a ChildRemoved event without a corresponding ChildInserted event.

If you change state based on ChildInserted events, call QWidget::constPolish(), or do

in functions that depend on the state. One notable example is QWidget::sizeHint().

Ver también:
event(), QChildEvent

Reimplementado de QObject.

void QWorkspaceChild::doMove ( )
void QWorkspaceChild::doResize ( )
void QWorkspaceChild::drawFrame ( QPainter p) [protected, virtual]

Draws the frame using the painter p and the current frame attributes and color group. The rectangle inside the frame is not affected.

This function is virtual, but in general you do not need to reimplement it. If you do, note that the QPainter is already open and must remain open.

Ver también:
frameRect(), contentsRect(), drawContents(), frameStyle(), setPalette()

Reimplementado de QFrame.

void QWorkspaceChild::enterEvent ( QEvent ) [protected, virtual]

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

An event is sent to the widget when the mouse cursor enters the widget.

Ver también:
leaveEvent(), mouseMoveEvent(), event()

Reimplementado de QWidget.

bool QWorkspaceChild::event ( QEvent e) [protected, virtual]

This is the main event handler; it handles event e. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.

The main event handler first passes an event through all event filters that have been installed. If none of the filters intercept the event, it calls one of the specialized event handlers.

Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls keyPressEvent().

This function returns TRUE if it is able to pass the event over to someone (i.e. someone wanted the event); otherwise returns FALSE.

Ver también:
closeEvent(), focusInEvent(), focusOutEvent(), enterEvent(), keyPressEvent(), keyReleaseEvent(), leaveEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveEvent(), paintEvent(), resizeEvent(), QObject::event(), QObject::timerEvent()

Reimplementado de QWidget.

bool QWorkspaceChild::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 QWorkspaceChild::focusNextPrevChild ( bool  next) [protected, virtual]

Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns TRUE if is can find a new widget and FALSE if it can't,

If next is TRUE, this function searches "forwards", if next is FALSE, it searches "backwards".

Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its "current active link" forwards or backwards, and call QWidget::focusNextPrevChild() only when it reaches the last or first link on the "page".

Child widgets call focusNextPrevChild() on their parent widgets, but only the top-level widget decides where to redirect focus. By overriding this method for an object, you thus gain control of focus traversal for all child widgets.

Atención:
QScrollView uses it own logic for this function, which does the right thing in most cases. But if you are using a QScrollView and want complete control of the focus chain you'll need to override QScrollView::focusNextPrevChild() and your top-level widgets' focusNextPrevChild() functions.
Ver también:
focusData()

Reimplementado de QWidget.

QWidget * QWorkspaceChild::iconWidget ( ) const
void QWorkspaceChild::internalRaise ( ) [slot]
bool QWorkspaceChild::isActive ( ) const
void QWorkspaceChild::leaveEvent ( QEvent ) [protected, virtual]

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

A leave event is sent to the widget when the mouse cursor leaves the widget.

Ver también:
enterEvent(), mouseMoveEvent(), event()

Reimplementado de QWidget.

QSize QWorkspaceChild::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

void QWorkspaceChild::move ( int  x,
int  y 
) [virtual, slot]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. This corresponds to move( QPoint(x, y) ).

Reimplementado de QWidget.

void QWorkspaceChild::moveEvent ( QMoveEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget move events. When the widget receives this event, it is already at the new position.

The old position is accessible through QMoveEvent::oldPos().

Ver también:
resizeEvent(), event(), move(), QMoveEvent

Reimplementado de QWidget.

void QWorkspaceChild::popupOperationMenu ( const QPoint ) [signal]
void QWorkspaceChild::resizeEvent ( QResizeEvent e) [protected, virtual]

Processes the resize event e.

Adjusts the frame rectangle for the resized widget. The frame rectangle is elastic, and the surrounding area is static.

The resulting frame rectangle may be null or invalid. You can use setMinimumSize() to avoid those possibilities.

Nothing is done if the frame rectangle is a null rectangle already.

Reimplementado de QFrame.

void QWorkspaceChild::setActive ( bool  b)
void QWorkspaceChild::setCaption ( const QString caption) [virtual, slot]

Sets the window caption (title) to caption.

Ver también:
caption(), setIcon(), setIconText()

Reimplementado de QWidget.

void QWorkspaceChild::setStatusBar ( QStatusBar sb)
void QWorkspaceChild::showMaximized ( ) [virtual, slot]

Shows the widget maximized.

Calling this function only affects top-level widgets.

On X11, this function may not work properly with certain window managers. See the Window Geometry documentation for an explanation.

Ver también:
setWindowState(), showNormal(), showMinimized(), show(), hide(), isVisible()

Reimplementado de QWidget.

void QWorkspaceChild::showMinimized ( ) [virtual, slot]

Shows the widget minimized, as an icon.

Calling this function only affects top-level widgets.

Ver también:
showNormal(), showMaximized(), show(), hide(), isVisible(), isMinimized()

Reimplementado de QWidget.

void QWorkspaceChild::showNormal ( ) [virtual, slot]

Restores the widget after it has been maximized or minimized.

Calling this function only affects top-level widgets.

Ver también:
setWindowState(), showMinimized(), showMaximized(), show(), hide(), isVisible()

Reimplementado de QWidget.

void QWorkspaceChild::showOperationMenu ( ) [signal]
void QWorkspaceChild::showShaded ( ) [slot]
QSize QWorkspaceChild::sizeHint ( ) const [virtual]

Reimplementado de QFrame.

void QWorkspaceChild::styleChange ( QStyle old) [protected, virtual]

Reimplementado de QFrame.

void QWorkspaceChild::titleBarDoubleClicked ( ) [slot]
QWidget * QWorkspaceChild::windowWidget ( ) const

Documentación de las funciones relacionadas y clases amigas

friend class QTitleBar [friend]
friend class QWorkspace [friend]

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