summaryrefslogtreecommitdiffstats
path: root/src/gui/statemachine/qkeyeventtransition.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-04-29 08:54:10 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-04-29 08:54:10 (GMT)
commit58b74319a639cb471cdec92c0e8a054fc6d4d5f5 (patch)
tree6d6bd21ff8c53636cc51eb8a1d17eb2fd00ebed9 /src/gui/statemachine/qkeyeventtransition.cpp
parentf39a905bc75e7ce95294f3584ea8a400ab383861 (diff)
downloadQt-58b74319a639cb471cdec92c0e8a054fc6d4d5f5.zip
Qt-58b74319a639cb471cdec92c0e8a054fc6d4d5f5.tar.gz
Qt-58b74319a639cb471cdec92c0e8a054fc6d4d5f5.tar.bz2
modifiers --> modifiersMask
Result of API review. A == comparison of the modifiers is not useful. The common case is you want to test if one or more modifiers are set, i.e. a mask check.
Diffstat (limited to 'src/gui/statemachine/qkeyeventtransition.cpp')
-rw-r--r--src/gui/statemachine/qkeyeventtransition.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/gui/statemachine/qkeyeventtransition.cpp b/src/gui/statemachine/qkeyeventtransition.cpp
index 88e4add..7c1ae8a 100644
--- a/src/gui/statemachine/qkeyeventtransition.cpp
+++ b/src/gui/statemachine/qkeyeventtransition.cpp
@@ -39,6 +39,12 @@ QT_BEGIN_NAMESPACE
\brief the key that this key event transition is associated with
*/
+/*!
+ \property QKeyEventTransition::modifiersMask
+
+ \brief the keyboard modifiers mask that this key event transition checks for
+*/
+
class QKeyEventTransitionPrivate : public QEventTransitionPrivate
{
Q_DECLARE_PUBLIC(QKeyEventTransition)
@@ -111,22 +117,23 @@ void QKeyEventTransition::setKey(int key)
}
/*!
- Returns the keyboard modifiers that this key event transition checks for.
+ Returns the keyboard modifiers mask that this key event transition checks
+ for.
*/
-Qt::KeyboardModifiers QKeyEventTransition::modifiers() const
+Qt::KeyboardModifiers QKeyEventTransition::modifiersMask() const
{
Q_D(const QKeyEventTransition);
- return d->transition->modifiers();
+ return d->transition->modifiersMask();
}
/*!
- Sets the keyboard \a modifiers that this key event transition will check
- for.
+ Sets the keyboard \a modifiers mask that this key event transition will
+ check for.
*/
-void QKeyEventTransition::setModifiers(Qt::KeyboardModifiers modifiers)
+void QKeyEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask)
{
Q_D(QKeyEventTransition);
- d->transition->setModifiers(modifiers);
+ d->transition->setModifiersMask(modifiersMask);
}
/*!