VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Types | Signals | Public Member Functions | Properties | List of all members

Raised when two Bodys begin or end contact with each other. More...

Inheritance diagram for ContactEvent:
TriggerEvent QObject

Public Types

enum  Contact { ContactBegun = 0, ContactEnded }
 Types of ContactEvents that can occur. More...
 

Signals

void otherBodyChanged ()
 Emitted when otherBody changes. More...
 
void contactChanged ()
 Emitted when contact changes. More...
 

Public Member Functions

 ContactEvent ()
 Constructor of the ContactEvent. More...
 
 ContactEvent (Body *body, Contact contact)
 Constructor for the ContactEvent. More...
 
WRITE setContact NOTIFY
contactChanged Body
getOtherBody () const
 Returns otherBody. More...
 
void setOtherBody (Body *value)
 Sets otherBody. More...
 
Contact getContact () const
 Returns contact. More...
 
void setContact (Contact value)
 Sets contact. More...
 
virtual QVariant toVariant () override
 Returns the ContactEvent as a QVariant. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegExp &regExp, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegularExpression &re, QFlags< Qt::FindChildOption > options) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
 
bool disconnect (const QObject *receiver, const char *method) const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 

Properties

Body otherBody
 Body that is in contact with the Body that is receieving this ContactEvent. More...
 
Contact contact
 Contact that the event is about. More...
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 

Detailed Description

Raised when two Bodys begin or end contact with each other.

Member Enumeration Documentation

Types of ContactEvents that can occur.

Enumerator
ContactBegun 

Occurs when two Bodys come in contact.

ContactEnded 

Occurs when two Bodys are no longer in contact.

Constructor & Destructor Documentation

ContactEvent::ContactEvent ( )
inline

Constructor of the ContactEvent.

ContactEvent::ContactEvent ( Body body,
Contact  contact 
)

Constructor for the ContactEvent.

Parameters
bodyBody that will receive this ContactEvent
contactContact that began or ended

Member Function Documentation

void ContactEvent::contactChanged ( )
signal

Emitted when contact changes.

Contact ContactEvent::getContact ( ) const
inline

Returns contact.

WRITE setContact NOTIFY contactChanged Body* ContactEvent::getOtherBody ( ) const
inline

Returns otherBody.

void ContactEvent::otherBodyChanged ( )
signal

Emitted when otherBody changes.

void ContactEvent::setContact ( Contact  value)

Sets contact.

Parameters
valueContact to set contact to
void ContactEvent::setOtherBody ( Body value)

Sets otherBody.

Parameters
valueBody to set otherBody to
virtual QVariant ContactEvent::toVariant ( )
inlineoverridevirtual

Returns the ContactEvent as a QVariant.

Reimplemented from TriggerEvent.

Property Documentation

Contact ContactEvent::contact
read

Contact that the event is about.

Body ContactEvent::otherBody
read

Body that is in contact with the Body that is receieving this ContactEvent.