JQTabbedPaneBridge.h

00001 /*
00002  * @(#)JQTabbedPaneBridge.h  0.2.0 / 2007-11-18
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 JQTABBEDPANEBRIDGE_H
00010 #define JQTABBEDPANEBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "JQContainerBridge.h"
00015 
00016 /*^**************************************************************************^*/
00017 /*- JQTabbedPaneBridge Class.                                                -*/
00018 /*^**************************************************************************^*/
00019 
00026 class JAVAQX_EXPORT JQTabbedPaneBridge : public JQContainerBridge
00027 {
00028   Q_OBJECT
00029 protected:
00030   JQTabbedPaneBridge(JNIEnv *env, jobject obj);
00031 public slots: // native calls
00032   void insertTab(JNIEnv *env, jlong tabBridge, jint index, jstring title);
00033   void removeChild(JNIEnv *env, jlong childBridge);
00034   void setTabPlacement(JNIEnv *env, jint tabPlacement);
00035   void setTabEnabled(JNIEnv *env, jint index, jboolean enabled);
00036   void setTabTitleText(JNIEnv *env, jint index, jstring titleText);
00037   void setTabToolTipText(JNIEnv *env, jint index, jstring toolTipText);
00038   void setTabWhatsThisText(JNIEnv *env, jint index, jstring whatsThisText);
00039   void setTabIcon(JNIEnv *env, jint index, jobject iconSet);
00040   void setCurrentIndex(JNIEnv *env, jint index);
00041 public: // native calls
00042   static void initialize(JNIEnv *env, jclass cls);
00043   static jlong newInstance(JNIEnv *env, jobject obj);
00044 public: // native callbacks
00045   void currentChanged(jint selectedIndex);
00046 public:
00047   inline QTabWidget *qTabWidget() const;
00048 protected slots:
00049   void currentChangedSlot(int index);
00050 private:
00051   static jmethodID sm_currentChangedMID;
00052 };
00053 
00054 /*^**************************************************************************^*/
00055 /*- JQTabbedPaneBridge :: Public Inline Member Function.                     -*/
00056 /*^**************************************************************************^*/
00057 
00063 inline QTabWidget *JQTabbedPaneBridge::qTabWidget() const
00064 {
00065   return static_cast<QTabWidget *>(qObject());
00066 }
00067 
00068 /*^**************************************************************************^*/
00069 /*- Macro Definition.                                                        -*/
00070 /*^**************************************************************************^*/
00071 
00072 #define jqTabbedPaneBridge (reinterpret_cast<JQTabbedPaneBridge *>(bridge))
00073 
00074 #endif //JQTABBEDPANEBRIDGE_H
00075 
00076 /*^*****************************************************************************
00077   File History:
00078 
00079  - 2007-11-18 18:39:57 Slobodan
00080    Initial version
00081 
00082 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.