QObjectBridge Class Reference

Abstract QObject-JavaQx Object Bridge. More...

#include <QObjectBridge.h>

Inheritance diagram for QObjectBridge:

JQComponentBridge TextDocumentBridge GLJQComponentBridge JQAbstractButtonBridge JQActionComponentBridge JQContainerBridge JQLabelBridge JQProgressBarBridge JQScrollBarBridge JQScrollPaneBridge JQSliderBridge JQSplitPaneBridge JQTextComponentBridge JQTextFieldBridge JQTreeBridge PlainDocumentBridge StyledDocumentBridge

List of all members.

Public Member Functions

void setName (JNIEnv *env, jstring name)
 Sets the object name.
void postEvent (QEvent *e)
 Posts the Qt event to the Qt object.
void sendEvent (QEvent *e)
 Sends the Qt event to the Qt object.
virtual void destroy (JNIEnv *env, bool notify=false)
 Destroys the QObjectBridge object.

Static Public Member Functions

static void initialize (JNIEnv *env, jclass cls)
 Initializes QObjectBridge class.

Static Public Attributes

static const char *const BRIDGE_PROPERTY_NAME = "QObjectBridge"
static const QVariant INVALID_QVARIANT

Protected Slots

virtual void objectDestroyed (QObject *qObj)
 Object destroyed slot.

Protected Member Functions

 QObjectBridge (JNIEnv *env, jobject jniObj, QObject *qObj)
 Constructs new QObjectBridge object.
 QObjectBridge (JNIEnv *env, jobject jniObj)
 Constructs new QObjectBridge object.
virtual ~QObjectBridge ()
 Destructs QObjectBridge object.
jlong bridgePointer ()
 Returns the JNI bridge of the javaqx object.
void setBridgePointer (jlong bridgePointer)
 Sets the JNI bridge of the javaqx object.
void setQObject (QObject *qObj)
 Sets Qt object.
virtual jfieldID bridgePointerFID () const =0
JNIObjectjniObject () const
 Returns JNIObject pointer.
QObject * qObject () const
 Returns QObject pointer.
bool notifyDelete () const
 Returns true if notifies about delete.
void setNotifyDelete (bool notifyDelete)
 Sets notification on object delete.
bool connectAuto (const QObject *sender, const char *signal, const char *member) const
 Connects a signal and a slot of this object using AutoConnection mode.
bool connectDirect (const QObject *sender, const char *signal, const char *member) const
 Connects a signal and a slot of this object using DirectConnection mode.
bool connectQueued (const char *signal, const char *member) const
 Connects a signal and a slot of this object using QueuedConnection mode.
bool disconnect (const char *signal, const char *member)
 Disconnects a signal and a slot of this object.
bool disconnect (const QObject *sender, const char *signal, const char *member)
 Disconnects a signal and a slot of this object.

Static Protected Member Functions

static jmethodID disposeMID ()
 Returns dispose method ID.


Detailed Description

Abstract QObject-JavaQx Object Bridge.

Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)
Version:
0.2.0

Constructor & Destructor Documentation

QObjectBridge::QObjectBridge ( JNIEnv *  env,
jobject  jniObj,
QObject *  qObj 
) [protected]

Constructs new QObjectBridge object.

Parameters:
env the JNIEnv pointer
jniObj the JavaQx object
qObj the Qt object
Exceptions:
OutOfMemoryError 

QObjectBridge::QObjectBridge ( JNIEnv *  env,
jobject  jniObj 
) [protected]

Constructs new QObjectBridge object.

Parameters:
env the JNIEnv pointer
jniObj the JavaQx object
Exceptions:
OutOfMemoryError 


Member Function Documentation

void QObjectBridge::setName ( JNIEnv *  env,
jstring  name 
)

Sets the object name.

Parameters:
env the JNIEnv pointer
name the object name

Reimplemented in JQToolBarBridge.

void QObjectBridge::postEvent ( QEvent *  e  ) 

Posts the Qt event to the Qt object.

Parameters:
e the event to be posted

void QObjectBridge::sendEvent ( QEvent *  e  ) 

Sends the Qt event to the Qt object.

Parameters:
e the event

void QObjectBridge::destroy ( JNIEnv *  env,
bool  notify = false 
) [virtual]

Destroys the QObjectBridge object.

Parameters:
env the JNIEnv pointer
notify if true the Java object will be notified about destroy

Reimplemented in JQComponentBridge.

void QObjectBridge::initialize ( JNIEnv *  env,
jclass  cls 
) [static]

Initializes QObjectBridge class.

Parameters:
env the JNIEnv pointer
cls the JavaQx AbstractDisposeable class
Exceptions:
FatalError if failed

Reimplemented in ContentPaneBridge, JQAbstractButtonBridge, JQCheckBoxMenuItemBridge, JQComponentBridge, JQContainerBridge, JQDesktopPaneBridge, JQInternalFrameBridge, JQLabelBridge, JQMenuItemBridge, JQRadioButtonMenuItemBridge, JQScrollBarBridge, JQSeparatorBridge, JQSliderBridge, JQSplitPaneBridge, JQStatusBarBridge, JQTabbedPaneBridge, JQTextAreaBridge, JQTextComponentBridge, JQTextFieldBridge, JQTextPaneBridge, JQToolBarBridge, JQWindowBridge, TextDocumentBridge, and GLJQComponentBridge.

jlong QObjectBridge::bridgePointer (  )  [protected]

Returns the JNI bridge of the javaqx object.

Returns:
the bridge of the javaqx object

void QObjectBridge::setBridgePointer ( jlong  bridgePointer  )  [protected]

Sets the JNI bridge of the javaqx object.

Parameters:
bridgePointer the bridge of the javaqx object

void QObjectBridge::setQObject ( QObject *  qObj  )  [protected]

Sets Qt object.

Parameters:
qObj the Qt object

void QObjectBridge::objectDestroyed ( QObject *  qObj  )  [protected, virtual, slot]

Object destroyed slot.

Returns:
qObj the destroyed object

Reimplemented in JQActionComponentBridge.

JNIObject * QObjectBridge::jniObject (  )  const [inline, protected]

Returns JNIObject pointer.

Returns:
JNIObject pointer

QObject * QObjectBridge::qObject (  )  const [inline, protected]

Returns QObject pointer.

Returns:
QObject pointer

bool QObjectBridge::notifyDelete (  )  const [inline, protected]

Returns true if notifies about delete.

Returns:
true if notifies about delete

void QObjectBridge::setNotifyDelete ( bool  notifyDelete  )  [inline, protected]

Sets notification on object delete.

Returns:
true if notifies

bool QObjectBridge::connectAuto ( const QObject *  sender,
const char *  signal,
const char *  member 
) const [inline, protected]

Connects a signal and a slot of this object using AutoConnection mode.

Parameters:
sender the sender
signal the signal
member the member
Returns:
true if succeed

bool QObjectBridge::connectDirect ( const QObject *  sender,
const char *  signal,
const char *  member 
) const [inline, protected]

Connects a signal and a slot of this object using DirectConnection mode.

Parameters:
sender the sender
signal the signal
member the member
Returns:
true if succeed

bool QObjectBridge::connectQueued ( const char *  signal,
const char *  member 
) const [inline, protected]

Connects a signal and a slot of this object using QueuedConnection mode.

Parameters:
signal the signal
member the member
Returns:
true if succeed

bool QObjectBridge::disconnect ( const char *  signal,
const char *  member 
) [inline, protected]

Disconnects a signal and a slot of this object.

Parameters:
signal the signal
member the member
Returns:
true if succeed

bool QObjectBridge::disconnect ( const QObject *  sender,
const char *  signal,
const char *  member 
) [inline, protected]

Disconnects a signal and a slot of this object.

Parameters:
sender the sender
signal the signal
member the member
Returns:
true if succeed

jmethodID QObjectBridge::disposeMID (  )  [inline, static, protected]

Returns dispose method ID.

Returns:
dispose method ID


Copyright © 2007 ETF and contributors. All Rights Reserved.