##// END OF EJS Templates
code cleanup and rename of PythonQtWrapper to PythonQtInstanceWrapper and PythonQtMetaObjectWrapper to PythonQtClassWrapper, since these names match much better what these classes wrap, regarding that we are wrapping CPP objects as well...
code cleanup and rename of PythonQtWrapper to PythonQtInstanceWrapper and PythonQtMetaObjectWrapper to PythonQtClassWrapper, since these names match much better what these classes wrap, regarding that we are wrapping CPP objects as well git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@52 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r13:d46b01f7163a
r16:c68e0aff542c
Show More
PythonQtWrapper_QTextCursor.h
98 lines | 6.5 KiB | text/x-c | CLexer
#ifndef PYTHONQTWRAPPER_QTEXTCURSOR_H
#define PYTHONQTWRAPPER_QTEXTCURSOR_H
#include <qtextcursor.h>
#include <QObject>
#include <QTextBlock>
#include <QTextDocumentFragment>
#include <QVariant>
#include <qtextcursor.h>
#include <qtextdocument.h>
#include <qtextdocumentfragment.h>
#include <qtextformat.h>
#include <qtextlist.h>
#include <qtextobject.h>
#include <qtexttable.h>
class PythonQtWrapper_QTextCursor : public QObject
{ Q_OBJECT
public:
Q_ENUMS(MoveMode MoveOperation SelectionType )
enum MoveMode{
MoveAnchor = QTextCursor::MoveAnchor, KeepAnchor = QTextCursor::KeepAnchor};
enum MoveOperation{
NoMove = QTextCursor::NoMove, Start = QTextCursor::Start, Up = QTextCursor::Up, StartOfLine = QTextCursor::StartOfLine, StartOfBlock = QTextCursor::StartOfBlock, StartOfWord = QTextCursor::StartOfWord, PreviousBlock = QTextCursor::PreviousBlock, PreviousCharacter = QTextCursor::PreviousCharacter, PreviousWord = QTextCursor::PreviousWord, Left = QTextCursor::Left, WordLeft = QTextCursor::WordLeft, End = QTextCursor::End, Down = QTextCursor::Down, EndOfLine = QTextCursor::EndOfLine, EndOfWord = QTextCursor::EndOfWord, EndOfBlock = QTextCursor::EndOfBlock, NextBlock = QTextCursor::NextBlock, NextCharacter = QTextCursor::NextCharacter, NextWord = QTextCursor::NextWord, Right = QTextCursor::Right, WordRight = QTextCursor::WordRight};
enum SelectionType{
WordUnderCursor = QTextCursor::WordUnderCursor, LineUnderCursor = QTextCursor::LineUnderCursor, BlockUnderCursor = QTextCursor::BlockUnderCursor, Document = QTextCursor::Document};
public slots:
QTextCursor* new_QTextCursor();
QTextCursor* new_QTextCursor(QTextDocument* document);
QTextCursor* new_QTextCursor(QTextFrame* frame);
QTextCursor* new_QTextCursor(const QTextBlock& block);
QTextCursor* new_QTextCursor(const QTextCursor& cursor);
void delete_QTextCursor(QTextCursor* obj) { delete obj; }
int anchor(QTextCursor* theWrappedObject) const;
bool atBlockEnd(QTextCursor* theWrappedObject) const;
bool atBlockStart(QTextCursor* theWrappedObject) const;
bool atEnd(QTextCursor* theWrappedObject) const;
bool atStart(QTextCursor* theWrappedObject) const;
void beginEditBlock(QTextCursor* theWrappedObject);
QTextBlock block(QTextCursor* theWrappedObject) const;
QTextCharFormat blockCharFormat(QTextCursor* theWrappedObject) const;
QTextBlockFormat blockFormat(QTextCursor* theWrappedObject) const;
int blockNumber(QTextCursor* theWrappedObject) const;
QTextCharFormat charFormat(QTextCursor* theWrappedObject) const;
void clearSelection(QTextCursor* theWrappedObject);
int columnNumber(QTextCursor* theWrappedObject) const;
QTextList* createList(QTextCursor* theWrappedObject, QTextListFormat::Style style);
QTextList* createList(QTextCursor* theWrappedObject, const QTextListFormat& format);
QTextFrame* currentFrame(QTextCursor* theWrappedObject) const;
QTextList* currentList(QTextCursor* theWrappedObject) const;
QTextTable* currentTable(QTextCursor* theWrappedObject) const;
void deleteChar(QTextCursor* theWrappedObject);
void deletePreviousChar(QTextCursor* theWrappedObject);
void endEditBlock(QTextCursor* theWrappedObject);
bool hasComplexSelection(QTextCursor* theWrappedObject) const;
bool hasSelection(QTextCursor* theWrappedObject) const;
void insertBlock(QTextCursor* theWrappedObject);
void insertBlock(QTextCursor* theWrappedObject, const QTextBlockFormat& format);
void insertBlock(QTextCursor* theWrappedObject, const QTextBlockFormat& format, const QTextCharFormat& charFormat);
void insertFragment(QTextCursor* theWrappedObject, const QTextDocumentFragment& fragment);
QTextFrame* insertFrame(QTextCursor* theWrappedObject, const QTextFrameFormat& format);
void insertHtml(QTextCursor* theWrappedObject, const QString& html);
void insertImage(QTextCursor* theWrappedObject, const QString& name);
void insertImage(QTextCursor* theWrappedObject, const QTextImageFormat& format);
void insertImage(QTextCursor* theWrappedObject, const QTextImageFormat& format, QTextFrameFormat::Position alignment);
QTextList* insertList(QTextCursor* theWrappedObject, QTextListFormat::Style style);
QTextList* insertList(QTextCursor* theWrappedObject, const QTextListFormat& format);
QTextTable* insertTable(QTextCursor* theWrappedObject, int rows, int cols);
QTextTable* insertTable(QTextCursor* theWrappedObject, int rows, int cols, const QTextTableFormat& format);
void insertText(QTextCursor* theWrappedObject, const QString& text);
void insertText(QTextCursor* theWrappedObject, const QString& text, const QTextCharFormat& format);
bool isCopyOf(QTextCursor* theWrappedObject, const QTextCursor& other) const;
bool isNull(QTextCursor* theWrappedObject) const;
void joinPreviousEditBlock(QTextCursor* theWrappedObject);
void mergeBlockCharFormat(QTextCursor* theWrappedObject, const QTextCharFormat& modifier);
void mergeBlockFormat(QTextCursor* theWrappedObject, const QTextBlockFormat& modifier);
void mergeCharFormat(QTextCursor* theWrappedObject, const QTextCharFormat& modifier);
bool movePosition(QTextCursor* theWrappedObject, QTextCursor::MoveOperation op, QTextCursor::MoveMode arg__2 = QTextCursor::MoveAnchor, int n = 1);
bool operator_less(QTextCursor* theWrappedObject, const QTextCursor& rhs) const;
bool operator_equal(QTextCursor* theWrappedObject, const QTextCursor& rhs) const;
int position(QTextCursor* theWrappedObject) const;
void removeSelectedText(QTextCursor* theWrappedObject);
void select(QTextCursor* theWrappedObject, QTextCursor::SelectionType selection);
void selectedTableCells(QTextCursor* theWrappedObject, int* firstRow, int* numRows, int* firstColumn, int* numColumns) const;
QString selectedText(QTextCursor* theWrappedObject) const;
QTextDocumentFragment selection(QTextCursor* theWrappedObject) const;
int selectionEnd(QTextCursor* theWrappedObject) const;
int selectionStart(QTextCursor* theWrappedObject) const;
void setBlockCharFormat(QTextCursor* theWrappedObject, const QTextCharFormat& format);
void setBlockFormat(QTextCursor* theWrappedObject, const QTextBlockFormat& format);
void setCharFormat(QTextCursor* theWrappedObject, const QTextCharFormat& format);
void setPosition(QTextCursor* theWrappedObject, int pos, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor);
void setVisualNavigation(QTextCursor* theWrappedObject, bool b);
bool visualNavigation(QTextCursor* theWrappedObject) const;
};
#endif // PYTHONQTWRAPPER_QTEXTCURSOR_H