diff options
Diffstat (limited to 'doc/man/man3/tqtable.3qt')
-rw-r--r-- | doc/man/man3/tqtable.3qt | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/man/man3/tqtable.3qt b/doc/man/man3/tqtable.3qt index 42d62234a..54930c9a4 100644 --- a/doc/man/man3/tqtable.3qt +++ b/doc/man/man3/tqtable.3qt @@ -11,7 +11,7 @@ QTable \- Flexible editable table widget .SH SYNOPSIS \fC#include <ntqtable.h>\fR .PP -Inherits QScrollView. +Inherits TQScrollView. .PP Inherited by TQDataTable. .PP @@ -489,9 +489,9 @@ QTable is easy to use, although it does have a large API because of the comprehe .br .fi .PP -The first line constructs the table specifying its size in rows and columns. We then insert a pixmap and some text into the \fIsame\fR cell, with the pixmap appearing to the left of the text. QTable cells can be populated with QTableItems, QComboTableItems or by QCheckTableItems. By default a vertical header appears at the left of the table showing row numbers and a horizontal header appears at the top of the table showing column numbers. (The numbers displayed start at 1, although row and column numbers within QTable begin at 0.) +The first line constructs the table specifying its size in rows and columns. We then insert a pixmap and some text into the \fIsame\fR cell, with the pixmap appearing to the left of the text. QTable cells can be populated with QTableItems, TQComboTableItems or by TQCheckTableItems. By default a vertical header appears at the left of the table showing row numbers and a horizontal header appears at the top of the table showing column numbers. (The numbers displayed start at 1, although row and column numbers within QTable begin at 0.) .PP -If you want to use mouse tracking call setMouseTracking( TRUE ) on the \fIviewport\fR; (see QScrollView). +If you want to use mouse tracking call setMouseTracking( TRUE ) on the \fIviewport\fR; (see TQScrollView). .PP <center> .ce 1 @@ -521,21 +521,21 @@ All of a QTable's cells are empty when the table is constructed. .PP There are two approaches to populating the table's cells. The first and simplest approach is to use QTableItems or QTableItem subclasses. The second approach doesn't use QTableItems at all which is useful for very large sparse tables but requires you to reimplement a number of functions. We'll look at each approach in turn. .PP -To put a string in a cell use setText(). This function will create a new QTableItem for the cell if one doesn't already exist, and displays the text in it. By default the table item's widget will be a QLineEdit. A pixmap may be put in a cell with setPixmap(), which also creates a table item if required. A cell may contain \fIboth\fR a pixmap and text; the pixmap is displayed to the left of the text. Another approach is to construct a QTableItem or QTableItem subclass, set its properties, then insert it into a cell with setItem(). +To put a string in a cell use setText(). This function will create a new QTableItem for the cell if one doesn't already exist, and displays the text in it. By default the table item's widget will be a TQLineEdit. A pixmap may be put in a cell with setPixmap(), which also creates a table item if required. A cell may contain \fIboth\fR a pixmap and text; the pixmap is displayed to the left of the text. Another approach is to construct a QTableItem or QTableItem subclass, set its properties, then insert it into a cell with setItem(). .PP -If you want cells which contain comboboxes use the QComboTableItem class. Similarly if you require cells containing checkboxes use the QCheckTableItem class. These table items look and behave just like the combobox or checkbox widgets but consume far less memory. +If you want cells which contain comboboxes use the TQComboTableItem class. Similarly if you require cells containing checkboxes use the TQCheckTableItem class. These table items look and behave just like the combobox or checkbox widgets but consume far less memory. .PP .nf .br for ( int j = 0; j < numRows; ++j ) .br - table.setItem( j, 1, new QCheckTableItem( &table, "Check me" ) ); + table.setItem( j, 1, new TQCheckTableItem( &table, "Check me" ) ); .fi -In the example above we create a column of QCheckTableItems and insert them into the table using setItem(). +In the example above we create a column of TQCheckTableItems and insert them into the table using setItem(). .PP QTable takes ownership of its QTableItems and will delete them when the table itself is destroyed. You can take ownership of a table item using takeItem() which you use to move a cell's contents from one cell to another, either within the same table, or from one table to another. (See also, swapCells()). .PP -In-place editing of the text in QTableItems, and the values in QComboTableItems and QCheckTableItems works automatically. Cells may be editable or read-only, see QTableItem::EditType. If you want fine control over editing see beginEdit() and endEdit(). +In-place editing of the text in QTableItems, and the values in TQComboTableItems and TQCheckTableItems works automatically. Cells may be editable or read-only, see QTableItem::EditType. If you want fine control over editing see beginEdit() and endEdit(). .PP The contents of a cell can be retrieved as a QTableItem using item(), or as a string with text() or as a pixmap (if there is one) with pixmap(). A cell's bounding rectangle is given by cellGeometry(). Use updateCell() to repaint a cell, for example to clear away a cell's visual representation after it has been deleted with clearCell(). The table can be forced to scroll to show a particular cell with ensureCellVisible(). The isSelected() function indicates if a cell is selected. .PP @@ -600,7 +600,7 @@ See also TQWidget::clearWFlags() and TQt::WidgetFlags. .SH "QTable::QTable ( int numRows, int numCols, TQWidget * parent = 0, const char * name = 0 )" Constructs an empty table called \fIname\fR with \fInumRows\fR rows and \fInumCols\fR columns. The table is a child of \fIparent\fR. .PP -If you're using QTableItems to populate the table's cells, you can create QTableItem, QComboTableItem and QCheckTableItem items and insert them into the table using setItem(). (See the notes on large tables for an alternative to using QTableItems.) +If you're using QTableItems to populate the table's cells, you can create QTableItem, TQComboTableItem and TQCheckTableItem items and insert them into the table using setItem(). (See the notes on large tables for an alternative to using QTableItems.) .PP See also TQWidget::clearWFlags() and TQt::WidgetFlags. .SH "QTable::~QTable ()" @@ -698,21 +698,21 @@ This event handler is called whenever a QTable object receives a TQDragEnterEven .PP The focus is moved to the cell where the TQDragEnterEvent occurred. .PP -Reimplemented from QScrollView. +Reimplemented from TQScrollView. .SH "void QTable::contentsDragLeaveEvent ( TQDragLeaveEvent * e )\fC [virtual protected]\fR" This event handler is called when a drag activity leaves \fIthis\fR QTable object with event \fIe\fR. .PP -Reimplemented from QScrollView. +Reimplemented from TQScrollView. .SH "void QTable::contentsDragMoveEvent ( TQDragMoveEvent * e )\fC [virtual protected]\fR" This event handler is called whenever a QTable object receives a TQDragMoveEvent \fIe\fR, i.e. when the user actually drags the mouse. .PP The focus is moved to the cell where the TQDragMoveEvent occurred. .PP -Reimplemented from QScrollView. +Reimplemented from TQScrollView. .SH "void QTable::contentsDropEvent ( TQDropEvent * e )\fC [virtual protected]\fR" This event handler is called when the user ends a drag and drop by dropping something onto \fIthis\fR QTable and thus triggers the drop event, \fIe\fR. .PP -Reimplemented from QScrollView. +Reimplemented from TQScrollView. .SH "void QTable::contextMenuRequested ( int row, int col, const TQPoint & pos )\fC [signal]\fR" This signal is emitted when the user invokes a context menu with the right mouse button (or with a system-specific keypress). The cell where the event took place is at \fIrow\fR, \fIcol\fR. \fIpos\fR is the position where the context menu will appear in the global coordinate system. This signal is always emitted, even if the contents of the cell are disabled. .SH "TQWidget * QTable::createEditor ( int row, int col, bool initFromCell ) const\fC [virtual protected]\fR" @@ -720,11 +720,11 @@ This function returns the widget which should be used as an editor for the conte .PP If \fIinitFromCell\fR is TRUE, the editor is used to edit the current contents of the cell (so the editor widget should be initialized with this content). If \fIinitFromCell\fR is FALSE, the content of the cell is replaced with the new content which the user entered into the widget created by this function. .PP -The default functionality is as follows: if \fIinitFromCell\fR is TRUE or the cell has a QTableItem and the table item's QTableItem::isReplaceable() is FALSE then the cell is asked to create an appropriate editor (using QTableItem::createEditor()). Otherwise a QLineEdit is used as the editor. +The default functionality is as follows: if \fIinitFromCell\fR is TRUE or the cell has a QTableItem and the table item's QTableItem::isReplaceable() is FALSE then the cell is asked to create an appropriate editor (using QTableItem::createEditor()). Otherwise a TQLineEdit is used as the editor. .PP If you want to create your own editor for certain cells, implement a custom QTableItem subclass and reimplement QTableItem::createEditor(). .PP -If you are not using QTableItems and you don't want to use a QLineEdit as the default editor, subclass QTable and reimplement this function with code like this: +If you are not using QTableItems and you don't want to use a TQLineEdit as the default editor, subclass QTable and reimplement this function with code like this: .PP .nf .br @@ -789,7 +789,7 @@ Draws the table contents on the painter \fIp\fR. This function is optimized so t .PP Additionally, drawContents() highlights the current cell. .PP -Reimplemented from QScrollView. +Reimplemented from TQScrollView. .SH "void QTable::dropped ( TQDropEvent * e )\fC [signal]\fR" This signal is emitted when a drop event occurred on the table. .PP @@ -1138,7 +1138,7 @@ Sets the pixmap in the cell at \fIrow\fR, \fIcol\fR to \fIpix\fR. .PP If the cell does not contain a table item a QTableItem is created with an EditType of \fCOnTyping\fR, otherwise the existing table item's pixmap (if any) is replaced with \fIpix\fR. .PP -Note that QComboTableItems and QCheckTableItems don't show pixmaps. +Note that TQComboTableItems and TQCheckTableItems don't show pixmaps. .PP See also pixmap(), setText(), setItem(), and QTableItem::setPixmap(). .PP |