#include <TextDocumentBridge.h>
Public Slots | |
void | clearText (JNIEnv *env) |
Clears the text. | |
jstring | getText (JNIEnv *env) |
Returns text of the document. | |
void | setText (JNIEnv *env, jstring text) |
Sets text of the document. | |
void | appendText (JNIEnv *env, jstring text) |
Appends text to the end of the document. | |
jboolean | isUndoAvailable (JNIEnv *env) |
Returns true if undo operation is available. | |
jboolean | isRedoAvailable (JNIEnv *env) |
Returns true if redo operation is available. | |
void | undo (JNIEnv *env) |
Undos last action. | |
void | redo (JNIEnv *env) |
Redos last action. | |
void | setUndoRedoEnabled (JNIEnv *env, jboolean enabled) |
Sets whether or not the undo stack is enabled. | |
void | setUndoRedoListening (JNIEnv *env, jboolean listening) |
Sets undo/redo listening. | |
jboolean | isModified (JNIEnv *env) |
Returns true if the document is modified. | |
void | setModified (JNIEnv *env, jboolean modified) |
Sets whether or not the document is modified. | |
void | print (JNIEnv *env, jobject printer) |
Prints the document using the specified printer object. | |
void | setUseHighlighter (JNIEnv *env, jboolean useHighlighter) |
Sets whether or not the document is using the highlighter. | |
void | setFormat (JNIEnv *env, jint start, jint length, jobject format) |
Sets the character format for the specified text segment. | |
void | undoAvailableSlot (bool available) |
undoAvailable slot. | |
void | redoAvailableSlot (bool available) |
redAvailable slot. | |
Public Member Functions | |
void | undoAvailable (jboolean available) |
Calls undoAvailable method of the TextDocument object. | |
void | redoAvailable (jboolean available) |
Calls redoAvailable method of the TextDocument object. | |
void | highlightBlock (jint blockStart, jstring blockText) |
Calls highlightDocument method of the TextDocument object. | |
QTextDocumentAdapter * | qTextDocument () const |
Returns QTextDocumentAdapter adaptee. | |
virtual void | destroy (JNIEnv *env) |
Static Public Member Functions | |
static void | initialize (JNIEnv *env, jclass cls) |
Initializes TextDocumentBridge class. | |
static QTextDocumentAdapter * | toQDocument (JNIEnv *env, jobject document) |
Returns QTextDocumentAdapter object of the specified QSwing TextDocument object. | |
Protected Member Functions | |
TextDocumentBridge (JNIEnv *env, jobject obj, QTextDocumentAdapter *document) | |
Constructs new TextDocumentBridge object. | |
virtual jfieldID | bridgePointerFID () const |
Returns bridge pointer FID. | |
Static Protected Member Functions | |
static jmethodID | createMID () |
Returns createMID. |
TextDocumentBridge::TextDocumentBridge | ( | JNIEnv * | env, | |
jobject | obj, | |||
QTextDocumentAdapter * | document | |||
) | [protected] |
Constructs new TextDocumentBridge object.
env | the JNIEnv pointer | |
obj | the QSwing TextDocument object | |
document | the Qt QTextDocument |
void TextDocumentBridge::clearText | ( | JNIEnv * | env | ) | [slot] |
Clears the text.
env | the JNIEnv pointer |
jstring TextDocumentBridge::getText | ( | JNIEnv * | env | ) | [slot] |
Returns text of the document.
env | the JNIEnv pointer |
void TextDocumentBridge::setText | ( | JNIEnv * | env, | |
jstring | text | |||
) | [slot] |
Sets text of the document.
env | the JNIEnv pointer | |
text | the text of the document |
void TextDocumentBridge::appendText | ( | JNIEnv * | env, | |
jstring | text | |||
) | [slot] |
Appends text to the end of the document.
env | the JNIEnv pointer | |
text | text the text to be appended |
jboolean TextDocumentBridge::isUndoAvailable | ( | JNIEnv * | env | ) | [slot] |
Returns true
if undo operation is available.
env | the JNIEnv pointer |
true
if undo operation is available jboolean TextDocumentBridge::isRedoAvailable | ( | JNIEnv * | env | ) | [slot] |
Returns true
if redo operation is available.
env | the JNIEnv pointer |
true
if undo operation is available void TextDocumentBridge::undo | ( | JNIEnv * | env | ) | [slot] |
Undos last action.
env | the JNIEnv pointer |
void TextDocumentBridge::redo | ( | JNIEnv * | env | ) | [slot] |
Redos last action.
env | the JNIEnv pointer |
void TextDocumentBridge::setUndoRedoEnabled | ( | JNIEnv * | env, | |
jboolean | enabled | |||
) | [slot] |
Sets whether or not the undo stack is enabled.
env | the JNIEnv pointer | |
enabled | true if enabled |
void TextDocumentBridge::setUndoRedoListening | ( | JNIEnv * | env, | |
jboolean | listening | |||
) | [slot] |
Sets undo/redo listening.
env | the JNIEnv pointer | |
listening | true if listening |
jboolean TextDocumentBridge::isModified | ( | JNIEnv * | env | ) | [slot] |
Returns true
if the document is modified.
env | the JNIEnv pointer |
true
if the document is modified void TextDocumentBridge::setModified | ( | JNIEnv * | env, | |
jboolean | modified | |||
) | [slot] |
Sets whether or not the document is modified.
env | the JNIEnv pointer | |
modified | true if modified |
void TextDocumentBridge::print | ( | JNIEnv * | env, | |
jobject | printer | |||
) | [slot] |
Prints the document using the specified printer object.
env | the JNIEnv pointer | |
printer | the QSwing printer object |
void TextDocumentBridge::setUseHighlighter | ( | JNIEnv * | env, | |
jboolean | useHighlighter | |||
) | [slot] |
Sets whether or not the document is using the highlighter.
env | the JNIEnv pointer | |
useHighlighter | true if using |
void TextDocumentBridge::setFormat | ( | JNIEnv * | env, | |
jint | start, | |||
jint | length, | |||
jobject | format | |||
) | [slot] |
Sets the character format for the specified text segment.
env | the JNIEnv pointer | |
start | the start of the segment | |
length | the length of the segment | |
format | the format |
void TextDocumentBridge::initialize | ( | JNIEnv * | env, | |
jclass | cls | |||
) | [static] |
Initializes TextDocumentBridge class.
env | the JNIEnv pointer | |
cls | the TextDocument class |
FatalError | if failed |
Reimplemented from QObjectBridge.
void TextDocumentBridge::undoAvailable | ( | jboolean | available | ) |
Calls undoAvailable
method of the TextDocument object.
available | true if available |
void TextDocumentBridge::redoAvailable | ( | jboolean | available | ) |
Calls redoAvailable
method of the TextDocument object.
available | true if available |
void TextDocumentBridge::highlightBlock | ( | jint | blockStart, | |
jstring | blockText | |||
) |
Calls highlightDocument
method of the TextDocument object.
blockStart | the block start | |
blockText | the block text |
QTextDocumentAdapter * TextDocumentBridge::qTextDocument | ( | ) | const [inline] |
QTextDocumentAdapter * TextDocumentBridge::toQDocument | ( | JNIEnv * | env, | |
jobject | document | |||
) | [static] |
Returns QTextDocumentAdapter object of the specified QSwing TextDocument object.
env | the JNIEnv pointer | |
document | the QSwing TextDocumen object |
void TextDocumentBridge::destroy | ( | JNIEnv * | env | ) | [virtual] |
jfieldID TextDocumentBridge::bridgePointerFID | ( | ) | const [protected, virtual] |
void TextDocumentBridge::undoAvailableSlot | ( | bool | available | ) | [slot] |
undoAvailable
slot.
available | true if available |
void TextDocumentBridge::redoAvailableSlot | ( | bool | available | ) | [slot] |
redAvailable
slot.
available | true if available |
jmethodID TextDocumentBridge::createMID | ( | ) | [inline, static, protected] |
Returns createMID.