summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-05-22 12:09:21 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-05-22 12:09:21 (GMT)
commit64cc2368d230c6f0996a6311767bd1704b4cf322 (patch)
tree7082cfb21a22c702b978db0daf93ddff03fb836b /src/gui
parent7c00cc50fc41a7c7b9c04e258a9eb03ff187c574 (diff)
downloadQt-64cc2368d230c6f0996a6311767bd1704b4cf322.zip
Qt-64cc2368d230c6f0996a6311767bd1704b4cf322.tar.gz
Qt-64cc2368d230c6f0996a6311767bd1704b4cf322.tar.bz2
Revert "Say hello to animation API & state machine API"
This reverts commit 1a709fbe25a2446a9b311ded88aec5565258f3ac.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/animation/animation.pri3
-rw-r--r--src/gui/animation/qguivariantanimation.cpp75
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h12
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsproxywidget.h2
-rw-r--r--src/gui/gui.pro2
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/painting/qdrawhelper.cpp8
-rw-r--r--src/gui/statemachine/qbasickeyeventtransition.cpp203
-rw-r--r--src/gui/statemachine/qbasickeyeventtransition_p.h93
-rw-r--r--src/gui/statemachine/qbasicmouseeventtransition.cpp208
-rw-r--r--src/gui/statemachine/qbasicmouseeventtransition_p.h98
-rw-r--r--src/gui/statemachine/qguistatemachine.cpp559
-rw-r--r--src/gui/statemachine/qkeyeventtransition.cpp186
-rw-r--r--src/gui/statemachine/qkeyeventtransition.h87
-rw-r--r--src/gui/statemachine/qmouseeventtransition.cpp216
-rw-r--r--src/gui/statemachine/qmouseeventtransition.h92
-rw-r--r--src/gui/statemachine/statemachine.pri13
18 files changed, 5 insertions, 1860 deletions
diff --git a/src/gui/animation/animation.pri b/src/gui/animation/animation.pri
deleted file mode 100644
index 27763ca..0000000
--- a/src/gui/animation/animation.pri
+++ /dev/null
@@ -1,3 +0,0 @@
-# Qt gui animation module
-
-SOURCES += animation/qguivariantanimation.cpp
diff --git a/src/gui/animation/qguivariantanimation.cpp b/src/gui/animation/qguivariantanimation.cpp
deleted file mode 100644
index 37ca6a1..0000000
--- a/src/gui/animation/qguivariantanimation.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT_NO_ANIMATION
-
-#include <QtCore/qvariantanimation.h>
-#include <private/qvariantanimation_p.h>
-
-#include <QtGui/qcolor.h>
-
-QT_BEGIN_NAMESPACE
-
-template<> Q_INLINE_TEMPLATE QColor _q_interpolate(const QColor &f,const QColor &t, qreal progress)
-{
- return QColor(_q_interpolate(f.red(), t.red(), progress),
- _q_interpolate(f.green(), t.green(), progress),
- _q_interpolate(f.blue(), t.blue(), progress),
- _q_interpolate(f.alpha(), t.alpha(), progress));
-}
-
-static int qRegisterGuiGetInterpolator()
-{
- qRegisterAnimationInterpolator<QColor>(_q_interpolateVariant<QColor>);
- return 1;
-}
-Q_CONSTRUCTOR_FUNCTION(qRegisterGuiGetInterpolator)
-
-static int qUnregisterGuiGetInterpolator()
-{
- qRegisterAnimationInterpolator<QColor>(0);
- return 1;
-}
-Q_DESTRUCTOR_FUNCTION(qUnregisterGuiGetInterpolator)
-
-QT_END_NAMESPACE
-
-#endif //QT_NO_ANIMATION
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 62e0411..b2569c1 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -95,15 +95,6 @@ class Q_AUTOTEST_EXPORT QGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(QGraphicsItem)
public:
- struct TransformData
- {
- TransformData() : rotationX(0),rotationY(0),rotationZ(0),scaleX(1),scaleY(1), dirty(true) {}
- QTransform baseTransform;
- QTransform transform;
- QPointF transformCenter;
- qreal rotationX,rotationY,rotationZ,scaleX,scaleY;
- bool dirty;
- };
enum Extra {
ExtraTransform,
ExtraToolTip,
@@ -248,7 +239,7 @@ public:
}
}
}
-
+
struct ExtraStruct {
ExtraStruct(Extra type, QVariant value)
: type(type), value(value)
@@ -260,7 +251,6 @@ public:
bool operator<(Extra extra) const
{ return type < extra; }
};
-
QList<ExtraStruct> extras;
QGraphicsItemCache *maybeExtraItemCache() const;
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp
index a5b11ff..01b7593 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp
@@ -976,7 +976,6 @@ void QGraphicsProxyWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent *even
}
#endif // QT_NO_CONTEXTMENU
-#ifndef QT_NO_DRAGANDDROP
/*!
\reimp
*/
@@ -1097,7 +1096,6 @@ void QGraphicsProxyWidget::dropEvent(QGraphicsSceneDragDropEvent *event)
}
#endif
}
-#endif
/*!
\reimp
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.h b/src/gui/graphicsview/qgraphicsproxywidget.h
index ab8c9da..b2c3c8f 100644
--- a/src/gui/graphicsview/qgraphicsproxywidget.h
+++ b/src/gui/graphicsview/qgraphicsproxywidget.h
@@ -90,12 +90,10 @@ protected:
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
#endif
-#ifndef QT_NO_DRAGANDDROP
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
void dropEvent(QGraphicsSceneDragDropEvent *event);
-#endif
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index 329fb01..1aa6558 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -19,7 +19,6 @@ win32:include(kernel/win.pri)
embedded:include(embedded/embedded.pri)
#modules
-include(animation/animation.pri)
include(kernel/kernel.pri)
include(image/image.pri)
include(painting/painting.pri)
@@ -32,7 +31,6 @@ include(itemviews/itemviews.pri)
include(inputmethod/inputmethod.pri)
include(graphicsview/graphicsview.pri)
include(util/util.pri)
-include(statemachine/statemachine.pri)
include(math3d/math3d.pri)
embedded: QT += network
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index a9424db..824d6f1 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -838,9 +838,6 @@ void QApplicationPrivate::initialize()
// trigger registering of QVariant's GUI types
extern int qRegisterGuiVariant();
qRegisterGuiVariant();
- // trigger registering of QStateMachine's GUI types
- extern int qRegisterGuiStateMachine();
- qRegisterGuiStateMachine();
is_app_running = true; // no longer starting up
@@ -1062,9 +1059,6 @@ QApplication::~QApplication()
QApplicationPrivate::fade_tooltip = false;
QApplicationPrivate::widgetCount = false;
- // trigger unregistering of QStateMachine's GUI types
- extern int qUnregisterGuiStateMachine();
- qUnregisterGuiStateMachine();
// trigger unregistering of QVariant's GUI types
extern int qUnregisterGuiVariant();
qUnregisterGuiVariant();
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index bbe1a76..fdd0c21 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -6930,7 +6930,7 @@ static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer,
}
void qt_build_pow_tables() {
- qreal smoothing = qreal(1.7);
+ qreal smoothing = 1.7;
#ifdef Q_WS_MAC
// decided by testing a few things on an iMac, should probably get this from the
@@ -6952,15 +6952,15 @@ void qt_build_pow_tables() {
}
#else
for (int i=0; i<256; ++i) {
- qt_pow_rgb_gamma[i] = uchar(qRound(pow(i / qreal(255.0), smoothing) * 255));
- qt_pow_rgb_invgamma[i] = uchar(qRound(pow(i / qreal(255.), 1 / smoothing) * 255));
+ qt_pow_rgb_gamma[i] = uchar(qRound(pow(i / 255.0, smoothing) * 255));
+ qt_pow_rgb_invgamma[i] = uchar(qRound(pow(i / 255.0, 1 / smoothing) * 255));
}
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
const qreal gray_gamma = 2.31;
for (int i=0; i<256; ++i)
- qt_pow_gamma[i] = uint(qRound(pow(i / qreal(255.), gray_gamma) * 2047));
+ qt_pow_gamma[i] = uint(qRound(pow(i / 255.0, gray_gamma) * 2047));
for (int i=0; i<2048; ++i)
qt_pow_invgamma[i] = uchar(qRound(pow(i / 2047.0, 1 / gray_gamma) * 255));
#endif
diff --git a/src/gui/statemachine/qbasickeyeventtransition.cpp b/src/gui/statemachine/qbasickeyeventtransition.cpp
deleted file mode 100644
index f7f1eb6..0000000
--- a/src/gui/statemachine/qbasickeyeventtransition.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qbasickeyeventtransition_p.h"
-#include <QtGui/qevent.h>
-#include <qdebug.h>
-#include <private/qabstracttransition_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \internal
- \class QBasicKeyEventTransition
- \since 4.6
- \ingroup statemachine
-
- \brief The QBasicKeyEventTransition class provides a transition for Qt key events.
-*/
-
-class QBasicKeyEventTransitionPrivate : public QAbstractTransitionPrivate
-{
- Q_DECLARE_PUBLIC(QBasicKeyEventTransition)
-public:
- QBasicKeyEventTransitionPrivate();
-
- static QBasicKeyEventTransitionPrivate *get(QBasicKeyEventTransition *q);
-
- QEvent::Type eventType;
- int key;
- Qt::KeyboardModifiers modifiersMask;
-};
-
-QBasicKeyEventTransitionPrivate::QBasicKeyEventTransitionPrivate()
-{
- eventType = QEvent::None;
- key = 0;
- modifiersMask = Qt::NoModifier;
-}
-
-QBasicKeyEventTransitionPrivate *QBasicKeyEventTransitionPrivate::get(QBasicKeyEventTransition *q)
-{
- return q->d_func();
-}
-
-/*!
- Constructs a new key event transition with the given \a sourceState.
-*/
-QBasicKeyEventTransition::QBasicKeyEventTransition(QState *sourceState)
- : QAbstractTransition(*new QBasicKeyEventTransitionPrivate, sourceState)
-{
-}
-
-/*!
- Constructs a new event transition for events of the given \a type for the
- given \a key, with the given \a sourceState.
-*/
-QBasicKeyEventTransition::QBasicKeyEventTransition(QEvent::Type type, int key,
- QState *sourceState)
- : QAbstractTransition(*new QBasicKeyEventTransitionPrivate, sourceState)
-{
- Q_D(QBasicKeyEventTransition);
- d->eventType = type;
- d->key = key;
-}
-
-/*!
- Constructs a new event transition for events of the given \a type for the
- given \a key, with the given \a modifiersMask and \a sourceState.
-*/
-QBasicKeyEventTransition::QBasicKeyEventTransition(QEvent::Type type, int key,
- Qt::KeyboardModifiers modifiersMask,
- QState *sourceState)
- : QAbstractTransition(*new QBasicKeyEventTransitionPrivate, sourceState)
-{
- Q_D(QBasicKeyEventTransition);
- d->eventType = type;
- d->key = key;
- d->modifiersMask = modifiersMask;
-}
-
-/*!
- Destroys this event transition.
-*/
-QBasicKeyEventTransition::~QBasicKeyEventTransition()
-{
-}
-
-/*!
- Returns the event type that this key event transition is associated with.
-*/
-QEvent::Type QBasicKeyEventTransition::eventType() const
-{
- Q_D(const QBasicKeyEventTransition);
- return d->eventType;
-}
-
-/*!
- Sets the event \a type that this key event transition is associated with.
-*/
-void QBasicKeyEventTransition::setEventType(QEvent::Type type)
-{
- Q_D(QBasicKeyEventTransition);
- d->eventType = type;
-}
-
-/*!
- Returns the key that this key event transition checks for.
-*/
-int QBasicKeyEventTransition::key() const
-{
- Q_D(const QBasicKeyEventTransition);
- return d->key;
-}
-
-/*!
- Sets the key that this key event transition will check for.
-*/
-void QBasicKeyEventTransition::setKey(int key)
-{
- Q_D(QBasicKeyEventTransition);
- d->key = key;
-}
-
-/*!
- Returns the keyboard modifiers mask that this key event transition checks
- for.
-*/
-Qt::KeyboardModifiers QBasicKeyEventTransition::modifiersMask() const
-{
- Q_D(const QBasicKeyEventTransition);
- return d->modifiersMask;
-}
-
-/*!
- Sets the keyboard modifiers mask that this key event transition will check
- for.
-*/
-void QBasicKeyEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask)
-{
- Q_D(QBasicKeyEventTransition);
- d->modifiersMask = modifiersMask;
-}
-
-/*!
- \reimp
-*/
-bool QBasicKeyEventTransition::eventTest(QEvent *event)
-{
- Q_D(const QBasicKeyEventTransition);
- if (event->type() == d->eventType) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(event);
- return (ke->key() == d->key)
- && ((ke->modifiers() & d->modifiersMask) == d->modifiersMask);
- }
- return false;
-}
-
-/*!
- \reimp
-*/
-void QBasicKeyEventTransition::onTransition(QEvent *)
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/statemachine/qbasickeyeventtransition_p.h b/src/gui/statemachine/qbasickeyeventtransition_p.h
deleted file mode 100644
index 39fa6ad..0000000
--- a/src/gui/statemachine/qbasickeyeventtransition_p.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QBASICKEYEVENTTRANSITION_P_H
-#define QBASICKEYEVENTTRANSITION_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qabstracttransition.h>
-#include <QtGui/qevent.h>
-
-QT_BEGIN_NAMESPACE
-
-class QBasicKeyEventTransitionPrivate;
-class Q_AUTOTEST_EXPORT QBasicKeyEventTransition : public QAbstractTransition
-{
- Q_OBJECT
-public:
- QBasicKeyEventTransition(QState *sourceState = 0);
- QBasicKeyEventTransition(QEvent::Type type, int key, QState *sourceState = 0);
- QBasicKeyEventTransition(QEvent::Type type, int key,
- Qt::KeyboardModifiers modifiersMask,
- QState *sourceState = 0);
- ~QBasicKeyEventTransition();
-
- QEvent::Type eventType() const;
- void setEventType(QEvent::Type type);
-
- int key() const;
- void setKey(int key);
-
- Qt::KeyboardModifiers modifiersMask() const;
- void setModifiersMask(Qt::KeyboardModifiers modifiers);
-
-protected:
- bool eventTest(QEvent *event);
- void onTransition(QEvent *);
-
-private:
- Q_DISABLE_COPY(QBasicKeyEventTransition)
- Q_DECLARE_PRIVATE(QBasicKeyEventTransition)
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/gui/statemachine/qbasicmouseeventtransition.cpp b/src/gui/statemachine/qbasicmouseeventtransition.cpp
deleted file mode 100644
index 20dd792..0000000
--- a/src/gui/statemachine/qbasicmouseeventtransition.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qbasicmouseeventtransition_p.h"
-#include <QtGui/qevent.h>
-#include <QtGui/qpainterpath.h>
-#include <qdebug.h>
-#include <private/qabstracttransition_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \internal
- \class QBasicMouseEventTransition
- \since 4.6
- \ingroup statemachine
-
- \brief The QBasicMouseEventTransition class provides a transition for Qt mouse events.
-*/
-
-class QBasicMouseEventTransitionPrivate : public QAbstractTransitionPrivate
-{
- Q_DECLARE_PUBLIC(QBasicMouseEventTransition)
-public:
- QBasicMouseEventTransitionPrivate();
-
- static QBasicMouseEventTransitionPrivate *get(QBasicMouseEventTransition *q);
-
- QEvent::Type eventType;
- Qt::MouseButton button;
- Qt::KeyboardModifiers modifiersMask;
- QPainterPath path;
-};
-
-QBasicMouseEventTransitionPrivate::QBasicMouseEventTransitionPrivate()
-{
- eventType = QEvent::None;
- button = Qt::NoButton;
-}
-
-QBasicMouseEventTransitionPrivate *QBasicMouseEventTransitionPrivate::get(QBasicMouseEventTransition *q)
-{
- return q->d_func();
-}
-
-/*!
- Constructs a new mouse event transition with the given \a sourceState.
-*/
-QBasicMouseEventTransition::QBasicMouseEventTransition(QState *sourceState)
- : QAbstractTransition(*new QBasicMouseEventTransitionPrivate, sourceState)
-{
-}
-
-/*!
- Constructs a new mouse event transition for events of the given \a type.
-*/
-QBasicMouseEventTransition::QBasicMouseEventTransition(QEvent::Type type,
- Qt::MouseButton button,
- QState *sourceState)
- : QAbstractTransition(*new QBasicMouseEventTransitionPrivate, sourceState)
-{
- Q_D(QBasicMouseEventTransition);
- d->eventType = type;
- d->button = button;
-}
-
-/*!
- Destroys this mouse event transition.
-*/
-QBasicMouseEventTransition::~QBasicMouseEventTransition()
-{
-}
-
-/*!
- Returns the event type that this mouse event transition is associated with.
-*/
-QEvent::Type QBasicMouseEventTransition::eventType() const
-{
- Q_D(const QBasicMouseEventTransition);
- return d->eventType;
-}
-
-/*!
- Sets the event \a type that this mouse event transition is associated with.
-*/
-void QBasicMouseEventTransition::setEventType(QEvent::Type type)
-{
- Q_D(QBasicMouseEventTransition);
- d->eventType = type;
-}
-
-/*!
- Returns the button that this mouse event transition checks for.
-*/
-Qt::MouseButton QBasicMouseEventTransition::button() const
-{
- Q_D(const QBasicMouseEventTransition);
- return d->button;
-}
-
-/*!
- Sets the button that this mouse event transition will check for.
-*/
-void QBasicMouseEventTransition::setButton(Qt::MouseButton button)
-{
- Q_D(QBasicMouseEventTransition);
- d->button = button;
-}
-
-/*!
- Returns the keyboard modifiers mask that this mouse event transition checks
- for.
-*/
-Qt::KeyboardModifiers QBasicMouseEventTransition::modifiersMask() const
-{
- Q_D(const QBasicMouseEventTransition);
- return d->modifiersMask;
-}
-
-/*!
- Sets the keyboard modifiers mask that this mouse event transition will check
- for.
-*/
-void QBasicMouseEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask)
-{
- Q_D(QBasicMouseEventTransition);
- d->modifiersMask = modifiersMask;
-}
-
-/*!
- Returns the path for this mouse event transition.
-*/
-QPainterPath QBasicMouseEventTransition::path() const
-{
- Q_D(const QBasicMouseEventTransition);
- return d->path;
-}
-
-/*!
- Sets the path for this mouse event transition.
-*/
-void QBasicMouseEventTransition::setPath(const QPainterPath &path)
-{
- Q_D(QBasicMouseEventTransition);
- d->path = path;
-}
-
-/*!
- \reimp
-*/
-bool QBasicMouseEventTransition::eventTest(QEvent *event)
-{
- Q_D(const QBasicMouseEventTransition);
- if (event->type() == d->eventType) {
- QMouseEvent *me = static_cast<QMouseEvent*>(event);
- return (me->button() == d->button)
- && ((me->modifiers() & d->modifiersMask) == d->modifiersMask)
- && (d->path.isEmpty() || d->path.contains(me->pos()));
- }
- return false;
-}
-
-/*!
- \reimp
-*/
-void QBasicMouseEventTransition::onTransition(QEvent *)
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/statemachine/qbasicmouseeventtransition_p.h b/src/gui/statemachine/qbasicmouseeventtransition_p.h
deleted file mode 100644
index 6c0afe4..0000000
--- a/src/gui/statemachine/qbasicmouseeventtransition_p.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QBASICMOUSEEVENTTRANSITION_P_H
-#define QBASICMOUSEEVENTTRANSITION_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qabstracttransition.h>
-#include <QtGui/qevent.h>
-
-QT_BEGIN_NAMESPACE
-
-class QPainterPath;
-
-class QBasicMouseEventTransitionPrivate;
-class Q_AUTOTEST_EXPORT QBasicMouseEventTransition : public QAbstractTransition
-{
- Q_OBJECT
-public:
- QBasicMouseEventTransition(QState *sourceState = 0);
- QBasicMouseEventTransition(QEvent::Type type, Qt::MouseButton button,
- QState *sourceState = 0);
- ~QBasicMouseEventTransition();
-
- QEvent::Type eventType() const;
- void setEventType(QEvent::Type type);
-
- Qt::MouseButton button() const;
- void setButton(Qt::MouseButton button);
-
- Qt::KeyboardModifiers modifiersMask() const;
- void setModifiersMask(Qt::KeyboardModifiers modifiers);
-
- QPainterPath path() const;
- void setPath(const QPainterPath &path);
-
-protected:
- bool eventTest(QEvent *event);
- void onTransition(QEvent *);
-
-private:
- Q_DISABLE_COPY(QBasicMouseEventTransition)
- Q_DECLARE_PRIVATE(QBasicMouseEventTransition)
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/gui/statemachine/qguistatemachine.cpp b/src/gui/statemachine/qguistatemachine.cpp
deleted file mode 100644
index 612e43e..0000000
--- a/src/gui/statemachine/qguistatemachine.cpp
+++ /dev/null
@@ -1,559 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/qstatemachine.h>
-#include <private/qstatemachine_p.h>
-#include <QtGui/qevent.h>
-#include <QtGui/qgraphicssceneevent.h>
-
-QT_BEGIN_NAMESPACE
-
-Q_CORE_EXPORT const QStateMachinePrivate::Handler *qcoreStateMachineHandler();
-
-static QEvent *cloneEvent(QEvent *e)
-{
- switch (e->type()) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- return new QMouseEvent(*static_cast<QMouseEvent*>(e));
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- return new QKeyEvent(*static_cast<QKeyEvent*>(e));
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- return new QFocusEvent(*static_cast<QFocusEvent*>(e));
- case QEvent::Enter:
- return new QEvent(*e);
- case QEvent::Leave:
- return new QEvent(*e);
- break;
- case QEvent::Paint:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Move:
- return new QMoveEvent(*static_cast<QMoveEvent*>(e));
- case QEvent::Resize:
- return new QResizeEvent(*static_cast<QResizeEvent*>(e));
- case QEvent::Create:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Destroy:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Show:
- return new QShowEvent(*static_cast<QShowEvent*>(e));
- case QEvent::Hide:
- return new QHideEvent(*static_cast<QHideEvent*>(e));
- case QEvent::Close:
- return new QCloseEvent(*static_cast<QCloseEvent*>(e));
- case QEvent::Quit:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ParentChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ParentAboutToChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ThreadChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::WindowActivate:
- case QEvent::WindowDeactivate:
- return new QEvent(*e);
-
- case QEvent::ShowToParent:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::HideToParent:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Wheel:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::WindowTitleChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::WindowIconChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ApplicationWindowIconChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ApplicationFontChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ApplicationLayoutDirectionChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ApplicationPaletteChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::PaletteChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Clipboard:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Speech:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::MetaCall:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::SockAct:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::WinEventAct:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::DeferredDelete:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::DragEnter:
- return new QDragEnterEvent(*static_cast<QDragEnterEvent*>(e));
- case QEvent::DragMove:
- return new QDragMoveEvent(*static_cast<QDragMoveEvent*>(e));
- case QEvent::DragLeave:
- return new QDragLeaveEvent(*static_cast<QDragLeaveEvent*>(e));
- case QEvent::Drop:
- return new QDropEvent(*static_cast<QDragMoveEvent*>(e));
- case QEvent::DragResponse:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ChildAdded:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ChildPolished:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#ifdef QT3_SUPPORT
- case QEvent::ChildInsertedRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ChildInserted:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LayoutHint:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
- case QEvent::ChildRemoved:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ShowWindowRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::PolishRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Polish:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LayoutRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::UpdateRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::UpdateLater:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::EmbeddingControl:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ActivateControl:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::DeactivateControl:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ContextMenu:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::InputMethod:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::AccessibilityPrepare:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::TabletMove:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LocaleChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LanguageChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LayoutDirectionChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::Style:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::TabletPress:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::TabletRelease:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::OkRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::HelpRequest:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::IconDrag:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::FontChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::EnabledChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ActivationChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::StyleChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::IconTextChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ModifiedChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::MouseTrackingChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::WindowBlocked:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::WindowUnblocked:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::WindowStateChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ToolTip:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::WhatsThis:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::StatusTip:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ActionChanged:
- case QEvent::ActionAdded:
- case QEvent::ActionRemoved:
- return new QActionEvent(*static_cast<QActionEvent*>(e));
-
- case QEvent::FileOpen:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::Shortcut:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ShortcutOverride:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
-#ifdef QT3_SUPPORT
- case QEvent::Accel:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::AccelAvailable:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
-
- case QEvent::WhatsThisClicked:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ToolBarChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ApplicationActivate:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ApplicationDeactivate:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::QueryWhatsThis:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::EnterWhatsThisMode:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LeaveWhatsThisMode:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ZOrderChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::HoverEnter:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::HoverLeave:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::HoverMove:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::AccessibilityHelp:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::AccessibilityDescription:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
-#ifdef QT_KEYPAD_NAVIGATION
- case QEvent::EnterEditFocus:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::LeaveEditFocus:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
- case QEvent::AcceptDropsChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::MenubarUpdated:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ZeroTimerEvent:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::GraphicsSceneMouseMove:
- case QEvent::GraphicsSceneMousePress:
- case QEvent::GraphicsSceneMouseRelease:
- case QEvent::GraphicsSceneMouseDoubleClick: {
- QGraphicsSceneMouseEvent *me = static_cast<QGraphicsSceneMouseEvent*>(e);
- QGraphicsSceneMouseEvent *me2 = new QGraphicsSceneMouseEvent(me->type());
- me2->setWidget(me->widget());
- me2->setPos(me->pos());
- me2->setScenePos(me->scenePos());
- me2->setScreenPos(me->screenPos());
-// ### for all buttons
- me2->setButtonDownPos(Qt::LeftButton, me->buttonDownPos(Qt::LeftButton));
- me2->setButtonDownPos(Qt::RightButton, me->buttonDownPos(Qt::RightButton));
- me2->setButtonDownScreenPos(Qt::LeftButton, me->buttonDownScreenPos(Qt::LeftButton));
- me2->setButtonDownScreenPos(Qt::RightButton, me->buttonDownScreenPos(Qt::RightButton));
- me2->setLastPos(me->lastPos());
- me2->setLastScenePos(me->lastScenePos());
- me2->setLastScreenPos(me->lastScreenPos());
- me2->setButtons(me->buttons());
- me2->setButton(me->button());
- me2->setModifiers(me->modifiers());
- return me2;
- }
-
- case QEvent::GraphicsSceneContextMenu: {
- QGraphicsSceneContextMenuEvent *me = static_cast<QGraphicsSceneContextMenuEvent*>(e);
- QGraphicsSceneContextMenuEvent *me2 = new QGraphicsSceneContextMenuEvent(me->type());
- me2->setWidget(me->widget());
- me2->setPos(me->pos());
- me2->setScenePos(me->scenePos());
- me2->setScreenPos(me->screenPos());
- me2->setModifiers(me->modifiers());
- me2->setReason(me->reason());
- return me2;
- }
-
- case QEvent::GraphicsSceneHoverEnter:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneHoverMove:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneHoverLeave:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneHelp:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneDragEnter:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneDragMove:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneDragLeave:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneDrop:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneWheel:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::KeyboardLayoutChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::DynamicPropertyChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::TabletEnterProximity:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::TabletLeaveProximity:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::NonClientAreaMouseMove:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::NonClientAreaMouseButtonPress:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::NonClientAreaMouseButtonRelease:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::NonClientAreaMouseButtonDblClick:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::MacSizeChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::ContentsRectChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::MacGLWindowChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::FutureCallOut:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::GraphicsSceneResize:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::GraphicsSceneMove: {
- QGraphicsSceneMoveEvent *me = static_cast<QGraphicsSceneMoveEvent*>(e);
- QGraphicsSceneMoveEvent *me2 = new QGraphicsSceneMoveEvent();
- me2->setWidget(me->widget());
- me2->setNewPos(me->newPos());
- me2->setOldPos(me->oldPos());
- return me2;
- }
-
- case QEvent::CursorChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- case QEvent::ToolTipChange:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::NetworkReplyUpdated:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-
- case QEvent::GrabMouse:
- case QEvent::UngrabMouse:
- case QEvent::GrabKeyboard:
- case QEvent::UngrabKeyboard:
- return new QEvent(*e);
-
-#ifdef QT_MAC_USE_COCOA
- case QEvent::CocoaRequestModal:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
-#endif
- case QEvent::User:
- case QEvent::MaxUser:
- Q_ASSERT_X(false, "cloneEvent()", "not implemented");
- break;
- default:
- ;
- }
- return qcoreStateMachineHandler()->cloneEvent(e);
-}
-
-const QStateMachinePrivate::Handler qt_gui_statemachine_handler = {
- cloneEvent
-};
-
-static const QStateMachinePrivate::Handler *qt_guistatemachine_last_handler = 0;
-int qRegisterGuiStateMachine()
-{
- qt_guistatemachine_last_handler = QStateMachinePrivate::handler;
- QStateMachinePrivate::handler = &qt_gui_statemachine_handler;
- return 1;
-}
-Q_CONSTRUCTOR_FUNCTION(qRegisterGuiStateMachine)
-
-int qUnregisterGuiStateMachine()
-{
- QStateMachinePrivate::handler = qt_guistatemachine_last_handler;
- return 1;
-}
-Q_DESTRUCTOR_FUNCTION(qUnregisterGuiStateMachine)
-
-QT_END_NAMESPACE
diff --git a/src/gui/statemachine/qkeyeventtransition.cpp b/src/gui/statemachine/qkeyeventtransition.cpp
deleted file mode 100644
index f803711..0000000
--- a/src/gui/statemachine/qkeyeventtransition.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qkeyeventtransition.h"
-#include "qbasickeyeventtransition_p.h"
-#include <QtCore/qwrappedevent.h>
-#include <private/qeventtransition_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QKeyEventTransition
-
- \brief The QKeyEventTransition class provides a transition for key events.
-
- \since 4.6
- \ingroup statemachine
-
- QKeyEventTransition is part of \l{The State Machine Framework}.
-
- \sa QState::addTransition()
-*/
-
-/*!
- \property QKeyEventTransition::key
-
- \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)
-public:
- QKeyEventTransitionPrivate() {}
-
- QBasicKeyEventTransition *transition;
-};
-
-/*!
- Constructs a new key event transition with the given \a sourceState.
-*/
-QKeyEventTransition::QKeyEventTransition(QState *sourceState)
- : QEventTransition(*new QKeyEventTransitionPrivate, sourceState)
-{
- Q_D(QKeyEventTransition);
- d->transition = new QBasicKeyEventTransition();
-}
-
-/*!
- Constructs a new key event transition for events of the given \a type for
- the given \a object, with the given \a key and \a sourceState.
-*/
-QKeyEventTransition::QKeyEventTransition(QObject *object, QEvent::Type type,
- int key, QState *sourceState)
- : QEventTransition(*new QKeyEventTransitionPrivate, object, type, sourceState)
-{
- Q_D(QKeyEventTransition);
- d->transition = new QBasicKeyEventTransition(type, key);
-}
-
-/*!
- Constructs a new key event transition for events of the given \a type for
- the given \a object, with the given \a key, \a targets and \a sourceState.
-*/
-QKeyEventTransition::QKeyEventTransition(QObject *object, QEvent::Type type,
- int key, const QList<QAbstractState*> &targets,
- QState *sourceState)
- : QEventTransition(*new QKeyEventTransitionPrivate, object, type, targets, sourceState)
-{
- Q_D(QKeyEventTransition);
- d->transition = new QBasicKeyEventTransition(type, key);
-}
-
-/*!
- Destroys this key event transition.
-*/
-QKeyEventTransition::~QKeyEventTransition()
-{
- Q_D(QKeyEventTransition);
- delete d->transition;
-}
-
-/*!
- Returns the key that this key event transition checks for.
-*/
-int QKeyEventTransition::key() const
-{
- Q_D(const QKeyEventTransition);
- return d->transition->key();
-}
-
-/*!
- Sets the key that this key event transition will check for.
-*/
-void QKeyEventTransition::setKey(int key)
-{
- Q_D(QKeyEventTransition);
- d->transition->setKey(key);
-}
-
-/*!
- Returns the keyboard modifiers mask that this key event transition checks
- for.
-*/
-Qt::KeyboardModifiers QKeyEventTransition::modifiersMask() const
-{
- Q_D(const QKeyEventTransition);
- return d->transition->modifiersMask();
-}
-
-/*!
- Sets the keyboard \a modifiers mask that this key event transition will
- check for.
-*/
-void QKeyEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask)
-{
- Q_D(QKeyEventTransition);
- d->transition->setModifiersMask(modifiersMask);
-}
-
-/*!
- \reimp
-*/
-bool QKeyEventTransition::eventTest(QEvent *event)
-{
- Q_D(const QKeyEventTransition);
- if (!QEventTransition::eventTest(event))
- return false;
- QWrappedEvent *we = static_cast<QWrappedEvent*>(event);
- d->transition->setEventType(we->event()->type());
- return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());
-}
-
-/*!
- \reimp
-*/
-void QKeyEventTransition::onTransition(QEvent *event)
-{
- QEventTransition::onTransition(event);
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/statemachine/qkeyeventtransition.h b/src/gui/statemachine/qkeyeventtransition.h
deleted file mode 100644
index 3c8295f..0000000
--- a/src/gui/statemachine/qkeyeventtransition.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QKEYEVENTTRANSITION_H
-#define QKEYEVENTTRANSITION_H
-
-#include <QtCore/qeventtransition.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Core)
-
-class QKeyEventTransitionPrivate;
-class Q_GUI_EXPORT QKeyEventTransition : public QEventTransition
-{
- Q_OBJECT
- Q_PROPERTY(int key READ key WRITE setKey)
- Q_PROPERTY(Qt::KeyboardModifiers modifiersMask READ modifiersMask WRITE setModifiersMask)
-public:
- QKeyEventTransition(QState *sourceState = 0);
- QKeyEventTransition(QObject *object, QEvent::Type type, int key,
- QState *sourceState = 0);
- QKeyEventTransition(QObject *object, QEvent::Type type, int key,
- const QList<QAbstractState*> &targets,
- QState *sourceState = 0);
- ~QKeyEventTransition();
-
- int key() const;
- void setKey(int key);
-
- Qt::KeyboardModifiers modifiersMask() const;
- void setModifiersMask(Qt::KeyboardModifiers modifiers);
-
-protected:
- void onTransition(QEvent *event);
- bool eventTest(QEvent *event);
-
-private:
- Q_DISABLE_COPY(QKeyEventTransition)
- Q_DECLARE_PRIVATE(QKeyEventTransition)
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/gui/statemachine/qmouseeventtransition.cpp b/src/gui/statemachine/qmouseeventtransition.cpp
deleted file mode 100644
index e4e18eb..0000000
--- a/src/gui/statemachine/qmouseeventtransition.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qmouseeventtransition.h"
-#include "qbasicmouseeventtransition_p.h"
-#include <QtCore/qwrappedevent.h>
-#include <QtGui/qpainterpath.h>
-#include <private/qeventtransition_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMouseEventTransition
-
- \brief The QMouseEventTransition class provides a transition for mouse events.
-
- \since 4.6
- \ingroup statemachine
-
- QMouseEventTransition is part of \l{The State Machine Framework}.
-
- \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)
-public:
- QMouseEventTransitionPrivate();
-
- QBasicMouseEventTransition *transition;
-};
-
-QMouseEventTransitionPrivate::QMouseEventTransitionPrivate()
-{
-}
-
-/*!
- Constructs a new mouse event transition with the given \a sourceState.
-*/
-QMouseEventTransition::QMouseEventTransition(QState *sourceState)
- : QEventTransition(*new QMouseEventTransitionPrivate, sourceState)
-{
- Q_D(QMouseEventTransition);
- d->transition = new QBasicMouseEventTransition();
-}
-
-/*!
- Constructs a new mouse event transition for events of the given \a type for
- the given \a object, with the given \a button and \a sourceState.
-*/
-QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type,
- Qt::MouseButton button,
- QState *sourceState)
- : QEventTransition(*new QMouseEventTransitionPrivate, object, type, sourceState)
-{
- Q_D(QMouseEventTransition);
- d->transition = new QBasicMouseEventTransition(type, button);
-}
-
-/*!
- Constructs a new mouse event transition for events of the given \a type for
- the given \a object, with the given \a button, \a targets and \a
- sourceState.
-*/
-QMouseEventTransition::QMouseEventTransition(QObject *object, QEvent::Type type,
- Qt::MouseButton button,
- const QList<QAbstractState*> &targets,
- QState *sourceState)
- : QEventTransition(*new QMouseEventTransitionPrivate, object, type, targets, sourceState)
-{
- Q_D(QMouseEventTransition);
- d->transition = new QBasicMouseEventTransition(type, button);
-}
-
-/*!
- Destroys this mouse event transition.
-*/
-QMouseEventTransition::~QMouseEventTransition()
-{
- Q_D(QMouseEventTransition);
- delete d->transition;
-}
-
-/*!
- Returns the button that this mouse event transition checks for.
-*/
-Qt::MouseButton QMouseEventTransition::button() const
-{
- Q_D(const QMouseEventTransition);
- return d->transition->button();
-}
-
-/*!
- Sets the \a button that this mouse event transition will check for.
-*/
-void QMouseEventTransition::setButton(Qt::MouseButton button)
-{
- Q_D(QMouseEventTransition);
- d->transition->setButton(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
-{
- Q_D(const QMouseEventTransition);
- return d->transition->path();
-}
-
-/*!
- Sets the \a path for this mouse event transition.
- If a valid path has been set, the transition will only trigger if the mouse
- event position (QMouseEvent::pos()) is inside the path.
-
- \sa QPainterPath::contains()
-*/
-void QMouseEventTransition::setPath(const QPainterPath &path)
-{
- Q_D(QMouseEventTransition);
- d->transition->setPath(path);
-}
-
-/*!
- \reimp
-*/
-bool QMouseEventTransition::eventTest(QEvent *event)
-{
- Q_D(const QMouseEventTransition);
- if (!QEventTransition::eventTest(event))
- return false;
- QWrappedEvent *we = static_cast<QWrappedEvent*>(event);
- d->transition->setEventType(we->event()->type());
- return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());
-}
-
-/*!
- \reimp
-*/
-void QMouseEventTransition::onTransition(QEvent *event)
-{
- QEventTransition::onTransition(event);
-}
-
-QT_END_NAMESPACE
diff --git a/src/gui/statemachine/qmouseeventtransition.h b/src/gui/statemachine/qmouseeventtransition.h
deleted file mode 100644
index 3f5f3ac..0000000
--- a/src/gui/statemachine/qmouseeventtransition.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMOUSEEVENTTRANSITION_H
-#define QMOUSEEVENTTRANSITION_H
-
-#include <QtCore/qeventtransition.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Core)
-
-class QMouseEventTransitionPrivate;
-class QPainterPath;
-class Q_GUI_EXPORT QMouseEventTransition : public QEventTransition
-{
- Q_OBJECT
- Q_PROPERTY(Qt::MouseButton button READ button WRITE setButton)
- Q_PROPERTY(Qt::KeyboardModifiers modifiersMask READ modifiersMask WRITE setModifiersMask)
-public:
- QMouseEventTransition(QState *sourceState = 0);
- QMouseEventTransition(QObject *object, QEvent::Type type,
- Qt::MouseButton button, QState *sourceState = 0);
- QMouseEventTransition(QObject *object, QEvent::Type type,
- Qt::MouseButton button,
- const QList<QAbstractState*> &targets,
- QState *sourceState = 0);
- ~QMouseEventTransition();
-
- Qt::MouseButton button() const;
- void setButton(Qt::MouseButton button);
-
- Qt::KeyboardModifiers modifiersMask() const;
- void setModifiersMask(Qt::KeyboardModifiers modifiers);
-
- QPainterPath path() const;
- void setPath(const QPainterPath &path);
-
-protected:
- void onTransition(QEvent *event);
- bool eventTest(QEvent *event);
-
-private:
- Q_DISABLE_COPY(QMouseEventTransition)
- Q_DECLARE_PRIVATE(QMouseEventTransition)
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/gui/statemachine/statemachine.pri b/src/gui/statemachine/statemachine.pri
deleted file mode 100644
index 2eb1e05..0000000
--- a/src/gui/statemachine/statemachine.pri
+++ /dev/null
@@ -1,13 +0,0 @@
-SOURCES += $$PWD/qguistatemachine.cpp
-!contains(DEFINES, QT_NO_STATEMACHINE_EVENTFILTER) {
- HEADERS += \
- $$PWD/qkeyeventtransition.h \
- $$PWD/qmouseeventtransition.h \
- $$PWD/qbasickeyeventtransition_p.h \
- $$PWD/qbasicmouseeventtransition_p.h
- SOURCES += \
- $$PWD/qkeyeventtransition.cpp \
- $$PWD/qmouseeventtransition.cpp \
- $$PWD/qbasickeyeventtransition.cpp \
- $$PWD/qbasicmouseeventtransition.cpp
-}