QTextPane.h

00001 /*
00002  * @(#)QTextPane.h  0.2.0 / 2007-12-27
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 QTEXTPANE_H
00010 #define QTEXTPANE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 #include "QTextDocumentAdapter.h"
00015 
00016 /*^**************************************************************************^*/
00017 /*- QTextPane Class.                                                         -*/
00018 /*^**************************************************************************^*/
00019 
00020 class JQTextPaneBridge;
00021 
00028 class JAVAQX_EXPORT QTextPane : public QTextEdit
00029 {
00030   Q_OBJECT
00031 protected:
00032   friend class JQTextPaneBridge;
00033   QTextPane(JQTextPaneBridge *bridge);
00034   virtual ~QTextPane();
00035 protected:
00036   void setDocument(QTextDocumentAdapter *document);
00037   void setPaintView(bool paintView);
00038   void paintView(jlong graphicsPointer);
00039   void connectSignals();
00040   void disconnectSignals();
00041 protected slots:
00042   void destroyingSlot();
00043   void valueChangedSlot(int value);
00044   void textClearedSlot();
00045   void textSetSlot();
00046   void textAppendedSlot();
00047   void copyAvailableSlot(bool available);
00048   void selectAllAvailableSlot(bool available);
00049 protected:
00050   virtual void paintEvent(QPaintEvent *e);
00051 private:
00052   QTextDocumentAdapter *m_document;
00053   bool m_paintView;
00054   JQTextPaneBridge *m_bridge;
00055   QPaintEvent *m_paintViewEvent;
00056 private:
00057   static QTextDocument *sm_defaultDocument;
00058   static int sm_defaultDocumentCount;
00059 };
00060 
00061 #endif // QTEXTPANE_H
00062 
00063 /*^*****************************************************************************
00064   File History:
00065 
00066  - 2007-12-27 19:32:54 Slobodan
00067    Initial version
00068 
00069 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.