Qyoto
4.0.6
Qyoto is a C# language binding for Qt
|
The QTextTable class represents a table in a QTextDocument. More...
Public Member Functions | |
QTextTable (QTextDocument doc) | |
override void | CreateProxy () |
new void | AppendColumns (int count) |
| |
new void | AppendRows (int count) |
| |
new QTextTableCell | CellAt (QTextCursor c) |
| |
new QTextTableCell | CellAt (int position) |
| |
new QTextTableCell | CellAt (int row, int col) |
| |
new void | InsertColumns (int pos, int num) |
| |
new void | InsertRows (int pos, int num) |
| |
new void | MergeCells (QTextCursor cursor) |
| |
new void | MergeCells (int row, int col, int numRows, int numCols) |
| |
new void | RemoveColumns (int pos, int num) |
| |
new void | RemoveRows (int pos, int num) |
| |
new void | Resize (int rows, int cols) |
| |
new QTextCursor | RowEnd (QTextCursor c) |
| |
new QTextCursor | RowStart (QTextCursor c) |
| |
new void | SplitCell (int row, int col, int numRows, int numCols) |
| |
new void | Dispose () |
![]() | |
QTextFrame (QTextDocument doc) | |
| |
new QTextFrame.iterator | Begin () |
| |
new void | Dispose () |
![]() | |
new void | Dispose () |
![]() | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
virtual bool | OnEvent (QEvent e) |
| |
virtual bool | EventFilter (QObject watched, QEvent @event) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject filterObj) |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject obj) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
![]() | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
Static Public Member Functions | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
![]() | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
![]() | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
![]() | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
![]() | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream stream, QSizeF size) |
| |
static QDataStream | Write (QDataStream stream, QPoint point) |
| |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream stream, QLineF line) |
| |
static QDataStream | Write (QDataStream stream, QPointF point) |
| |
static QDataStream | Write (QDataStream @out, QChar chr) |
| |
static QDataStream | Write (QDataStream @out, QByteArray ba) |
| |
static QDataStream | Write (QDataStream stream, QEasingCurve easing) |
| |
static QDataStream | Write (QDataStream stream, QRectF rectangle) |
| |
static QDataStream | Write (QDataStream @out, QDateTime dateTime) |
| |
static QDataStream | Write (QDataStream @out, QUrl url) |
| |
static QDataStream | Write (QDataStream @out, QTime time) |
| |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream @out, QBitArray ba) |
| |
static QDataStream | Write (QDataStream s, QUuid id) |
| |
static QDataStream | Write (QDataStream stream, QLine line) |
| |
static QDataStream | Write (QDataStream @out, QDate date) |
| |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
| |
static QDataStream | Write (QDataStream stream, QRect rectangle) |
| |
static QDataStream | Write (QDataStream stream, QSize size) |
| |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
| |
static QDataStream | Read (QDataStream @in, QChar chr) |
| |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream stream, QRect rectangle) |
| |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream @in, QDate date) |
| |
static QDataStream | Read (QDataStream @in, QUrl url) |
| |
static QDataStream | Read (QDataStream s, QUuid id) |
| |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream stream, QLineF line) |
| |
static QDataStream | Read (QDataStream stream, QRectF rectangle) |
| |
static QDataStream | Read (QDataStream stream, QPointF point) |
| |
static QDataStream | Read (QDataStream stream, QLine line) |
| |
static QDataStream | Read (QDataStream @in, QBitArray ba) |
| |
static QDataStream | Read (QDataStream stream, QSize size) |
| |
static QDataStream | Read (QDataStream @in, QDateTime dateTime) |
| |
static QDataStream | Read (QDataStream @in, QTime time) |
| |
static QDataStream | Read (QDataStream stream, QPoint point) |
| |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
| |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream @in, QByteArray ba) |
| |
static QDataStream | Read (QDataStream stream, QSizeF size) |
| |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
| |
static double | QAcos (double v) |
| |
static void | QAddPostRoutine (System.Action ptr) |
| |
static double | QAsin (double v) |
| |
static double | QAtan (double v) |
| |
static double | QAtan2 (double x, double y) |
| |
static void | QBadAlloc () |
static int | QCeil (double v) |
| |
static ushort | QChecksum (string s, uint len) |
| |
static QByteArray | QCompress (QByteArray data, int compressionLevel=-1) |
| |
static QByteArray | QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
| |
static double | QCos (double v) |
| |
static double | QExp (double v) |
| |
static double | QFabs (double v) |
static double | QFastCos (double x) |
static double | QFastSin (double x) |
static string | QFlagLocation (string method) |
static int | QFloor (double v) |
| |
static bool | QFuzzyCompare (double p1, double p2) |
static bool | QFuzzyCompare (float p1, float p2) |
static bool | QFuzzyIsNull (double d) |
static bool | QFuzzyIsNull (float f) |
static uint | QHash (QBitArray key) |
| |
static uint | QHash (QChar key) |
| |
static uint | QHash (QStringRef key) |
static uint | QHash (QUrl url) |
| |
static uint | QHash (QPersistentModelIndex index) |
static uint | QHash (QByteArray key) |
| |
static uint | QHash (QModelIndex index) |
static uint | QHash (uint key) |
| |
static uint | QHash (char key) |
| |
static uint | QHash (byte key) |
| |
static uint | QHash (short key) |
| |
static uint | QHash (NativeLong key) |
| |
static uint | QHash (ushort key) |
| |
static uint | QHash (long key) |
| |
static uint | QHash (ulong key) |
| |
static uint | QHash (int key) |
| |
static uint | QHash (string key) |
| |
static uint | QHash (NativeULong key) |
| |
static Qt.ActionQtMsgTypeString | QInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | QIntCast (float f) |
static int | QIntCast (double f) |
static bool | QIsFinite (double d) |
static bool | QIsFinite (float f) |
static bool | QIsInf (float f) |
static bool | QIsInf (double d) |
static bool | QIsNaN (float f) |
static bool | QIsNaN (double d) |
static bool | QIsNull (float f) |
static bool | QIsNull (double d) |
static double | QLn (double v) |
| |
static double | QPow (double x, double y) |
| |
static void | QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
| |
static void | QRemovePostRoutine (System.Action arg1) |
static int | QRound (double d) |
static long | QRound64 (double d) |
static double | QSin (double v) |
| |
static double | QSqrt (double v) |
| |
static bool | QStringComparisonHelper (QStringRef s1, string s2) |
static double | QTan (double v) |
| |
static QByteArray | QUncompress (QByteArray data) |
| |
static QByteArray | QUncompress (Pointer< byte > data, int nbytes) |
| |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
| |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
| |
static Pointer< sbyte > | Qstrdup (string src) |
| |
static int | Qstricmp (string str1, string str2) |
| |
static uint | Qstrlen (string str) |
| |
static int | Qstrncmp (string str1, string str2, uint len) |
| |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
| |
static int | Qstrnicmp (string str1, string str2, uint len) |
| |
static uint | Qstrnlen (string str, uint maxlen) |
| |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QTextTable (System.Type dummy) | |
![]() | |
QTextFrame (System.Type dummy) | |
![]() | |
QTextObject (System.Type dummy) | |
QTextObject (QTextDocument doc) | |
| |
![]() | |
QObject (System.Type dummy) | |
virtual void | OnChildEvent (QChildEvent @event) |
| |
virtual void | ConnectNotify (string signal) |
| |
virtual void | OnCustomEvent (QEvent @event) |
| |
new void | OnDestroyed (QObject obj=null) |
| |
virtual void | DisconnectNotify (string signal) |
| |
new int | Receivers (string signal) |
| |
virtual void | OnTimerEvent (QTimerEvent @event) |
| |
Properties | |
QTextTableFormat | Format [get, set] |
| |
int | Columns [get] |
| |
int | Rows [get] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQTextTableSignals | Emit [get] |
![]() | |
QTextFrameFormat | FrameFormat [get, set] |
| |
QTextFrameLayoutData | LayoutData [get, set] |
System.Collections.Generic.List < QTextFrame > | ChildFrames [get] |
| |
QTextFrame.iterator | End [get] |
| |
QTextCursor | FirstCursorPosition [get] |
| |
int | FirstPosition [get] |
| |
QTextCursor | LastCursorPosition [get] |
| |
int | LastPosition [get] |
| |
QTextFrame | ParentFrame [get] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQTextFrameSignals | Emit [get] |
![]() | |
QTextFormat | Format [get, set] |
| |
QTextDocument | Document [get] |
| |
int | FormatIndex [get] |
| |
int | ObjectIndex [get] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQTextObjectSignals | Emit [get] |
![]() | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
QObject | Parent [get, set] |
| |
System.Collections.Generic.List < QObject > | Children [get] |
| |
System.Collections.Generic.List < QByteArray > | DynamicPropertyNames [get] |
| |
bool | IsWidgetType [get] |
| |
static uint | RegisterUserData [get] |
QObject | Sender [get] |
| |
int | SenderSignalIndex [get] |
| |
bool | SignalsBlocked [get] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
![]() | |
static string | QAppName [get] |
static double | QInf [get] |
static double | QQNaN [get] |
static double | QSNaN [get] |
static bool | QSharedBuild [get] |
static string | QVersion [get] |
static int | Qrand [get] |
The QTextTable class represents a table in a QTextDocument.
A table is a group of cells ordered into rows and columns. Each table contains at least one row and one column. Each cell contains a block, and is surrounded by a frame.
Tables are usually created and inserted into a document with the QTextCursor::insertTable() function. For example, we can insert a table with three rows and two columns at the current cursor position in an editor using the following lines of code:
QTextCursor cursor(editor->textCursor());
cursor.movePosition(QTextCursor::Start);
QTextTable *table = cursor.insertTable(rows, columns, tableFormat);
The table format is either defined when the table is created or changed later with setFormat().
The table currently being edited by the cursor is found with QTextCursor::currentTable(). This allows its format or dimensions to be changed after it has been inserted into a document.
A table's size can be changed with resize(), or by using insertRows(), insertColumns(), removeRows(), or removeColumns(). Use cellAt() to retrieve table cells.
The starting and ending positions of table rows can be found by moving a cursor within a table, and using the rowStart() and rowEnd() functions to obtain cursors at the start and end of each row.
Rows and columns within a QTextTable can be merged and split using the mergeCells() and splitCell() functions. However, only cells that span multiple rows or columns can be split. (Merging or splitting does not increase or decrease the number of rows and columns.)
Note that if you have merged multiple columns and rows into one cell, you will not be able to split the merged cell into new cells spanning over more than one row or column. To be able to split cells spanning over several rows and columns you need to do this over several iterations.
Suppose we have a 2x3 table of names and addresses. To merge both columns in the first row we invoke mergeCells() with row = 0, column = 0, numRows = 1 and numColumns = 2. table->mergeCells(0, 0, 1, 2);
This gives us the following table. To split the first row of the table back into two cells, we invoke the splitCell() function with numRows and numCols = 1. table->splitCell(0, 0, 1, 1);
This results in the original table.
See also QTextTableFormat.
|
protected |
QtGui.QTextTable.QTextTable | ( | QTextDocument | doc | ) |
new void QtGui.QTextTable.AppendColumns | ( | int | count | ) |
Appends count columns at the right side of the table.
This function was introduced in Qt 4.5.
See also insertColumns(), insertRows(), resize(), removeRows(), removeColumns(), and appendRows().
new void QtGui.QTextTable.AppendRows | ( | int | count | ) |
Appends count rows at the bottom of the table.
This function was introduced in Qt 4.5.
See also insertColumns(), insertRows(), resize(), removeRows(), removeColumns(), and appendColumns().
new QTextTableCell QtGui.QTextTable.CellAt | ( | QTextCursor | c | ) |
This is an overloaded function.
Returns the table cell containing the given cursor.
new QTextTableCell QtGui.QTextTable.CellAt | ( | int | position | ) |
This is an overloaded function.
Returns the table cell that contains the character at the given position in the document.
new QTextTableCell QtGui.QTextTable.CellAt | ( | int | row, |
int | col | ||
) |
Returns the table cell at the given row and column in the table.
See also columns() and rows().
|
virtual |
Reimplemented from QtGui.QTextFrame.
new void QtGui.QTextTable.Dispose | ( | ) |
new void QtGui.QTextTable.InsertColumns | ( | int | pos, |
int | num | ||
) |
Inserts a number of columns before the column with the specified index.
See also insertRows(), resize(), removeRows(), removeColumns(), appendRows(), and appendColumns().
new void QtGui.QTextTable.InsertRows | ( | int | pos, |
int | num | ||
) |
Inserts a number of rows before the row with the specified index.
See also resize(), insertColumns(), removeRows(), removeColumns(), appendRows(), and appendColumns().
new void QtGui.QTextTable.MergeCells | ( | QTextCursor | cursor | ) |
This is an overloaded function.
Merges the cells selected by the provided cursor.
This function was introduced in Qt 4.1.
See also splitCell().
new void QtGui.QTextTable.MergeCells | ( | int | row, |
int | col, | ||
int | numRows, | ||
int | numCols | ||
) |
Merges the cell at the specified row and column with the adjacent cells into one cell. The new cell will span numRows rows and numCols columns. If numRows or numCols is less than the current number of rows or columns the cell spans then this method does nothing.
This function was introduced in Qt 4.1.
See also splitCell().
new void QtGui.QTextTable.RemoveColumns | ( | int | pos, |
int | num | ||
) |
Removes a number of columns starting with the column at the specified index.
See also insertRows(), insertColumns(), removeRows(), resize(), appendRows(), and appendColumns().
new void QtGui.QTextTable.RemoveRows | ( | int | pos, |
int | num | ||
) |
Removes a number of rows starting with the row at the specified index.
See also insertRows(), insertColumns(), resize(), removeColumns(), appendRows(), and appendColumns().
new void QtGui.QTextTable.Resize | ( | int | rows, |
int | cols | ||
) |
Resizes the table to contain the required number of rows and columns.
See also insertRows(), insertColumns(), removeRows(), and removeColumns().
new QTextCursor QtGui.QTextTable.RowEnd | ( | QTextCursor | c | ) |
Returns a cursor pointing to the end of the row that contains the given cursor.
See also rowStart().
new QTextCursor QtGui.QTextTable.RowStart | ( | QTextCursor | c | ) |
Returns a cursor pointing to the start of the row that contains the given cursor.
See also rowEnd().
new void QtGui.QTextTable.SplitCell | ( | int | row, |
int | col, | ||
int | numRows, | ||
int | numCols | ||
) |
Splits the specified cell at row and column into an array of multiple cells with dimensions specified by numRows and numCols.
Note: It is only possible to split cells that span multiple rows or columns, such as rows that have been merged using mergeCells().
This function was introduced in Qt 4.1.
See also mergeCells().
|
static |
|
static |
|
static |
|
static |
|
get |
Returns the number of columns in the table.
See also rows().
|
getprotected |
|
getset |
Returns the table's format.
Sets the table's format.
|
get |
Returns the number of rows in the table.
See also columns().
|
staticget |