#include <QObjectBridge.h>
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 |
JNIObject * | jniObject () 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. |
QObjectBridge::QObjectBridge | ( | JNIEnv * | env, | |
jobject | jniObj, | |||
QObject * | qObj | |||
) | [protected] |
Constructs new QObjectBridge object.
env | the JNIEnv pointer | |
jniObj | the JavaQx object | |
qObj | the Qt object |
OutOfMemoryError |
QObjectBridge::QObjectBridge | ( | JNIEnv * | env, | |
jobject | jniObj | |||
) | [protected] |
Constructs new QObjectBridge object.
env | the JNIEnv pointer | |
jniObj | the JavaQx object |
OutOfMemoryError |
void QObjectBridge::setName | ( | JNIEnv * | env, | |
jstring | name | |||
) |
Sets the object name.
env | the JNIEnv pointer | |
name | the object name |
Reimplemented in JQToolBarBridge.
void QObjectBridge::postEvent | ( | QEvent * | e | ) |
Posts the Qt event to the Qt object.
e | the event to be posted |
void QObjectBridge::sendEvent | ( | QEvent * | e | ) |
Sends the Qt event to the Qt object.
e | the event |
void QObjectBridge::destroy | ( | JNIEnv * | env, | |
bool | notify = false | |||
) | [virtual] |
Destroys the QObjectBridge object.
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.
env | the JNIEnv pointer | |
cls | the JavaQx AbstractDisposeable class |
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.
void QObjectBridge::setBridgePointer | ( | jlong | bridgePointer | ) | [protected] |
Sets the JNI bridge of the javaqx object.
bridgePointer | the bridge of the javaqx object |
void QObjectBridge::setQObject | ( | QObject * | qObj | ) | [protected] |
Sets Qt object.
qObj | the Qt object |
void QObjectBridge::objectDestroyed | ( | QObject * | qObj | ) | [protected, virtual, slot] |
JNIObject * QObjectBridge::jniObject | ( | ) | const [inline, protected] |
QObject * QObjectBridge::qObject | ( | ) | const [inline, protected] |
Returns QObject pointer.
bool QObjectBridge::notifyDelete | ( | ) | const [inline, protected] |
Returns true
if notifies about delete.
true
if notifies about delete void QObjectBridge::setNotifyDelete | ( | bool | notifyDelete | ) | [inline, protected] |
Sets notification on object delete.
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.
sender | the sender | |
signal | the signal | |
member | the member |
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.
sender | the sender | |
signal | the signal | |
member | the member |
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.
signal | the signal | |
member | the member |
true
if succeed bool QObjectBridge::disconnect | ( | const char * | signal, | |
const char * | member | |||
) | [inline, protected] |
Disconnects a signal and a slot of this object.
signal | the signal | |
member | the member |
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.
sender | the sender | |
signal | the signal | |
member | the member |
true
if succeed jmethodID QObjectBridge::disposeMID | ( | ) | [inline, static, protected] |
Returns dispose
method ID.
dispose
method ID