# tablewidget class Tablewidget widget.
Inherits
object widget
Description
This widget provides a table.
Functions
`$setText(<row:uint>,<col:uint>,[<text:string>])`
Sets the contents of the cell pointeid by row and col to text.
`$setTooltip(<row:uint>,<col:uint>,[<text:string>])`
Sets the tooltip of the cell pointeid by row and col to text.
`$setNumber(<row:uint>,<col:uint>,[<number:integer>]).`
Sets the contents of the cell pointeid by row and col to number.
`<string> $text(<row:integer>,<col:integer>)`
Returns the text of the cell pointed by row and col.
`$setHorizontalHeaderLabels(<string array>)`
Sets the horizontal header labels using labels.
`$showHorizontalHeader()`
Shows the horizontal header.
`$hideHorizontalHeader()`
Hides the horizontal header.
`$setVerticalHeaderLabels(<string array>)`
Sets the vertical header labels using labels.
`$showVerticalHeader()`
Shows the vertical header.
`$hideVerticalHeader()`
Hides the vertical header.
`$setRowCount(<integer>)`
Sets the number of rows in the table.
`<integer> $rowCount()`
Returns the number of rows in the table.
`<integer> $currentRow()`
Returns the current row. Useful in the [classfnc]customContextMenuRequestedEvent[/classfnc].
`$insertRow(<row:uinteger>)`
Insert an empty row at <row>.
`$removeRow(<row:uinteger>)`
Remove the row at <row> and all its items from the table.
`$insertColumn(<column:uinteger>)`
Insert an empty column at <column>.
`$removeColumn(<column:uinteger>)`
Remove the column at <column> and all its items from the table.
`$setColumnCount(<uinteger>)`
Sets the number of columns in the table.
`<integer> $columnCount()`
Returns the number of columns in the table.
`<integer> $currentRow()`
Returns the current column. Useful in the [classfnc]customContextMenuRequestedEvent[/classfnc] See also $foreground.
`$setForegroundColor(<row:uinteger>,<col:uinteger>,<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red_or_colorname>,[geen:integer],[blue:integer])`
Sets the foreground of the cell at <row,<col> according to <colorname> <rgb_value>:valid values are: - hex string: must be a string with 6 hexadecimal digits (like the ones used to specify colors in html pages). The first two digits specify the RED component, the third and fourth digit specify the GREEN component and the last two specify the BLUE component. For example "FFFF00" means full red, full green and no blue that gives
`$setItemFlags(<row:uint>,<col:uint>,<flag1:string>, <flag2:string>, ...)`
Sets the flags for the cell pointed by row and col to the given flags. These determine whether the cell can be selected or modified. Supported flags are: - noitemflag : no flag sets; - selectable : cell is selecatble; - editable : cell is editable; - dragEnabled : cell can dragged; - dropEnabled : cell can used as drop target; - userCheckable : cell is checkable; - enabled :cell is enabled; - tristate : cell is checkable with three separate states.
`$setCellWidget(<row:uint>,<column:uint>,<widget:hobject>)`
Sets the given widget to be displayed in the cell in the given row and column, passing the ownership of the widget to the table.
`$setIcon(<row:uint>,<column:uint>,<icon:imageid or hobject>)`
Sets the cell icon pointed by <row>,<column>. Icon parameter can be a standard KVIrc image identifier icon or a KVS pixmap's object.
`$hideRow(<row:uint>)`
Hides the row <row>.
`$showRow(<row:uint>)`
Shows the row <row>.
`$hideColumn(<col:uint>)`
Hides the column <col>.
`$showColumn(<col:uint>)`
Shows the column <col>.
`$clear()`
Clears the table.
`<row,col> $itemEnteredEvent()`
This event is triggered when the mouse cursor enters an cell.
`<row,col> $cellActivatedEvent()`
This event is triggered when the cell specified by row and column has been activated
`<row,col> $cellDoubleClickedEvent()`
This event is triggered whenever a cell in the table is double clicked.
`$paintCellEvent(<painter:hobject>,<row,uint>,<col:uint>,<cell_width:uint>,<cell_height:uint>)`
This event handler can be reimplemented to repaint cells. The framework will pass the row/col coordinates, cell's width and height, and, as parameter, a painterobject. You don't need to begin/end/delete the painter.
`$sizeHintCellRequestEvent()`
This event handler can be reimplemented to pass a custom size hint for this cell to the table layout !fn; $resizeRowsToContents() This function will try to redistribute the available space according to the space requirement of each row !fn; $resizeColumnsToContents() This function will try to redistribute the available space according to the space requirement of each column
Signals
`$clicked()`
This signal is emitted by the default implementation of $clickEvent().

Index, Object Classes

KVIrc 4.2.0.6190 Documentation
Generated by root at Tue Sep 24 07:25:10 2013