QApplicationAdapter.h

00001 /*
00002  * @(#)QApplicationAdapter.h  0.2.0 / 2007-05-01
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 QAPPLICATIONADAPTER_H
00010 #define QAPPLICATIONADAPTER_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "QFontSet.h"
00015 
00016 /*^**************************************************************************^*/
00017 /*- QApplicationAdapter Class.                                               -*/
00018 /*^**************************************************************************^*/
00019 
00026 class JAVAQX_EXPORT QApplicationAdapter : public QApplication
00027 {
00028   Q_OBJECT
00029 public:
00030   QApplicationAdapter(int &argc, char **argv);
00031 public:
00032   void aboutQt(JNIEnv *env);
00033   void aboutQSwing(JNIEnv *env);
00034   bool setTranslation(JNIEnv *env, const QString &fileName);
00035   void removeTranslation(JNIEnv *env);
00036   void setStyleSheet(JNIEnv *env, jstring styleSheetText);
00037   void setOverrideCursor(JNIEnv *env, jint type);
00038   void changeOverrideCursor(JNIEnv *env, jint type);
00039   void restoreOverrideCursor(JNIEnv *env);
00040   void setFontSet(QFontSet *fontSet);
00041 public:
00042   static int exec(bool quitOnLastWindowClosed);
00043 private slots:
00044   void aboutQSwingSlot();
00045   void setTranslationSlot(bool *succeed, const QString &fileName);
00046   void removeTranslationSlot();
00047   void setStyleSheetSlot(const QString &styleSheetText);
00048   void setOverrideCursorSlot(jint type);
00049   void changeOverrideCursorSlot(jint type);
00050   void restoreOverrideCursorSlot();
00051   void aboutToQuitSlot();
00052 signals:
00053   void aboutQtSignal();
00054   void setTranslationSignal(bool *succeed, const QString &fileName);
00055   void removeTranslationSignal();
00056   void setStyleSheetSignal(const QString &styleSheetText);
00057   void setOverrideCursorSignal(jint type);
00058   void changeOverrideCursorSignal(jint type);
00059   void restoreOverrideCursorSignal();
00060   void aboutQSwingSignal();
00061 private:
00062   QFontSet *m_fontSet;
00063 private:
00064   static QTranslator *sm_translator;
00065 };
00066 
00067 #endif // QAPPLICATIONADAPTER_H
00068 
00069 /*^*****************************************************************************
00070   File History:
00071 
00072  - 2007-05-01 18:49:15 Slobodan
00073    Initial version
00074 
00075 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.