src/gui/statemachine/qmouseeventtransition.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    68 
    68 
    69     \brief the button that this mouse event transition is associated with
    69     \brief the button that this mouse event transition is associated with
    70 */
    70 */
    71 
    71 
    72 /*!
    72 /*!
    73     \property QMouseEventTransition::modifiersMask
    73     \property QMouseEventTransition::modifierMask
    74 
    74 
    75     \brief the keyboard modifiers mask that this mouse event transition checks for
    75     \brief the keyboard modifier mask that this mouse event transition checks for
    76 */
    76 */
    77 
    77 
    78 class QMouseEventTransitionPrivate : public QEventTransitionPrivate
    78 class QMouseEventTransitionPrivate : public QEventTransitionPrivate
    79 {
    79 {
    80     Q_DECLARE_PUBLIC(QMouseEventTransition)
    80     Q_DECLARE_PUBLIC(QMouseEventTransition)
   137     Q_D(QMouseEventTransition);
   137     Q_D(QMouseEventTransition);
   138     d->transition->setButton(button);
   138     d->transition->setButton(button);
   139 }
   139 }
   140 
   140 
   141 /*!
   141 /*!
   142   Returns the keyboard modifiers mask that this mouse event transition checks
   142   Returns the keyboard modifier mask that this mouse event transition checks
   143   for.
   143   for.
   144 */
   144 */
   145 Qt::KeyboardModifiers QMouseEventTransition::modifiersMask() const
   145 Qt::KeyboardModifiers QMouseEventTransition::modifierMask() const
   146 {
   146 {
   147     Q_D(const QMouseEventTransition);
   147     Q_D(const QMouseEventTransition);
   148     return d->transition->modifiersMask();
   148     return d->transition->modifierMask();
   149 }
   149 }
   150 
   150 
   151 /*!
   151 /*!
   152   Sets the keyboard \a modifiers mask that this mouse event transition will
   152   Sets the keyboard modifier mask that this mouse event transition will
   153   check for.
   153   check for to \a modifierMask.
   154 */
   154 */
   155 void QMouseEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask)
   155 void QMouseEventTransition::setModifierMask(Qt::KeyboardModifiers modifierMask)
   156 {
   156 {
   157     Q_D(QMouseEventTransition);
   157     Q_D(QMouseEventTransition);
   158     d->transition->setModifiersMask(modifiersMask);
   158     d->transition->setModifierMask(modifierMask);
   159 }
   159 }
   160 
   160 
   161 /*!
   161 /*!
   162   Returns the path for this mouse event transition.
   162   Returns the hit test path for this mouse event transition.
   163 */
   163 */
   164 QPainterPath QMouseEventTransition::path() const
   164 QPainterPath QMouseEventTransition::hitTestPath() const
   165 {
   165 {
   166     Q_D(const QMouseEventTransition);
   166     Q_D(const QMouseEventTransition);
   167     return d->transition->path();
   167     return d->transition->hitTestPath();
   168 }
   168 }
   169 
   169 
   170 /*!
   170 /*!
   171   Sets the \a path for this mouse event transition.
   171   Sets the hit test path for this mouse event transition to \a path.
   172   If a valid path has been set, the transition will only trigger if the mouse
   172   If a valid path has been set, the transition will only trigger if the mouse
   173   event position (QMouseEvent::pos()) is inside the path.
   173   event position (QMouseEvent::pos()) is inside the path.
   174 
   174 
   175   \sa QPainterPath::contains()
   175   \sa QPainterPath::contains()
   176 */
   176 */
   177 void QMouseEventTransition::setPath(const QPainterPath &path)
   177 void QMouseEventTransition::setHitTestPath(const QPainterPath &path)
   178 {
   178 {
   179     Q_D(QMouseEventTransition);
   179     Q_D(QMouseEventTransition);
   180     d->transition->setPath(path);
   180     d->transition->setHitTestPath(path);
   181 }
   181 }
   182 
   182 
   183 /*!
   183 /*!
   184   \reimp
   184   \reimp
   185 */
   185 */