Definition at line 109 of file qtextdocument.h.
#include <qtextdocument.h>

Public Types |
|
| enum | MetaInformation { DocumentTitle, DocumentUrl } |
| enum | FindFlag { FindBackward = 0x00001, FindCaseSensitively = 0x00002, FindWholeWords = 0x00004 } |
| enum | ResourceType { HtmlResource = 1, ImageResource = 2, StyleSheetResource = 3, UserResource = 100 } |
| enum | Stacks { UndoStack = 0x01, RedoStack = 0x02, UndoAndRedoStacks = UndoStack | RedoStack } |
Public Slots |
|
| void | undo () |
| void | redo () |
| void | appendUndoItem (QAbstractUndoItem *) |
| void | setModified (bool m=true) |
Signals |
|
| void | contentsChange (int from, int charsRemoves, int charsAdded) |
| void | contentsChanged () |
| void | undoAvailable (bool) |
| void | redoAvailable (bool) |
| void | undoCommandAdded () |
| void | modificationChanged (bool m) |
| void | cursorPositionChanged (const QTextCursor &cursor) |
| void | blockCountChanged (int newBlockCount) |
| void | documentLayoutChanged () |
Public Member Functions |
|
| QTextDocument (QObject *parent=0) | |
| QTextDocument (const QString &text, QObject *parent=0) | |
| ~QTextDocument () | |
| QTextDocument * | clone (QObject *parent=0) const |
| bool | isEmpty () const |
| virtual void | clear () |
| void | setUndoRedoEnabled (bool enable) |
| bool | isUndoRedoEnabled () const |
| bool | isUndoAvailable () const |
| bool | isRedoAvailable () const |
| int | availableUndoSteps () const |
| int | availableRedoSteps () const |
| int | revision () const |
| void | setDocumentLayout (QAbstractTextDocumentLayout *layout) |
| QAbstractTextDocumentLayout * | documentLayout () const |
| void | setMetaInformation (MetaInformation info, const QString &) |
| QString | metaInformation (MetaInformation info) const |
| QString | toHtml (const QByteArray &encoding=QByteArray()) const |
| void | setHtml (const QString &html) |
| QString | toPlainText () const |
| void | setPlainText (const QString &text) |
| QChar | characterAt (int pos) const |
| QTextCursor | find (const QString &subString, int from=0, FindFlags options=0) const |
| QTextCursor | find (const QString &subString, const QTextCursor &from, FindFlags options=0) const |
| QTextCursor | find (const QRegExp &expr, int from=0, FindFlags options=0) const |
| QTextCursor | find (const QRegExp &expr, const QTextCursor &from, FindFlags options=0) const |
| QTextFrame * | frameAt (int pos) const |
| QTextFrame * | rootFrame () const |
| QTextObject * | object (int objectIndex) const |
| QTextObject * | objectForFormat (const QTextFormat &) const |
| QTextBlock | findBlock (int pos) const |
| QTextBlock | findBlockByNumber (int blockNumber) const |
| QTextBlock | findBlockByLineNumber (int blockNumber) const |
| QTextBlock | begin () const |
| QTextBlock | end () const |
| QTextBlock | firstBlock () const |
| QTextBlock | lastBlock () const |
| void | setPageSize (const QSizeF &size) |
| QSizeF | pageSize () const |
| void | setDefaultFont (const QFont &font) |
| QFont | defaultFont () const |
| int | pageCount () const |
| bool | isModified () const |
| void | print (QPrinter *printer) const |
| QVariant | resource (int type, const QUrl &name) const |
| void | addResource (int type, const QUrl &name, const QVariant &resource) |
| QVector< QTextFormat > | allFormats () const |
| void | markContentsDirty (int from, int length) |
| void | setUseDesignMetrics (bool b) |
| bool | useDesignMetrics () const |
| void | drawContents (QPainter *painter, const QRectF &rect=QRectF()) |
| void | setTextWidth (qreal width) |
| qreal | textWidth () const |
| qreal | idealWidth () const |
| qreal | indentWidth () const |
| void | setIndentWidth (qreal width) |
| qreal | documentMargin () const |
| void | setDocumentMargin (qreal margin) |
| void | adjustSize () |
| QSizeF | size () const |
| int | blockCount () const |
| int | lineCount () const |
| int | characterCount () const |
| void | setDefaultStyleSheet (const QString &sheet) |
| QString | defaultStyleSheet () const |
| void | undo (QTextCursor *cursor) |
| void | redo (QTextCursor *cursor) |
| void | clearUndoRedoStacks (Stacks historyToClear=UndoAndRedoStacks) |
| int | maximumBlockCount () const |
| void | setMaximumBlockCount (int maximum) |
| QTextOption | defaultTextOption () const |
| void | setDefaultTextOption (const QTextOption &option) |
| QTextDocumentPrivate * | docHandle () const |
Protected Member Functions |
|
| virtual QTextObject * | createObject (const QTextFormat &f) |
| virtual QVariant | loadResource (int type, const QUrl &name) |
| QTextDocument (QTextDocumentPrivate &dd, QObject *parent) | |
Properties |
|
| bool | undoRedoEnabled |
| bool | modified |
| QSizeF | pageSize |
| QFont | defaultFont |
| bool | useDesignMetrics |
| QSizeF | size |
| qreal | textWidth |
| int | blockCount |
| qreal | indentWidth |
| QString | defaultStyleSheet |
| int | maximumBlockCount |
| qreal | documentMargin |
Friends |
|
| class | QTextObjectPrivate |
| enum MetaInformation |
Definition at line 153 of file qtextdocument.h.
{
DocumentTitle,
DocumentUrl
};
| enum FindFlag |
Definition at line 170 of file qtextdocument.h.
{
FindBackward = 0x00001,
FindCaseSensitively = 0x00002,
FindWholeWords = 0x00004
};
| enum ResourceType |
Definition at line 213 of file qtextdocument.h.
{
HtmlResource = 1,
ImageResource = 2,
StyleSheetResource = 3,
UserResource = 100
};
| enum Stacks |
Definition at line 259 of file qtextdocument.h.
{
UndoStack = 0x01,
RedoStack = 0x02,
UndoAndRedoStacks = UndoStack | RedoStack
};
| QTextDocument | ( | QObject * | parent = 0 |
) | [explicit] |
| QTextDocument | ( | const QString & | text, |
| QObject * | parent = 0 |
||
| ) | [explicit] |
| ~QTextDocument | ( | ) |
| QTextDocument | ( | QTextDocumentPrivate & | dd, |
| QObject * | parent | ||
| ) | [protected] |
| QTextDocument* clone | ( | QObject * | parent = 0 |
) | const |
| bool isEmpty | ( | ) | const |
| virtual void clear | ( | ) | [virtual] |
| void setUndoRedoEnabled | ( | bool | enable | ) |
| bool isUndoRedoEnabled | ( | ) | const |
| bool isUndoAvailable | ( | ) | const |
| bool isRedoAvailable | ( | ) | const |
| int availableUndoSteps | ( | ) | const |
| int availableRedoSteps | ( | ) | const |
| int revision | ( | ) | const |
| void setDocumentLayout | ( | QAbstractTextDocumentLayout * | layout | ) |
| QAbstractTextDocumentLayout* documentLayout | ( | ) | const |
| void setMetaInformation | ( | MetaInformation | info, |
| const QString & | |||
| ) |
| QString metaInformation | ( | MetaInformation | info | ) | const |
| QString toHtml | ( | const QByteArray & | encoding = QByteArray() |
) | const |
| void setHtml | ( | const QString & | html | ) |
| QString toPlainText | ( | ) | const |
| void setPlainText | ( | const QString & | text | ) |
| QChar characterAt | ( | int | pos | ) | const |
| QTextCursor find | ( | const QString & | subString, |
| int | from = 0, |
||
| FindFlags | options = 0 |
||
| ) | const |
| QTextCursor find | ( | const QString & | subString, |
| const QTextCursor & | from, | ||
| FindFlags | options = 0 |
||
| ) | const |
| QTextCursor find | ( | const QRegExp & | expr, |
| int | from = 0, |
||
| FindFlags | options = 0 |
||
| ) | const |
| QTextCursor find | ( | const QRegExp & | expr, |
| const QTextCursor & | from, | ||
| FindFlags | options = 0 |
||
| ) | const |
| QTextFrame* frameAt | ( | int | pos | ) | const |
| QTextFrame* rootFrame | ( | ) | const |
| QTextObject* object | ( | int | objectIndex | ) | const |
| QTextObject* objectForFormat | ( | const QTextFormat & | ) | const |
| QTextBlock findBlock | ( | int | pos | ) | const |
| QTextBlock findBlockByNumber | ( | int | blockNumber | ) | const |
| QTextBlock findBlockByLineNumber | ( | int | blockNumber | ) | const |
| QTextBlock begin | ( | ) | const |
| QTextBlock end | ( | ) | const |
| QTextBlock firstBlock | ( | ) | const |
| QTextBlock lastBlock | ( | ) | const |
| void setPageSize | ( | const QSizeF & | size | ) |
| QSizeF pageSize | ( | ) | const |
| void setDefaultFont | ( | const QFont & | font | ) |
| QFont defaultFont | ( | ) | const |
| int pageCount | ( | ) | const |
| bool isModified | ( | ) | const |
| void print | ( | QPrinter * | printer | ) | const |
| QVector<QTextFormat> allFormats | ( | ) | const |
| void markContentsDirty | ( | int | from, |
| int | length | ||
| ) |
| void setUseDesignMetrics | ( | bool | b | ) |
| bool useDesignMetrics | ( | ) | const |
| void setTextWidth | ( | qreal | width | ) |
| qreal textWidth | ( | ) | const |
| qreal idealWidth | ( | ) | const |
| qreal indentWidth | ( | ) | const |
| void setIndentWidth | ( | qreal | width | ) |
| qreal documentMargin | ( | ) | const |
| void setDocumentMargin | ( | qreal | margin | ) |
| void adjustSize | ( | ) |
| QSizeF size | ( | ) | const |
| int blockCount | ( | ) | const |
| int lineCount | ( | ) | const |
| int characterCount | ( | ) | const |
| void setDefaultStyleSheet | ( | const QString & | sheet | ) |
| QString defaultStyleSheet | ( | ) | const |
| void undo | ( | QTextCursor * | cursor | ) |
| void redo | ( | QTextCursor * | cursor | ) |
| void clearUndoRedoStacks | ( | Stacks | historyToClear =
UndoAndRedoStacks |
) |
| int maximumBlockCount | ( | ) | const |
| void setMaximumBlockCount | ( | int | maximum | ) |
| QTextOption defaultTextOption | ( | ) | const |
| void setDefaultTextOption | ( | const QTextOption & | option | ) |
| void contentsChange | ( | int | from, |
| int | charsRemoves, | ||
| int | charsAdded | ||
| ) | [signal] |
| void contentsChanged | ( | ) | [signal] |
| void undoAvailable | ( | bool | ) | [signal] |
| void redoAvailable | ( | bool | ) | [signal] |
| void undoCommandAdded | ( | ) | [signal] |
| void modificationChanged | ( | bool | m | ) | [signal] |
| void cursorPositionChanged | ( | const QTextCursor & | cursor | ) | [signal] |
| void blockCountChanged | ( | int | newBlockCount | ) | [signal] |
| void documentLayoutChanged | ( | ) | [signal] |
| void undo | ( | ) | [slot] |
| void redo | ( | ) | [slot] |
| void appendUndoItem | ( | QAbstractUndoItem * | ) | [slot] |
| void setModified | ( | bool | m = true |
) | [slot] |
| virtual QTextObject* createObject | ( | const QTextFormat & | f | ) | [protected, virtual] |
| QTextDocumentPrivate* docHandle | ( | ) | const |
friend class QTextObjectPrivate
[friend] |
Definition at line 300 of file qtextdocument.h.
bool undoRedoEnabled [read,
write] |
Definition at line 113 of file qtextdocument.h.
bool modified [read, write] |
Definition at line 114 of file qtextdocument.h.
QSizeF pageSize [read,
write] |
Definition at line 115 of file qtextdocument.h.
QFont defaultFont [read,
write] |
Definition at line 116 of file qtextdocument.h.
bool useDesignMetrics [read,
write] |
Definition at line 117 of file qtextdocument.h.
QSizeF size [read] |
Definition at line 118 of file qtextdocument.h.
qreal textWidth [read, write] |
Definition at line 119 of file qtextdocument.h.
int blockCount [read] |
Definition at line 120 of file qtextdocument.h.
qreal indentWidth [read,
write] |
Definition at line 121 of file qtextdocument.h.
QString defaultStyleSheet [read,
write] |
Definition at line 123 of file qtextdocument.h.
int maximumBlockCount [read,
write] |
Definition at line 125 of file qtextdocument.h.
qreal documentMargin [read,
write] |
Definition at line 126 of file qtextdocument.h.