JQToolBarBridge.h

00001 /*
00002  * @(#)JQToolBarBridge.h  0.2.0 / 2007-11-07
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 JQTOOLBARBRIDGE_H
00010 #define JQTOOLBARBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "JQContainerBridge.h"
00015 
00016 /*^**************************************************************************^*/
00017 /*- JQToolBarBridge Class.                                                   -*/
00018 /*^**************************************************************************^*/
00019 
00026 class JAVAQX_EXPORT JQToolBarBridge : public JQContainerBridge
00027 {
00028   Q_OBJECT
00029 protected:
00030   JQToolBarBridge(JNIEnv *env, jobject obj);
00031 public slots: // native calls
00032   void setName(JNIEnv *env, jstring name);
00033   void insertChild(JNIEnv *env, jlong childBridge, jint index);
00034   void removeChild(JNIEnv *env, jlong childBridge);
00035   void setFloatable(JNIEnv *env, jboolean floatable);
00036   void setOrientation(JNIEnv *env, jint orientation);
00037   void setIconSize(JNIEnv *env, jint width, jint height);
00038 public: // native calls
00039   static void initialize(JNIEnv *env, jclass cls);
00040   static jlong newInstance(JNIEnv *env, jobject obj);
00041 public: // native callbacks
00042   void orientationChanged(jint orientation);
00043 public:
00044   inline QToolBar *qToolBar() const;
00045 protected slots:
00046   void orientationChangedSlot(Qt::Orientation orientation);
00047 private:
00048   static jmethodID sm_orientationChangedMID;
00049 };
00050 
00051 /*^**************************************************************************^*/
00052 /*- JQToolBarBridge :: Public Inline Member Function.                        -*/
00053 /*^**************************************************************************^*/
00054 
00060 inline QToolBar *JQToolBarBridge::qToolBar() const
00061 {
00062   return static_cast<QToolBar *>(qObject());
00063 }
00064 
00065 /*^**************************************************************************^*/
00066 /*- Macro Definitions.                                                       -*/
00067 /*^**************************************************************************^*/
00068 
00069 #define jqToolBarCast(bridge) (reinterpret_cast<JQToolBarBridge *>(bridge))
00070 #define jqToolBarBridge jqToolBarCast(bridge)
00071 
00072 #endif //JQTOOLBARBRIDGE_H
00073 
00074 /*^*****************************************************************************
00075   File History:
00076 
00077  - 2007-11-07 16:06:14 Slobodan
00078    Initial version
00079 
00080 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.