Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qevent_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4444
    4545#include <QtCore/qglobal.h>
     46#include <QtCore/qurl.h>
     47#include <QtGui/qevent.h>
    4648
    4749QT_BEGIN_NAMESPACE
     
    5961
    6062// ### Qt 5: remove
    61 class Q_GUI_EXPORT QKeyEventEx : public QKeyEvent
     63class QKeyEventEx : public QKeyEvent
    6264{
    6365public:
     
    7779
    7880// ### Qt 5: remove
    79 class Q_GUI_EXPORT QMouseEventEx : public QMouseEvent
     81class QMouseEventEx : public QMouseEvent
    8082{
    8183public:
     
    9092};
    9193
     94class QTouchEventTouchPointPrivate
     95{
     96public:
     97    inline QTouchEventTouchPointPrivate(int id)
     98        : ref(1),
     99          id(id),
     100          state(Qt::TouchPointReleased),
     101          pressure(qreal(-1.))
     102    { }
     103
     104    inline QTouchEventTouchPointPrivate *detach()
     105    {
     106        QTouchEventTouchPointPrivate *d = new QTouchEventTouchPointPrivate(*this);
     107        d->ref = 1;
     108        if (!this->ref.deref())
     109            delete this;
     110        return d;
     111    }
     112
     113    QAtomicInt ref;
     114    int id;
     115    Qt::TouchPointStates state;
     116    QRectF rect, sceneRect, screenRect;
     117    QPointF normalizedPos,
     118            startPos, startScenePos, startScreenPos, startNormalizedPos,
     119            lastPos, lastScenePos, lastScreenPos, lastNormalizedPos;
     120    qreal pressure;
     121};
     122
     123class QNativeGestureEvent : public QEvent
     124{
     125public:
     126    enum Type {
     127        None,
     128        GestureBegin,
     129        GestureEnd,
     130        Pan,
     131        Zoom,
     132        Rotate,
     133        Swipe
     134    };
     135
     136    QNativeGestureEvent()
     137        : QEvent(QEvent::NativeGesture), gestureType(None), percentage(0)
     138#ifdef Q_WS_WIN
     139        , sequenceId(0), argument(0)
     140#endif
     141    {
     142    }
     143
     144    Type gestureType;
     145    float percentage;
     146    QPoint position;
     147    float angle;
     148#ifdef Q_WS_WIN
     149    ulong sequenceId;
     150    quint64 argument;
     151#endif
     152};
     153
     154class QGestureEventPrivate
     155{
     156public:
     157    inline QGestureEventPrivate(const QList<QGesture *> &list)
     158        : gestures(list), widget(0)
     159    {
     160    }
     161
     162    QList<QGesture *> gestures;
     163    QWidget *widget;
     164    QMap<Qt::GestureType, bool> accepted;
     165    QMap<Qt::GestureType, QWidget *> targetWidgets;
     166};
     167
     168
     169class QFileOpenEventPrivate
     170{
     171public:
     172    inline QFileOpenEventPrivate(const QUrl &url)
     173        : url(url)
     174    {
     175    }
     176
     177    QUrl url;
     178};
     179
    92180QT_END_NAMESPACE
    93181
Note: See TracChangeset for help on using the changeset viewer.