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

#include <qtitlebar_p.h>

Diagrama de herencias de QTitleBar
QWidget QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QDockWindowTitleBar

Lista de todos los miembros.

Slots públicos

void setActive (bool)
void setCaption (const QString &title)
void setIcon (const QPixmap &icon)
void setActive (bool)
void setCaption (const QString &title)
void setIcon (const QPixmap &icon)

Señales

void doActivate ()
void doNormal ()
void doClose ()
void doMaximize ()
void doMinimize ()
void doShade ()
void showOperationMenu ()
void popupOperationMenu (const QPoint &)
void doubleClicked ()
void doActivate ()
void doNormal ()
void doClose ()
void doMaximize ()
void doMinimize ()
void doShade ()
void showOperationMenu ()
void popupOperationMenu (const QPoint &)
void doubleClicked ()

Métodos públicos

bool isActive () const
QWidgetwindow () const
 QTitleBar (QWidget *w, QWidget *parent, const char *name=0)
 ~QTitleBar ()
bool isActive () const
bool usesActiveColor () const
virtual QString visibleText () const
bool isMovable () const
void setMovable (bool)
bool autoRaise () const
void setAutoRaise (bool)
QWidgetwindow () const
QSize sizeHint () const
 QTitleBar (QWidget *w, QWidget *parent, const char *name=0)
 ~QTitleBar ()
bool isActive () const
bool usesActiveColor () const
virtual QString visibleText () const
bool isMovable () const
void setMovable (bool)
bool autoRaise () const
void setAutoRaise (bool)
QWidgetwindow () const
QSize sizeHint () const

Métodos protegidos

bool event (QEvent *)
void resizeEvent (QResizeEvent *)
void contextMenuEvent (QContextMenuEvent *)
void mousePressEvent (QMouseEvent *)
void mouseDoubleClickEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void enterEvent (QEvent *e)
void leaveEvent (QEvent *e)
void paintEvent (QPaintEvent *p)
virtual void cutText ()
bool event (QEvent *)
void resizeEvent (QResizeEvent *)
void contextMenuEvent (QContextMenuEvent *)
void mousePressEvent (QMouseEvent *)
void mouseDoubleClickEvent (QMouseEvent *)
void mouseReleaseEvent (QMouseEvent *)
void mouseMoveEvent (QMouseEvent *)
void enterEvent (QEvent *e)
void leaveEvent (QEvent *e)
void paintEvent (QPaintEvent *p)
virtual void cutText ()

Propiedades

bool autoRaise
bool movable

Documentación del constructor y destructor

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

Documentación de las funciones miembro

bool QTitleBar::autoRaise ( ) const
bool QTitleBar::autoRaise ( ) const
void QTitleBar::contextMenuEvent ( QContextMenuEvent e) [protected, virtual]

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

The default implementation calls e->ignore(), which rejects the context event. See the QContextMenuEvent documentation for more details.

Ver también:
event(), QContextMenuEvent

Reimplementado de QWidget.

void QTitleBar::contextMenuEvent ( QContextMenuEvent e) [protected, virtual]

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

The default implementation calls e->ignore(), which rejects the context event. See the QContextMenuEvent documentation for more details.

Ver también:
event(), QContextMenuEvent

Reimplementado de QWidget.

virtual void QTitleBar::cutText ( ) [protected, virtual]
void QTitleBar::cutText ( ) [protected, virtual]
void QTitleBar::doActivate ( ) [signal]
void QTitleBar::doActivate ( ) [signal]
void QTitleBar::doClose ( ) [signal]
void QTitleBar::doClose ( ) [signal]
void QTitleBar::doMaximize ( ) [signal]
void QTitleBar::doMaximize ( ) [signal]
void QTitleBar::doMinimize ( ) [signal]
void QTitleBar::doMinimize ( ) [signal]
void QTitleBar::doNormal ( ) [signal]
void QTitleBar::doNormal ( ) [signal]
void QTitleBar::doShade ( ) [signal]
void QTitleBar::doShade ( ) [signal]
void QTitleBar::doubleClicked ( ) [signal]
void QTitleBar::doubleClicked ( ) [signal]
void QTitleBar::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.

void QTitleBar::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 QTitleBar::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 QTitleBar::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 QTitleBar::isActive ( ) const
bool QTitleBar::isActive ( ) const
bool QTitleBar::isActive ( ) const
bool QTitleBar::isMovable ( ) const
bool QTitleBar::isMovable ( ) const
void QTitleBar::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.

void QTitleBar::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.

void QTitleBar::mouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

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

The default implementation generates a normal mouse press event.

Note that the widgets gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent().

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

Reimplementado de QWidget.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::mouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

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

The default implementation generates a normal mouse press event.

Note that the widgets gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent().

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

Reimplementado de QWidget.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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 QTitleBar::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 QTitleBar::popupOperationMenu ( const QPoint t0) [signal]
void QTitleBar::popupOperationMenu ( const QPoint ) [signal]
void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

void QTitleBar::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.

Reimplementado en QDockWindowTitleBar.

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

Sets the window caption (title) to caption.

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

Reimplementado de QWidget.

void QTitleBar::setCaption ( const QString caption) [virtual, slot]

Sets the window caption (title) to caption.

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

Reimplementado de QWidget.

void QTitleBar::setIcon ( const QPixmap pixmap) [virtual, slot]

Sets the window icon to pixmap.

Ver también:
icon(), setIconText(), setCaption(), Setting the Application Icon

Reimplementado de QWidget.

void QTitleBar::setIcon ( const QPixmap pixmap) [virtual, slot]

Sets the window icon to pixmap.

Ver también:
icon(), setIconText(), setCaption(), Setting the Application Icon

Reimplementado de QWidget.

void QTitleBar::setMovable ( bool  )
void QTitleBar::setMovable ( bool  b)
void QTitleBar::showOperationMenu ( ) [signal]
void QTitleBar::showOperationMenu ( ) [signal]
QSize QTitleBar::sizeHint ( ) const [virtual]

Reimplementado de QWidget.

QSize QTitleBar::sizeHint ( ) const [virtual]

Reimplementado de QWidget.

bool QTitleBar::usesActiveColor ( ) const
bool QTitleBar::usesActiveColor ( ) const
virtual QString QTitleBar::visibleText ( ) const [virtual]
QString QTitleBar::visibleText ( ) const [virtual]
QWidget* QTitleBar::window ( ) const
QWidget* QTitleBar::window ( ) const
QWidget * QTitleBar::window ( ) const

Documentación de propiedades

bool QTitleBar::autoRaise [read, write]
bool QTitleBar::movable [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'