// qevent.sip generated by MetaSIP on Mon Jul 27 19:09:13 2009
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2009 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 WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly
// granted herein.
// 
// 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
{

%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:
        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;
    
    default:
        sipType = 0;
    }
%End

public:
    QInputEvent(QEvent::Type type, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
    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 orient = Qt::Vertical);
    QWheelEvent(const QPoint &pos, const QPoint &globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = 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 = 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;
%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,
    };

    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);
    void setCommitString(const QString &commitString, int replaceFrom = 0, int replaceLength = 0);
    const QList<QInputMethodEvent::Attribute> &attributes() const;
    const QString &preeditString() const;
    const QString &commitString() const;
    int replacementStart() const;
    int replacementLength() const;
    QInputMethodEvent(const QInputMethodEvent &other);
};

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
{

%TypeHeaderCode
#include <qevent.h>
%End

public:
    QFileOpenEvent(const QString &file);
    virtual ~QFileOpenEvent();
    QString file() const;
};

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
{

%TypeHeaderCode
#include <qevent.h>
%End

public:
    QWindowStateChangeEvent(Qt::WindowStates aOldState);
    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
