Eneboo - Documentación para desarrolladores
|
Señales | |
void | doubleClicked () |
Métodos públicos | |
QDockWindowHandle (QDockWindow *dw) | |
void | updateGui () |
QSize | minimumSizeHint () const |
QSize | minimumSize () const |
QSize | sizeHint () const |
QSizePolicy | sizePolicy () const |
void | setOpaqueMoving (bool b) |
QString | caption () const |
Métodos protegidos | |
void | paintEvent (QPaintEvent *e) |
void | resizeEvent (QResizeEvent *e) |
void | mousePressEvent (QMouseEvent *e) |
void | mouseMoveEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *e) |
void | mouseDoubleClickEvent (QMouseEvent *e) |
void | keyPressEvent (QKeyEvent *e) |
void | keyReleaseEvent (QKeyEvent *e) |
void | styleChange (QStyle &) |
Propiedades | |
QString | caption |
the window caption (title) | |
Amigas | |
class | QDockWindow |
class | QDockWindowTitleBar |
QDockWindowHandle::QDockWindowHandle | ( | QDockWindow * | dw | ) |
void QDockWindowHandle::doubleClicked | ( | ) | [signal] |
void QDockWindowHandle::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive key press events for the widget.
A widget must call setFocusPolicy() to accept focus initially and have focus in order to receive a key press event.
If you reimplement this handler, it is very important that you explicitly ignore the event if you do not understand it, so that the widget's parent can interpret it; otherwise, the event will be implicitly accepted. Although top-level widgets are able to choose whether to accept or ignore unknown events because they have no parent widgets that could otherwise handle them, it is good practice to explicitly ignore events to make widgets as reusable as possible.
The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored.
Reimplementado de QWidget.
void QDockWindowHandle::keyReleaseEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
This event handler, for event e, can be reimplemented in a subclass to receive key release events for the widget.
A widget must accept focus initially and have focus in order to receive a key release event.
If you reimplement this handler, it is very important that you ignore() the release if you do not understand it, so that the widget's parent can interpret it.
The default implementation ignores the event.
Reimplementado de QWidget.
void QDockWindowHandle::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().
Reimplementado de QWidget.
void QDockWindowHandle::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.
Reimplementado de QWidget.
void QDockWindowHandle::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.
Reimplementado de QWidget.
void QDockWindowHandle::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.
Reimplementado de QWidget.
void QDockWindowHandle::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.
Reimplementado de QWidget.
void QDockWindowHandle::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.
Reimplementado de QWidget.
void QDockWindowHandle::setOpaqueMoving | ( | bool | b | ) | [inline] |
QSizePolicy QDockWindowHandle::sizePolicy | ( | ) | const [virtual] |
Reimplementado de QWidget.
void QDockWindowHandle::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.
Reimplementado de QWidget.
void QDockWindowHandle::updateGui | ( | ) |
friend class QDockWindow [friend] |
friend class QDockWindowTitleBar [friend] |
QString QDockWindowHandle::caption [read] |
the window caption (title)
This property only makes sense for top-level widgets. If no caption has been set, the caption is QString::null.
Reimplementado de QWidget.