You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
858 lines
15 KiB
858 lines
15 KiB
13 years ago
|
// This is the SIP interface definition for TQEvent, TQChildEvent, TQCloseEvent,
|
||
|
// TQIconDragEvent, TQContextMenuEvent, TQCustomEvent, TQDragEnterEvent,
|
||
|
// TQDragLeaveEvent, TQDragMoveEvent, TQDropEvent, TQFocusEvent, TQHideEvent,
|
||
|
// TQIMEvent, TQIMComposeEvent, TQKeyEvent, TQMouseEvent, TQMoveEvent, TQPaintEvent,
|
||
|
// TQResizeEvent, TQShowEvent, TQTabletEvent, TQTimerEvent, TQWheelEvent.
|
||
13 years ago
|
//
|
||
|
// Copyright (c) 2007
|
||
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
//
|
||
13 years ago
|
// This file is part of PyTQt.
|
||
13 years ago
|
//
|
||
13 years ago
|
// This copy of PyTQt is free software; you can redistribute it and/or modify it
|
||
13 years ago
|
// under the terms of the GNU General Public License as published by the Free
|
||
|
// Software Foundation; either version 2, or (at your option) any later
|
||
|
// version.
|
||
|
//
|
||
13 years ago
|
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
||
13 years ago
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||
|
// details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License along with
|
||
13 years ago
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
||
13 years ago
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
|
|
||
|
|
||
|
%ExportedDoc
|
||
13 years ago
|
<Sect2><Title>TQEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
<Para>
|
||
13 years ago
|
Instances of <Literal>TQEvent</Literal>s are automatically converted to the
|
||
13 years ago
|
correct sub-class.
|
||
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQChildEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQChildEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQCloseEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQCloseEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQIconDragEvent (TQt v3.3+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQIconDragEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQContextMenuEvent (TQt v3+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQContextMenuEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQCustomEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQCustomEvent</Literal> is fully implemented. Any Python object can be
|
||
13 years ago
|
passed as the event data and its reference count is increased.
|
||
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQDragEnterEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQDragEnterEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQDragLeaveEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQDragLeaveEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQDragMoveEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQDragMoveEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQDropEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQDropEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQFocusEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQFocusEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQHideEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQHideEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQIMComposeEvent (TQt v3.1+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQIMComposeEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQIMEvent (TQt v3+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQIMEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQKeyEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQKeyEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQMouseEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQMouseEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQMoveEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQMoveEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQPaintEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQPaintEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQResizeEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQResizeEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQShowEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQShowEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQTabletEvent (TQt v3+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQTabletEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQTimerEvent</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQTimerEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQWheelEvent (TQt v2+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQWheelEvent</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
%End
|
||
|
|
||
|
|
||
|
%ModuleHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQEvent : TQt
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
|
enum Type
|
||
|
{
|
||
|
None,
|
||
|
Timer,
|
||
|
MouseButtonPress,
|
||
|
MouseButtonRelease,
|
||
|
MouseButtonDblClick,
|
||
|
MouseMove,
|
||
|
KeyPress,
|
||
|
KeyRelease,
|
||
|
FocusIn,
|
||
|
FocusOut,
|
||
|
Enter,
|
||
|
Leave,
|
||
|
Paint,
|
||
|
Move,
|
||
|
Resize,
|
||
|
Create,
|
||
|
Destroy,
|
||
|
Show,
|
||
|
Hide,
|
||
|
Close,
|
||
|
Quit,
|
||
|
Reparent,
|
||
|
ShowMinimized,
|
||
|
ShowNormal,
|
||
|
WindowActivate,
|
||
|
WindowDeactivate,
|
||
|
ShowToParent,
|
||
|
HideToParent,
|
||
|
ShowMaximized,
|
||
|
ShowFullScreen,
|
||
|
Accel,
|
||
|
Wheel,
|
||
|
AccelAvailable,
|
||
|
CaptionChange,
|
||
|
IconChange,
|
||
|
ParentFontChange,
|
||
|
ApplicationFontChange,
|
||
|
ParentPaletteChange,
|
||
|
ApplicationPaletteChange,
|
||
|
PaletteChange,
|
||
|
Clipboard,
|
||
|
Speech,
|
||
|
SockAct,
|
||
|
AccelOverride,
|
||
|
DeferredDelete,
|
||
|
DragEnter,
|
||
|
DragMove,
|
||
|
DragLeave,
|
||
|
Drop,
|
||
|
DragResponse,
|
||
|
ChildInserted,
|
||
|
ChildRemoved,
|
||
|
LayoutHint,
|
||
|
ShowWindowRequest,
|
||
|
WindowBlocked,
|
||
|
WindowUnblocked,
|
||
|
ActivateControl,
|
||
|
DeactivateControl,
|
||
|
ContextMenu,
|
||
|
IMStart,
|
||
|
IMCompose,
|
||
|
IMEnd,
|
||
|
Accessibility,
|
||
|
TabletMove,
|
||
|
LocaleChange,
|
||
|
LanguageChange,
|
||
|
LayoutDirectionChange,
|
||
|
Style,
|
||
|
TabletPress,
|
||
|
TabletRelease,
|
||
|
OkRequest,
|
||
|
HelpRequest,
|
||
|
IconDrag,
|
||
|
WindowStateChange,
|
||
|
User,
|
||
|
MaxUser,
|
||
|
};
|
||
|
|
||
13 years ago
|
TQEvent(Type);
|
||
|
TQEvent(TQEvent&);
|
||
|
virtual ~TQEvent();
|
||
13 years ago
|
|
||
|
Type type() const;
|
||
|
bool spontaneous() const;
|
||
|
|
||
|
%ConvertToSubClassCode
|
||
|
switch (sipCpp -> type())
|
||
|
{
|
||
13 years ago
|
case TQEvent::Timer:
|
||
13 years ago
|
sipClass = sipClass_TQTimerEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::MouseButtonPress:
|
||
|
case TQEvent::MouseButtonRelease:
|
||
|
case TQEvent::MouseButtonDblClick:
|
||
|
case TQEvent::MouseMove:
|
||
13 years ago
|
sipClass = sipClass_TQMouseEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Accel:
|
||
|
case TQEvent::AccelOverride:
|
||
|
case TQEvent::KeyPress:
|
||
|
case TQEvent::KeyRelease:
|
||
13 years ago
|
sipClass = sipClass_TQKeyEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::FocusIn:
|
||
|
case TQEvent::FocusOut:
|
||
13 years ago
|
sipClass = sipClass_TQFocusEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Paint:
|
||
13 years ago
|
sipClass = sipClass_TQPaintEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Move:
|
||
13 years ago
|
sipClass = sipClass_TQMoveEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Resize:
|
||
13 years ago
|
sipClass = sipClass_TQResizeEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Close:
|
||
13 years ago
|
sipClass = sipClass_TQCloseEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::IconDrag:
|
||
13 years ago
|
sipClass = sipClass_TQIconDragEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Wheel:
|
||
13 years ago
|
sipClass = sipClass_TQWheelEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Show:
|
||
13 years ago
|
sipClass = sipClass_TQShowEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Hide:
|
||
13 years ago
|
sipClass = sipClass_TQHideEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
#if defined(SIP_FEATURE_TQt_DRAGANDDROP)
|
||
|
case TQEvent::DragMove:
|
||
13 years ago
|
sipClass = sipClass_TQDragMoveEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::DragEnter:
|
||
13 years ago
|
sipClass = sipClass_TQDragEnterEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::DragLeave:
|
||
13 years ago
|
sipClass = sipClass_TQDragLeaveEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::Drop:
|
||
13 years ago
|
sipClass = sipClass_TQDropEvent;
|
||
13 years ago
|
break;
|
||
|
#endif
|
||
|
|
||
13 years ago
|
case TQEvent::ChildInserted:
|
||
|
case TQEvent::ChildRemoved:
|
||
13 years ago
|
sipClass = sipClass_TQChildEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::ContextMenu:
|
||
13 years ago
|
sipClass = sipClass_TQContextMenuEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::IMStart:
|
||
|
case TQEvent::IMEnd:
|
||
13 years ago
|
sipClass = sipClass_TQIMEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::IMCompose:
|
||
13 years ago
|
sipClass = sipClass_TQIMComposeEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
13 years ago
|
case TQEvent::TabletMove:
|
||
|
case TQEvent::TabletPress:
|
||
|
case TQEvent::TabletRelease:
|
||
13 years ago
|
sipClass = sipClass_TQTabletEvent;
|
||
13 years ago
|
break;
|
||
|
|
||
|
default:
|
||
13 years ago
|
sipClass = (sipCpp -> type() < TQEvent::User ?
|
||
13 years ago
|
sipClass_TQEvent :
|
||
|
sipClass_TQCustomEvent);
|
||
13 years ago
|
}
|
||
|
%End
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQTimerEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQTimerEvent(int);
|
||
13 years ago
|
|
||
|
int timerId() const;
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQMouseEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQMouseEvent(Type,const TQPoint &,int,int);
|
||
|
TQMouseEvent(Type,const TQPoint &,const TQPoint &,int,int);
|
||
13 years ago
|
|
||
13 years ago
|
const TQPoint &pos() const;
|
||
|
const TQPoint &globalPos() const;
|
||
13 years ago
|
int x() const;
|
||
|
int y() const;
|
||
|
int globalX() const;
|
||
|
int globalY() const;
|
||
|
ButtonState button() const;
|
||
|
ButtonState state() const;
|
||
|
ButtonState stateAfter() const;
|
||
|
bool isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQWheelEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQWheelEvent(const TQPoint &,int,int,Orientation = Vertical);
|
||
|
TQWheelEvent(const TQPoint &,const TQPoint &,int,int,
|
||
13 years ago
|
Orientation = Vertical);
|
||
|
|
||
|
int delta() const;
|
||
13 years ago
|
const TQPoint &pos() const;
|
||
|
const TQPoint &globalPos() const;
|
||
13 years ago
|
int x() const;
|
||
|
int y() const;
|
||
|
int globalX() const;
|
||
|
int globalY() const;
|
||
|
ButtonState state() const;
|
||
|
Orientation orientation() const;
|
||
|
bool isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQTabletEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
|
enum TabletDevice {
|
||
|
NoDevice,
|
||
|
Puck,
|
||
|
Stylus,
|
||
|
Eraser
|
||
|
};
|
||
|
|
||
13 years ago
|
TQTabletEvent(Type,const TQPoint &,const TQPoint &,int,int,int,int,
|
||
|
const TQPair<int,int> &);
|
||
|
TQTabletEvent(const TQPoint &,const TQPoint &,int,int,int,int,
|
||
|
const TQPair<int,int> &);
|
||
13 years ago
|
|
||
|
int pressure() const;
|
||
|
int xTilt() const;
|
||
|
int yTilt() const;
|
||
13 years ago
|
const TQPoint &pos() const;
|
||
|
const TQPoint &globalPos() const;
|
||
13 years ago
|
int x() const;
|
||
|
int y() const;
|
||
|
int globalX() const;
|
||
|
int globalY() const;
|
||
|
TabletDevice device() const;
|
||
|
int isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
13 years ago
|
TQPair<int,int> uniqueId();
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQKeyEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQKeyEvent(Type,int,int,int,const TQString & = TQString::null,bool = 0,
|
||
13 years ago
|
ushort = 1);
|
||
|
|
||
|
int key() const;
|
||
|
int ascii() const;
|
||
|
bool isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
|
||
|
ButtonState state() const;
|
||
|
ButtonState stateAfter() const;
|
||
13 years ago
|
TQString text() const;
|
||
13 years ago
|
bool isAutoRepeat() const;
|
||
|
int count() const;
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQFocusEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQFocusEvent(Type);
|
||
13 years ago
|
|
||
|
bool gotFocus() const;
|
||
|
bool lostFocus() const;
|
||
|
|
||
|
enum Reason {
|
||
|
Mouse,
|
||
|
Tab,
|
||
|
Backtab,
|
||
|
ActiveWindow,
|
||
|
Popup,
|
||
|
Shortcut,
|
||
|
Other
|
||
|
};
|
||
|
|
||
|
static Reason reason();
|
||
|
static void setReason(Reason);
|
||
|
static void resetReason();
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQPaintEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQPaintEvent(const TQRegion &,bool = 1);
|
||
|
TQPaintEvent(const TQRect &,bool = 1);
|
||
|
TQPaintEvent(const TQRegion &,const TQRect &,bool = 1);
|
||
13 years ago
|
|
||
13 years ago
|
const TQRect &rect() const;
|
||
|
const TQRegion ®ion() const;
|
||
13 years ago
|
bool erased() const;
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQMoveEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQMoveEvent(const TQPoint &,const TQPoint &);
|
||
13 years ago
|
|
||
13 years ago
|
const TQPoint &pos() const;
|
||
|
const TQPoint &oldPos() const;
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQResizeEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQResizeEvent(const TQSize &,const TQSize &);
|
||
13 years ago
|
|
||
13 years ago
|
const TQSize &size() const;
|
||
|
const TQSize &oldSize() const;
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQCloseEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQCloseEvent();
|
||
13 years ago
|
|
||
|
bool isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQIconDragEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQIconDragEvent();
|
||
13 years ago
|
|
||
|
bool isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQShowEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQShowEvent();
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQHideEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQHideEvent();
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQContextMenuEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
|
enum Reason {
|
||
|
Mouse,
|
||
|
Keyboard,
|
||
|
Other
|
||
|
};
|
||
|
|
||
13 years ago
|
TQContextMenuEvent(Reason,const TQPoint &,const TQPoint &,int);
|
||
|
TQContextMenuEvent(Reason,const TQPoint &,int);
|
||
13 years ago
|
|
||
|
int x() const;
|
||
|
int y() const;
|
||
|
int globalX() const;
|
||
|
int globalY() const;
|
||
|
|
||
13 years ago
|
const TQPoint &pos() const;
|
||
|
const TQPoint &globalPos() const;
|
||
13 years ago
|
|
||
|
ButtonState state() const;
|
||
|
bool isAccepted() const;
|
||
|
bool isConsumed() const;
|
||
|
void consume();
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
Reason reason() const;
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQIMEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQIMEvent(Type,const TQString &,int);
|
||
13 years ago
|
|
||
13 years ago
|
const TQString &text() const;
|
||
13 years ago
|
int cursorPos() const;
|
||
|
bool isAccepted() const;
|
||
|
void accept();
|
||
|
void ignore();
|
||
|
int selectionLength() const;
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQIMComposeEvent : TQIMEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQIMComposeEvent(Type,const TQString &,int,int);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
%If (TQt_DRAGANDDROP)
|
||
13 years ago
|
|
||
13 years ago
|
class TQDropEvent : TQEvent, TQMimeSource
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQDropEvent(const TQPoint &,Type = Drop);
|
||
13 years ago
|
|
||
13 years ago
|
const TQPoint &pos() const;
|
||
13 years ago
|
bool isAccepted() const;
|
||
|
void accept(bool = 1);
|
||
|
void ignore();
|
||
|
bool isActionAccepted() const;
|
||
|
void acceptAction(bool = 1);
|
||
|
|
||
|
enum Action
|
||
|
{
|
||
|
Copy,
|
||
|
Link,
|
||
|
Move,
|
||
|
Private,
|
||
|
UserAction = 100
|
||
|
};
|
||
|
|
||
|
void setAction(Action);
|
||
|
Action action() const;
|
||
13 years ago
|
TQWidget *source() const;
|
||
13 years ago
|
const char *format(int = 0) const;
|
||
13 years ago
|
TQByteArray encodedData(const char *) const;
|
||
13 years ago
|
bool provides(const char *) const;
|
||
13 years ago
|
TQByteArray data(const char *) const;
|
||
|
void setPoint(const TQPoint &);
|
||
13 years ago
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
%If (TQt_DRAGANDDROP)
|
||
13 years ago
|
|
||
13 years ago
|
class TQDragMoveEvent : TQDropEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQDragMoveEvent(const TQPoint &,Type = DragMove);
|
||
13 years ago
|
|
||
13 years ago
|
TQRect answerRect() const;
|
||
13 years ago
|
void accept(bool = 1);
|
||
13 years ago
|
void accept(const TQRect &);
|
||
|
void ignore(const TQRect &);
|
||
13 years ago
|
void ignore();
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQDragEnterEvent : TQDragMoveEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQDragEnterEvent(const TQPoint &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQDragLeaveEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQDragLeaveEvent();
|
||
13 years ago
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQChildEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQChildEvent(Type,TQObject *);
|
||
13 years ago
|
|
||
13 years ago
|
TQObject *child() const;
|
||
13 years ago
|
bool inserted() const;
|
||
|
bool removed() const;
|
||
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQCustomEvent : TQEvent
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqevent.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQCustomEvent(Type,SIP_PYOBJECT /Transfer/);
|
||
|
TQCustomEvent(int);
|
||
|
~TQCustomEvent();
|
||
13 years ago
|
%VirtualCatcherCode
|
||
|
// We need to garbage collect any current data.
|
||
|
|
||
|
PyObject *old = reinterpret_cast<PyObject *>(data());
|
||
|
|
||
|
SIP_BLOCK_THREADS
|
||
|
Py_XDECREF(old);
|
||
|
SIP_UNBLOCK_THREADS
|
||
|
%End
|
||
|
|
||
|
SIP_PYOBJECT data() const;
|
||
|
%MethodCode
|
||
|
// We need to cast the result.
|
||
|
|
||
13 years ago
|
sipRes = reinterpret_cast<PyObject *>(sipCpp -> TQCustomEvent::data());
|
||
13 years ago
|
|
||
|
// In case the event has been created from C++ code.
|
||
|
if (!sipRes)
|
||
|
sipRes = Py_None;
|
||
|
|
||
|
Py_INCREF(sipRes);
|
||
|
%End
|
||
|
|
||
|
void setData(SIP_PYOBJECT /Transfer/);
|
||
|
%MethodCode
|
||
|
// We need to garbage collect any current data.
|
||
|
|
||
13 years ago
|
PyObject *old = reinterpret_cast<PyObject *>(sipCpp -> TQCustomEvent::data());
|
||
|
sipCpp -> TQCustomEvent::setData(a0);
|
||
13 years ago
|
|
||
|
Py_XDECREF(old);
|
||
|
%End
|
||
|
|
||
|
%GCTraverseCode
|
||
|
// Support the Python garbage collector. Although it's not obviously
|
||
|
// documented, we can't release the GIL in traverse code.
|
||
|
|
||
13 years ago
|
PyObject *obj = reinterpret_cast<PyObject *>(sipCpp -> TQCustomEvent::data());
|
||
13 years ago
|
|
||
|
if (obj)
|
||
|
sipRes = sipVisit(obj, sipArg);
|
||
|
else
|
||
|
sipRes = 0;
|
||
|
%End
|
||
|
|
||
|
%GCClearCode
|
||
|
// Support the Python garbage collector.
|
||
|
|
||
13 years ago
|
PyObject *obj = reinterpret_cast<PyObject *>(sipCpp -> TQCustomEvent::data());
|
||
13 years ago
|
|
||
13 years ago
|
sipCpp -> TQCustomEvent::setData(0);
|
||
13 years ago
|
|
||
|
Py_XDECREF(obj);
|
||
|
|
||
|
sipRes = 0;
|
||
|
%End
|
||
|
};
|