00001 /* 00002 * @(#)JQToolButtonBridge.h 0.2.0 / 2007-11-12 00003 * 00004 * Copyright (c) 2007, ETF and contributors. All rights reserved. 00005 * 00006 * This software is licensed under the LGPL, version 2.1, license. 00007 * A copy of the license is included in the file LICENSE-LGPL.txt. 00008 */ 00009 #ifndef JQTOOLBUTTONBRIDGE_H 00010 #define JQTOOLBUTTONBRIDGE_H 00011 00012 #include "JavaQxQSwing.h" 00013 00014 #include "JQAbstractButtonBridge.h" 00015 00016 /*^**************************************************************************^*/ 00017 /*- JQToolButtonBridge Class. -*/ 00018 /*^**************************************************************************^*/ 00019 00026 class JAVAQX_EXPORT JQToolButtonBridge : public JQAbstractButtonBridge 00027 { 00028 Q_OBJECT 00029 protected: 00030 JQToolButtonBridge(JNIEnv *env, jobject obj); 00031 public slots: // native calls 00032 void setMenu(JNIEnv *env, jlong menuBridge); 00033 void setPopupMode(JNIEnv *env, jint popupMode); 00034 void setToolButtonStyle(JNIEnv *env, jint toolButtonStyle); 00035 public: // native calls 00036 static jlong newInstance(JNIEnv *env, jobject obj); 00037 public: 00038 inline QToolButton *qToolButton() const; 00039 }; 00040 00041 /*^**************************************************************************^*/ 00042 /*- JQToolButtonBridge :: Public Inline Member Function. -*/ 00043 /*^**************************************************************************^*/ 00044 00050 inline QToolButton *JQToolButtonBridge::qToolButton() const 00051 { 00052 return static_cast<QToolButton *>(qObject()); 00053 } 00054 00055 /*^**************************************************************************^*/ 00056 /*- Macro Definition. -*/ 00057 /*^**************************************************************************^*/ 00058 00059 #define jqToolButtonBridge (reinterpret_cast<JQToolButtonBridge *>(bridge)) 00060 00061 #endif //JQTOOLBUTTONBRIDGE_H 00062 00063 /*^***************************************************************************** 00064 File History: 00065 00066 - 2007-11-12 10:36:16 Slobodan 00067 Initial version 00068 00069 *****************************************************************************^*/