00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef PRINTERBRIDGE_H
00010 #define PRINTERBRIDGE_H
00011
00012 #include "JavaQxQSwing.h"
00013
00014
00015
00016
00017
00024 class JAVAQX_EXPORT PrinterBridge : public QObject
00025 {
00026 Q_OBJECT
00027 protected:
00028 PrinterBridge(JNIEnv *env, jobject obj);
00029 virtual ~PrinterBridge();
00030 public slots:
00031 void destroy(JNIEnv *env);
00032 void pageDialog(JNIEnv *env);
00033 jboolean printerDialog(JNIEnv *env);
00034 public:
00035 static void initialize(JNIEnv *env, jclass cls);
00036 static jlong newInstance(JNIEnv *env, jobject obj);
00037 public:
00038 inline QPrinter *qPrinter() const;
00039 public:
00040 static QPrinter *toQPrinter(JNIEnv *env, jobject printer);
00041 private:
00042 jweak m_wobjref;
00043 QPrinter *m_printer;
00044 private:
00045 static jfieldID sm_bridgeFID;
00046 static jmethodID sm_createMID;
00047 };
00048
00049
00050
00051
00052
00058 inline QPrinter *PrinterBridge::qPrinter() const
00059 {
00060 return m_printer;
00061 }
00062
00063
00064
00065
00066
00067 #define printerCast(bridge) (reinterpret_cast<PrinterBridge *>(bridge))
00068 #define printerBridge printerCast(bridge)
00069
00070 #endif //PRINTERBRIDGE_H
00071
00072
00073
00074
00075
00076
00077
00078