diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-01 07:21:02 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-10-01 08:14:35 (GMT) |
commit | 790583dc16a89ed77954c096aae52bf9f91aec09 (patch) | |
tree | 4a410f902f134b66856ee8e803d87b4a3cde1e9e /src/opengl | |
parent | 91b58202c089ea8f4e150717cee8dbc40b8f903c (diff) | |
download | Qt-790583dc16a89ed77954c096aae52bf9f91aec09.zip Qt-790583dc16a89ed77954c096aae52bf9f91aec09.tar.gz Qt-790583dc16a89ed77954c096aae52bf9f91aec09.tar.bz2 |
Add support for modality to QGraphicsItem panels.
This add QGraphicsItem::setPanelModality(), panelModality(),
isBlockedByModalPanel() and the QGraphicsItem::PanelModality enum
(enumerators are either SceneModal, PanelModal, or NonModal, which
mirror Qt::ApplicationModal, Qt::WindowModal, and Qt::NonModal).
Reviewed-by: ahanssen
Squashed commit of the following:
commit a980a1b9c2972c676f3a70e8577d4eace54a25b3
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 30 14:42:01 2009 +0200
Fix tst_QGraphicsItem::modality_hover() test failures
As pointed out by Andreas, QGraphicsScenePrivate::dispatchHoverEvent()
already has all the logic needed to correctly dispatch the hover
events when changing modality. All we need to do is store the last
known mouse position, and call dispatchHoverEvent() when entering,
changing, and leaving the modal state.
commit ba41633c96ece8da3a8bbf9c7491c15b14f83f76
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 30 14:40:59 2009 +0200
Fix tst_QGraphicsItem::mixedModality() failure
When changing modality from SceneModal to PanelModal, we may need to
send WindowUnblocked events in addition to the WindowBlocked events.
commit d1076e315de10b1b2fb7617ebaee552c14e49c8b
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 30 14:33:21 2009 +0200
Update the expected events counts in tst_QGraphicsItem::modality_hover()
HoverEnter and HoverMove always come in pairs, and should do so when
entering or leaving modality as well. This means though that changing
modality can cause spurious HoverMove events (as seen in this test).
commit a29b098e4c391651ef61dd4714a66b22654e4628
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 30 14:20:25 2009 +0200
Update tst_QGraphicsItem::mixedModality() to do more detailed checking
The test looks for unwanted WindowBlocked/WindowUnblocked events now,
making it easier to spot where the failure comes from.
commit c1ae96126ed01d0e662bddf38ff161e50a804b1c
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Tue Sep 29 12:17:17 2009 +0200
Documentation for QGraphicsItem::PanelModality
Document the behavior of the QGraphicsItem::NonModal, PanelModal, and
SceneModal enumerators. Corrected a qdoc error in the
isBlockedByModalPanel() documentation
commit 02fec999e660180ff65bbbf79c8085e582879ed1
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Thu Sep 17 10:31:44 2009 +0200
Add bool QGraphicsItem::isBlockedByModalPanel()
This function can be used to figure out 1) if an item is modally
shadowed and 2) which panel is blocking the item in question.
This will make it possible to implement window-manager like behavior
of activating/highlighting/animating modal panels when the user tries
to interact with a blocked item (this will most likely need to be done
by reimplementing QGraphicsScene::event()).
commit eab9a975dcd71b68135325d479374108bd7f3b2a
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 16 14:38:55 2009 +0200
Block key events to the focus item if it is blocked by a modal panel.
We don't want the event to propagate either, just stop propagating
once we reach an item that is blocked.
commit 038b61a10bb837b353f988cb0d1665dd53656cdb
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Tue Sep 15 12:40:27 2009 +0200
Add a test for click-to-focus behavior in the presence of modality
Clicking on a widget should neither give it focus nor set it as the
sub-focus item.
commit 3bb3662556efe8d76af5a56e65b1df7a9f4b476a
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Tue Sep 8 09:08:42 2009 +0200
Newly blocked QGraphicsItem panels should lose implicit grabs when
modality is enabled.
If an item has an implicit grab when blocked by a modal panel, this grab
is lost and no mouse events are sent until the mouse is released and re-
commit 3be51be3da36e782a5a1f282c552064d5d490a71
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Thu Sep 3 13:39:14 2009 +0200
Support changing modality from PanelModal to SceneModal or vice-versa
Don't leave modality first, and then re-enter... this sends
unnecessary events.
commit bb0aea559ba01a8bbb03c0370a247ab902f561f5
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 2 16:58:23 2009 +0200
Fix hover event delivery in the presence of modal panels
Panels that are modally shadowed should not get hover events. When
entering and leaving the modal state, GraphicsSceneHoverEnter and
GraphicsSceneHoverLeave event should be send to the widgets that
become or are no longer blocked.
Auto-test included.
commit cad00b1d9da19565e2d7ea2d30d37eb45005b5ae
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 2 10:45:20 2009 +0200
Fix tst_QGraphicsItem::modality_hover() test
Don't send hover events to items that are modally shadowed.
commit ae15df331901110e19eb2037f37ff7f84cd7cd16
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Wed Sep 2 10:44:14 2009 +0200
Enable the ItemIsPanel flag in the modality_hover() test
Otherwise the modality settings are ignored.
commit 1580f43c8feabc3a2bf9c1450e1a8916e8940a4c
Author: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
Date: Fri Aug 28 15:20:37 2009 +0200
More work on QGraphicsItem::PanelModality. Added many tests.
commit ed2064ad2ec8bc06d62cf1e931b973d5d92c0563
Author: Bradley T. Hughes <bradley.hughes@nokia.com>
Date: Thu Aug 27 13:45:11 2009 +0200
Add support for modality to QGraphicsItem panels.
This add QGraphicsItem::setPanelModality() and the
QGraphicsItem::PanelModality enum (enumerators are either SceneModal,
PanelModal, or NonModal, which mirror Qt::ApplicationModal,
Qt::WindowModal, and Qt::NonModal).
Reviewed-by: ahanssen
Diffstat (limited to 'src/opengl')
0 files changed, 0 insertions, 0 deletions