KTabListBox Class Reference

[kdeui Index] [kdeui Hierarchy] [Headers]


A multi column listbox Features: - User resizeable columns More...

#include <ktablistbox.h>

Inherits: KDNDWidget (kdecore)

Public Members

Protected Members

Protected Slots

Signals


Detailed Description

A multi column listbox Features: - User resizeable columns. - The order of columns can be changed with drag&drop. (Alex) - 3 modes: Standard, SimpleOrder, ComplexOrder. (Alex) ToDo: - Configurable vertical column divisor lines. - Save all setting to config file. - fix flickering into column headers.


void enableKey(void) [public]

This enable the key-bindings (and set StrongFocus!)if you don't want StrongFocus you can implement your own keyPressEvent

uint count(void) const [public]

Returns the number of rows

void insertItem(const char* string, int itemIndex=-1) [public virtual]

Insert a line before given index, using the separator character to separate the fields. If no index is given the line is appended at the end. Returns index of inserted item.

void appendStrList( QStrList const *strLst ) [public]

Append a QStrList

void appendItem(const char* string) [public]

Same as insertItem, but always appends the new item.

void changeItem(const char* string, int itemIndex) [public virtual]

Change contents of a line using the separator character to separate the fields.

void changeItemPart(const char* string, int itemIndex, int column) [public virtual]

Change part of the contents of a line.

void changeItemColor(const QColor& color, int itemIndex=-1) [public virtual]

Change color of line. Changes last inserted item when itemIndex==-1

int tabWidth(void) const [public]

Get number of pixels one tab character stands for. Default: 10

void setTabWidth(int) [public virtual]

Set number of pixels one tab character stands for. Default: 10

const QString& text(int idx, int col=-1) const [public]

Returns contents of given row/column. If col is not set thecontents of the whole row is returned, seperated with the current seperation character. In this case the string returned is a temporary string that will change on the next text() call on any

void removeItem(int itemIndex) [public virtual]

Remove one item from the list.

void clear(void) [public virtual]

Remove contents of listbox

int currentItem(void) const [public]

Return index of current item

void setCurrentItem(int idx, int colId=-1) [public virtual]

Set the current (selected) column. colId is the value that

void unmarkAll(void) [public virtual]

Unmark all items

void markItem(int idx, int colId=-1) [public virtual]

Mark/unmark item with index idx.

bool isMarked(int idx) const [public virtual]

Returns TRUE if item with given index is marked.

int findItem(int yPos) const [public]

Find item at given screen y position.

int topItem(void) const [public]

Returns first item that is currently displayed in the widget.

void setTopItem(int idx) [public]

Change first displayed item by repositioning the visible part

void setNumCols(int) [public virtual]

Set number of columns. Warning: this *deletes* the contents

void setNumRows(int) [public virtual]

Set number of rows in the listbox. The contents stays as it is.

int numRows(void) const [public]

See the docs for the QTableView class.

int numCols(void) const [public]

See the docs for the QTableView class.

int cellWidth(int col) [public]

See the docs for the QTableView class.

int totalWidth(void) [public]

See the docs for the QTableView class.

int cellHeight(int row) [public]

See the docs for the QTableView class.

int totalHeight(void) [public]

See the docs for the QTableView class.

int topCell(void) const [public]

See the docs for the QTableView class.

int leftCell(void) const [public]

See the docs for the QTableView class.

int lastColVisible(void) const [public]

See the docs for the QTableView class.

int lastRowVisible(void) const [public]

See the docs for the QTableView class.

bool autoUpdate(void) const [public]

See the docs for the QTableView class.

void setAutoUpdate(bool upd) [public]

See the docs for the QTableView class.

void clearTableFlags(uint f=~0) [public]

See the docs for the QTableView class.

uint tableFlags(void) [public]

See the docs for the QTableView class.

bool testTableFlags(uint f) [public]

See the docs for the QTableView class.

void setTableFlags(uint f) [public]

See the docs for the QTableView class.

int findCol(int x) [public]

See the docs for the QTableView class.

int findRow(int y) [public]

See the docs for the QTableView class.

bool colXPos(int col, int* x) [public]

See the docs for the QTableView class.

bool rowYPos(int row, int* y) [public]

See the docs for the QTableView class.

void reorderRows() [public virtual]

This call the 'compar' functions if they were been defined in setColumn or else use strcmp. (i.e. if you want a case-insensitive sort put strcasecmp in setColumn call). That compar function must take as arguments two char *, and must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to,

void setColumn(int col, const char* caption, int width=0, ColumnType type=TextColumn, OrderType ordt=NoOrder, OrderMode omode=Descending, bool verticalLine=false, int (*compar) [public virtual]

Set column caption, width, type,order-type and order-mode

void setColumnWidth(int col, int width=0) [public virtual]

Set column width.

int columnWidth(int col) [public]

Get column width.

void setDefaultColumnWidth(int width0, ...) [public virtual]

Set default width of all columns.

void changeMode(int col) [public]

change the Ascending/Descending mode of column col.

void clearAllNum() [public]

Clear all number-check-buttons (ComplexOrder only)

void setSeparator(char sep) [public virtual]

Set separator character, e.g. '\t'.

char separator(void) const [public virtual]

Return separator character.

KTabListBoxDict& dict(void) [public]

For convenient access to the dictionary of pictures that this listbox understands.

bool startDrag(int col, int row, const QPoint& mousePos) [public]

Indicates that a drag has started with given item. Returns TRUE if we are dragging, FALSE if drag-start failed.

void readConfig(void) [public virtual]

Read the config file entries in the group with the name of the listbox and set the default column widths and those.

void writeConfig(void) [public virtual]

Write the config file entries in the group with the name of the listbox

int colPosList(int num) [public]

Return the actual position of the colum in the table.

int itemPosList(int num) [public]

Return the actual positon of the row number num.

const QFont& tableFont(void) const [public]

Get/set font of the table. font() and setFont() apply to the

KTabListBoxColumn* newKTabListBoxColumn(void) [protected virtual]

Used to create new column objects. Overwrite this methodin a subclass to have your own column objects (e.g. with custom data in it). You will then also need customData()/setCustomData()

void setCItem(int idx) [protected]

Internal method called by keyPressEvent.

void adjustNumber(int num) [protected]

Adjust the number in the number check boxes.

bool recursiveSort(int level,int n,KTabListBoxColumn **c,int *iCol) [protected]

For internal use.

void resizeList(int newNumItems=-1) [protected virtual]

Resize item array. Per default enlarge it to double size.

bool prepareForDrag(int col, int row, char** data, int* size, int* type) [protected virtual]

Called to set drag data, size, and type. If this method returns FALSE then no drag occurs.

void doMouseResizeCol(QMouseEvent*) [protected virtual]

Internal method that handles resizing of columns with the mouse.

void doMouseMoveCol(QMouseEvent*) [protected virtual]

Internal method that handles moving of columns with the mouse.

int lastSelectedColumn[protected]

contain the number of the last column where the user clicked on checkbutton.

void highlighted(int Index, int column) [signal]

emited when the current item changes (either via setCurrentItem() or via mouse single-click).

void selected(int Index, int column) [signal]

emitted when the user double-clicks into a line.

void popupMenu(int Index, int column) [signal]

emitted when the user presses the right mouse button over a line.

void midClick(int Index, int column) [signal]

emitted when the user presses the middle mouse button over a line.

void headerClicked(int column) [signal]

emitted when the user clicks on a column header.


Documentation generated by tasin@cd1 on Die Nov 30 17:31:44 CET 1999
Kdoc