// qevent.sip generated by MetaSIP on Sun May  1 13:50:18 2011
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2011 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt.
// 
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file.  Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
// 
// Please review the following information to ensure GNU General
// Public Licensing requirements will be met:
// http://trolltech.com/products/qt/licenses/licensing/opensource/. If
// you are unsure which license is appropriate for your use, please
// review the following information:
// http://trolltech.com/products/qt/licenses/licensing/licensingoverview
// or contact the sales department at sales@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%ModuleCode
#include <qevent.h>
%End

class QInputEvent : QEvent /NoDefaultCtors/
{
%TypeHeaderCode
#include <qevent.h>
%End

%ConvertToSubClassCode
    switch (sipCpp->type())
    {
    case QEvent::ActionAdded:
    case QEvent::ActionChanged:
    case QEvent::ActionRemoved:
        sipType = sipType_QActionEvent;
        break;
    
    case QEvent::Close:
        sipType = sipType_QCloseEvent;
        break;
    
    case QEvent::ContextMenu:
        sipType = sipType_QContextMenuEvent;
        break;
    
    case QEvent::DragEnter:
        sipType = sipType_QDragEnterEvent;
        break;
    
    case QEvent::DragLeave:
        sipType = sipType_QDragLeaveEvent;
        break;
    
    case QEvent::DragMove:
        sipType = sipType_QDragMoveEvent;
        break;
    
    case QEvent::Drop:
        sipType = sipType_QDropEvent;
        break;
    
    case QEvent::FileOpen:
        sipType = sipType_QFileOpenEvent;
        break;
    
    case QEvent::FocusIn:
    case QEvent::FocusOut:
        sipType = sipType_QFocusEvent;
        break;
    
    case QEvent::Hide:
        sipType = sipType_QHideEvent;
        break;
    
    case QEvent::HoverEnter:
    case QEvent::HoverLeave:
    case QEvent::HoverMove:
        sipType = sipType_QHoverEvent;
        break;
    
    case QEvent::IconDrag:
        sipType = sipType_QIconDragEvent;
        break;
    
    case QEvent::InputMethod:
        sipType = sipType_QInputMethodEvent;
        break;
    
    case QEvent::KeyPress:
    case QEvent::KeyRelease:
    case QEvent::ShortcutOverride:
        sipType = sipType_QKeyEvent;
        break;
    
    case QEvent::MouseButtonDblClick:
    case QEvent::MouseButtonPress:
    case QEvent::MouseButtonRelease:
    case QEvent::MouseMove:
        sipType = sipType_QMouseEvent;
        break;
    
    case QEvent::Move:
        sipType = sipType_QMoveEvent;
        break;
    
    case QEvent::Paint:
        sipType = sipType_QPaintEvent;
        break;
    
    case QEvent::Resize:
        sipType = sipType_QResizeEvent;
        break;
    
    case QEvent::Shortcut:
        sipType = sipType_QShortcutEvent;
        break;
    
    case QEvent::Show:
        sipType = sipType_QShowEvent;
        break;
    
    case QEvent::StatusTip:
        sipType = sipType_QStatusTipEvent;
        break;
    
    case QEvent::TabletMove:
    case QEvent::TabletPress:
    case QEvent::TabletRelease:
    #if QT_VERSION >= 0x040200
    case QEvent::TabletEnterProximity:
    case QEvent::TabletLeaveProximity:
    #endif
        sipType = sipType_QTabletEvent;
        break;
    
    case QEvent::ToolTip:
    case QEvent::WhatsThis:
        sipType = sipType_QHelpEvent;
        break;
    
    case QEvent::WhatsThisClicked:
        sipType = sipType_QWhatsThisClickedEvent;
        break;
    
    case QEvent::Wheel:
        sipType = sipType_QWheelEvent;
        break;
    
    case QEvent::WindowStateChange:
        sipType = sipType_QWindowStateChangeEvent;
        break;
    
    #if QT_VERSION >= 0x040200
    case QEvent::GraphicsSceneContextMenu:
        sipType = sipType_QGraphicsSceneContextMenuEvent;
        break;
    
    case QEvent::GraphicsSceneDragEnter:
    case QEvent::GraphicsSceneDragLeave:
    case QEvent::GraphicsSceneDragMove:
    case QEvent::GraphicsSceneDrop:
        sipType = sipType_QGraphicsSceneDragDropEvent;
        break;
    
    case QEvent::GraphicsSceneHelp:
        sipType = sipType_QGraphicsSceneHelpEvent;
        break;
    
    case QEvent::GraphicsSceneHoverEnter:
    case QEvent::GraphicsSceneHoverLeave:
    case QEvent::GraphicsSceneHoverMove:
        sipType = sipType_QGraphicsSceneHoverEvent;
        break;
    
    case QEvent::GraphicsSceneMouseDoubleClick:
    case QEvent::GraphicsSceneMouseMove:
    case QEvent::GraphicsSceneMousePress:
    case QEvent::GraphicsSceneMouseRelease:
        sipType = sipType_QGraphicsSceneMouseEvent;
        break;
    
    case QEvent::GraphicsSceneWheel:
        sipType = sipType_QGraphicsSceneWheelEvent;
        break;
    #endif
    
    #if QT_VERSION >= 0x040400
    case QEvent::GraphicsSceneMove:
        sipType = sipType_QGraphicsSceneMoveEvent;
        break;
    
    case QEvent::GraphicsSceneResize:
        sipType = sipType_QGraphicsSceneResizeEvent;
        break;
    #endif
    
    #if QT_VERSION >= 0x040600
    case QEvent::TouchBegin:
    case QEvent::TouchUpdate:
    case QEvent::TouchEnd:
        sipType = sipType_QTouchEvent;
        break;
    
    case QEvent::Gesture:
        sipType = sipType_QGestureEvent;
        break;
    #endif
    
    default:
        sipType = 0;
    }
%End

public:
    virtual ~QInputEvent();
    Qt::KeyboardModifiers modifiers() const;
};

class QMouseEvent : QInputEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QMouseEvent(QEvent::Type type, const QPoint &pos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
    QMouseEvent(QEvent::Type type, const QPoint &pos, const QPoint &globalPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
    virtual ~QMouseEvent();
    const QPoint &pos() const;
    const QPoint &globalPos() const;
    int x() const;
    int y() const;
    int globalX() const;
    int globalY() const;
    Qt::MouseButton button() const;
    Qt::MouseButtons buttons() const;
%If (Qt_4_4_0 -)
    bool hasExtendedInfo() const;
%End
%If (Qt_4_4_0 -)
    QPointF posF() const;
%End
};

class QHoverEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QHoverEvent(QEvent::Type type, const QPoint &pos, const QPoint &oldPos);
    virtual ~QHoverEvent();
    const QPoint &pos() const;
    const QPoint &oldPos() const;
};

class QWheelEvent : QInputEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QWheelEvent(const QPoint &pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orientation = Qt::Vertical);
    QWheelEvent(const QPoint &pos, const QPoint &globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orientation = Qt::Vertical);
    virtual ~QWheelEvent();
    int delta() const;
    const QPoint &pos() const;
    const QPoint &globalPos() const;
    int x() const;
    int y() const;
    int globalX() const;
    int globalY() const;
    Qt::MouseButtons buttons() const;
    Qt::Orientation orientation() const;
};

class QTabletEvent : QInputEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    enum TabletDevice
    {
        NoDevice,
        Puck,
        Stylus,
        Airbrush,
        FourDMouse,
        XFreeEraser,
        RotationStylus,
    };

    enum PointerType
    {
        UnknownPointer,
        Pen,
        Cursor,
        Eraser,
    };

    QTabletEvent(QEvent::Type t, const QPoint &pos, const QPoint &globalPos, const QPointF &hiResGlobalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID);
    virtual ~QTabletEvent();
    const QPoint &pos() const;
    const QPoint &globalPos() const;
    const QPointF &hiResGlobalPos() const;
    int x() const;
    int y() const;
    int globalX() const;
    int globalY() const;
    qreal hiResGlobalX() const;
    qreal hiResGlobalY() const;
    QTabletEvent::TabletDevice device() const;
    QTabletEvent::PointerType pointerType() const;
    qint64 uniqueId() const;
    qreal pressure() const;
    int z() const;
    qreal tangentialPressure() const;
    qreal rotation() const;
    int xTilt() const;
    int yTilt() const;
};

class QKeyEvent : QInputEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text /DocValue="Py_v3:''"/ = QString(), bool autorep = false, ushort count = 1);
    virtual ~QKeyEvent();
    int key() const;
    Qt::KeyboardModifiers modifiers() const;
    QString text() const;
    bool isAutoRepeat() const;
    int count() const /__len__/;
%If (Qt_4_2_0 -)
    bool matches(QKeySequence::StandardKey key) const;
%End
%If (Qt_4_2_0 -)
    quint32 nativeModifiers() const;
%End
%If (Qt_4_2_0 -)
    quint32 nativeScanCode() const;
%End
%If (Qt_4_2_0 -)
    quint32 nativeVirtualKey() const;
%End
};

class QFocusEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QFocusEvent(QEvent::Type type, Qt::FocusReason reason = Qt::OtherFocusReason);
    virtual ~QFocusEvent();
    bool gotFocus() const;
    bool lostFocus() const;
%If (Qt_4_2_0 -)
    Qt::FocusReason reason() const;
%End
%If (- Qt_4_2_0)
    Qt::FocusReason reason();
%End
};

class QPaintEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QPaintEvent(const QRegion &paintRegion);
    QPaintEvent(const QRect &paintRect);
    virtual ~QPaintEvent();
    const QRect &rect() const;
    const QRegion &region() const;
};

class QMoveEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QMoveEvent(const QPoint &pos, const QPoint &oldPos);
    virtual ~QMoveEvent();
    const QPoint &pos() const;
    const QPoint &oldPos() const;
};

class QResizeEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QResizeEvent(const QSize &size, const QSize &oldSize);
    virtual ~QResizeEvent();
    const QSize &size() const;
    const QSize &oldSize() const;
};

class QCloseEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QCloseEvent();
    virtual ~QCloseEvent();
};

class QIconDragEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QIconDragEvent();
    virtual ~QIconDragEvent();
};

class QShowEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QShowEvent();
    virtual ~QShowEvent();
};

class QHideEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QHideEvent();
    virtual ~QHideEvent();
};

class QContextMenuEvent : QInputEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    enum Reason
    {
        Mouse,
        Keyboard,
        Other,
    };

%If (Qt_4_4_0 -)
    QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos, const QPoint &globalPos, Qt::KeyboardModifiers modifiers);
%End
    QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos, const QPoint &globalPos);
    QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint &pos);
    virtual ~QContextMenuEvent();
    int x() const;
    int y() const;
    int globalX() const;
    int globalY() const;
    const QPoint &pos() const;
    const QPoint &globalPos() const;
    QContextMenuEvent::Reason reason() const;
};

class QInputMethodEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    enum AttributeType
    {
        TextFormat,
        Cursor,
        Language,
        Ruby,
%If (Qt_4_6_0 -)
        Selection,
%End
    };

    class Attribute
    {
%TypeHeaderCode
#include <qevent.h>
%End

    public:
        Attribute(QInputMethodEvent::AttributeType t, int s, int l, QVariant val);
        QInputMethodEvent::AttributeType type;
        int start;
        int length;
        QVariant value;
    };

    QInputMethodEvent();
    QInputMethodEvent(const QString &preeditText, const QList<QInputMethodEvent::Attribute> &attributes);
    QInputMethodEvent(const QInputMethodEvent &other);
    void setCommitString(const QString &commitString, int from = 0, int length = 0);
    const QList<QInputMethodEvent::Attribute> &attributes() const;
    const QString &preeditString() const;
    const QString &commitString() const;
    int replacementStart() const;
    int replacementLength() const;
};

class QDropEvent : QEvent, QMimeSource
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QDropEvent(const QPoint &pos, Qt::DropActions actions, const QMimeData *data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type = QEvent::Drop);
    virtual ~QDropEvent();
    const QPoint &pos() const;
    Qt::MouseButtons mouseButtons() const;
    Qt::KeyboardModifiers keyboardModifiers() const;
    Qt::DropActions possibleActions() const;
    Qt::DropAction proposedAction() const;
    void acceptProposedAction();
    Qt::DropAction dropAction() const;
    void setDropAction(Qt::DropAction action);
    QWidget *source() const;
    const QMimeData *mimeData() const;
    virtual const char *format(int n = 0) const;
    virtual QByteArray encodedData(const char *) const;
    virtual bool provides(const char *) const;
};

class QDragMoveEvent : QDropEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QDragMoveEvent(const QPoint &pos, Qt::DropActions actions, const QMimeData *data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type = QEvent::DragMove);
    virtual ~QDragMoveEvent();
    QRect answerRect() const;
    void accept();
    void ignore();
    void accept(const QRect &r);
    void ignore(const QRect &r);
};

class QDragEnterEvent : QDragMoveEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QDragEnterEvent(const QPoint &pos, Qt::DropActions actions, const QMimeData *data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
    virtual ~QDragEnterEvent();
};

class QDragLeaveEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QDragLeaveEvent();
    virtual ~QDragLeaveEvent();
};

class QHelpEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QHelpEvent(QEvent::Type type, const QPoint &pos, const QPoint &globalPos);
    virtual ~QHelpEvent();
    int x() const;
    int y() const;
    int globalX() const;
    int globalY() const;
    const QPoint &pos() const;
    const QPoint &globalPos() const;
};

class QStatusTipEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QStatusTipEvent(const QString &tip);
    virtual ~QStatusTipEvent();
    QString tip() const;
};

class QWhatsThisClickedEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QWhatsThisClickedEvent(const QString &href);
    virtual ~QWhatsThisClickedEvent();
    QString href() const;
};

class QActionEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QActionEvent(int type, QAction *action, QAction *before = 0);
    virtual ~QActionEvent();
    QAction *action() const;
    QAction *before() const;
};

class QFileOpenEvent : QEvent /NoDefaultCtors/
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    virtual ~QFileOpenEvent();
    QString file() const;
%If (Qt_4_6_0 -)
    QUrl url() const;
%End
};

class QShortcutEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QShortcutEvent(const QKeySequence &key, int id, bool ambiguous = false);
    virtual ~QShortcutEvent();
%If (Qt_4_2_0 -)
    bool isAmbiguous() const;
%End
%If (- Qt_4_2_0)
    bool isAmbiguous();
%End
%If (Qt_4_2_0 -)
    const QKeySequence &key() const;
%End
%If (- Qt_4_2_0)
    const QKeySequence &key();
%End
%If (Qt_4_2_0 -)
    int shortcutId() const;
%End
%If (- Qt_4_2_0)
    int shortcutId();
%End
};

class QWindowStateChangeEvent : QEvent /NoDefaultCtors/
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    virtual ~QWindowStateChangeEvent();
    Qt::WindowStates oldState() const;
};

%If (Qt_4_2_0 -)
bool operator==(QKeyEvent *e, QKeySequence::StandardKey key);
%End
%If (Qt_4_2_0 -)
bool operator==(QKeySequence::StandardKey key, QKeyEvent *e);
%End
%If (Qt_4_6_0 -)

class QTouchEvent : QInputEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    class TouchPoint /NoDefaultCtors/
    {
%TypeHeaderCode
#include <qevent.h>
%End

    public:
        int id() const;
        Qt::TouchPointState state() const;
        bool isPrimary() const;
        QPointF pos() const;
        QPointF startPos() const;
        QPointF lastPos() const;
        QPointF scenePos() const;
        QPointF startScenePos() const;
        QPointF lastScenePos() const;
        QPointF screenPos() const;
        QPointF startScreenPos() const;
        QPointF lastScreenPos() const;
        QPointF normalizedPos() const;
        QPointF startNormalizedPos() const;
        QPointF lastNormalizedPos() const;
        QRectF rect() const;
        QRectF sceneRect() const;
        QRectF screenRect() const;
        qreal pressure() const;
    };

    enum DeviceType
    {
        TouchScreen,
        TouchPad,
    };

    QTouchEvent(QEvent::Type eventType, QTouchEvent::DeviceType deviceType = QTouchEvent::TouchScreen, Qt::KeyboardModifiers modifiers = Qt::NoModifier, Qt::TouchPointStates touchPointStates = 0, const QList<QTouchEvent::TouchPoint> &touchPoints = QList<QTouchEvent::TouchPoint>());
    virtual ~QTouchEvent();
    QWidget *widget() const;
    QTouchEvent::DeviceType deviceType() const;
    Qt::TouchPointStates touchPointStates() const;
    const QList<QTouchEvent::TouchPoint> &touchPoints() const;
};

%End
%If (Qt_4_6_0 -)

class QGestureEvent : QEvent
{
%TypeHeaderCode
#include <qevent.h>
%End

public:
    QGestureEvent(const QList<QGesture*> &gestures);
    virtual ~QGestureEvent();
    QList<QGesture*> gestures() const;
    QGesture *gesture(Qt::GestureType type) const;
    QList<QGesture*> activeGestures() const;
    QList<QGesture*> canceledGestures() const;
    void setAccepted(bool accepted);
    bool isAccepted() const;
    void accept();
    void ignore();
    void setAccepted(QGesture *, bool);
    void accept(QGesture *);
    void ignore(QGesture *);
    bool isAccepted(QGesture *) const;
    void setAccepted(Qt::GestureType, bool);
    void accept(Qt::GestureType);
    void ignore(Qt::GestureType);
    bool isAccepted(Qt::GestureType) const;
    QWidget *widget() const;
    QPointF mapToGraphicsScene(const QPointF &gesturePoint) const;
};

%End
