summaryrefslogtreecommitdiffstats
path: root/src/gui/statemachine/qmouseeventtransition.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/qmouseeventtransition.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/qmouseeventtransition.cpp')
-rw-r--r--src/gui/statemachine/qmouseeventtransition.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gui/statemachine/qmouseeventtransition.cpp b/src/gui/statemachine/qmouseeventtransition.cpp
index f5df904..d6d9b62 100644
--- a/src/gui/statemachine/qmouseeventtransition.cpp
+++ b/src/gui/statemachine/qmouseeventtransition.cpp
@@ -34,6 +34,18 @@ QT_BEGIN_NAMESPACE
\sa QState::addTransition()
*/
+/*!
+ \property QMouseEventTransition::button
+
+ \brief the button that this mouse event transition is associated with
+*/
+
+/*!
+ \property QMouseEventTransition::modifiersMask
+
+ \brief the keyboard modifiers mask that this mouse event transition checks for
+*/
+
class QMouseEventTransitionPrivate : public QEventTransitionPrivate
{
Q_DECLARE_PUBLIC(QMouseEventTransition)
@@ -113,6 +125,26 @@ void QMouseEventTransition::setButton(Qt::MouseButton button)
}
/*!
+ Returns the keyboard modifiers mask that this mouse event transition checks
+ for.
+*/
+Qt::KeyboardModifiers QMouseEventTransition::modifiersMask() const
+{
+ Q_D(const QMouseEventTransition);
+ return d->transition->modifiersMask();
+}
+
+/*!
+ Sets the keyboard \a modifiers mask that this mouse event transition will
+ check for.
+*/
+void QMouseEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask)
+{
+ Q_D(QMouseEventTransition);
+ d->transition->setModifiersMask(modifiersMask);
+}
+
+/*!
Returns the path for this mouse event transition.
*/
QPainterPath QMouseEventTransition::path() const