You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
6.4 KiB
157 lines
6.4 KiB
'\" t
|
|
.TH TQComboTableItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
|
|
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
|
|
.\" license file included in the distribution for a complete license
|
|
.\" statement.
|
|
.\"
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
TQComboTableItem \- Means of using comboboxes in TQTables
|
|
.SH SYNOPSIS
|
|
\fC#include <tqtable.h>\fR
|
|
.PP
|
|
Inherits TQTableItem.
|
|
.PP
|
|
.SS "Public Members"
|
|
.in +1c
|
|
.ti -1c
|
|
.BI "\fBTQComboTableItem\fR ( TQTable * table, const TQStringList & list, bool editable = FALSE )"
|
|
.br
|
|
.ti -1c
|
|
.BI "\fB~TQComboTableItem\fR ()"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetCurrentItem\fR ( int i )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetCurrentItem\fR ( const TQString & s )"
|
|
.br
|
|
.ti -1c
|
|
.BI "int \fBcurrentItem\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQString \fBcurrentText\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "int \fBcount\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "TQString \fBtext\fR ( int i ) const"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetEditable\fR ( bool b )"
|
|
.br
|
|
.ti -1c
|
|
.BI "bool \fBisEditable\fR () const"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual void \fBsetStringList\fR ( const TQStringList & l )"
|
|
.br
|
|
.ti -1c
|
|
.BI "virtual int \fBrtti\fR () const"
|
|
.br
|
|
.in -1c
|
|
.SH DESCRIPTION
|
|
The TQComboTableItem class provides a means of using comboboxes in TQTables.
|
|
.PP
|
|
A TQComboTableItem is a table item which looks and behaves like a combobox. The advantage of using TQComboTableItems rather than real comboboxes is that a TQComboTableItem uses far less resources than real comboboxes in TQTables. When the cell has the focus it displays a real combobox which the user can interact with. When the cell does not have the focus the cell \fIlooks\fR like a combobox. Only text items (i.e. no pixmaps) may be used in TQComboTableItems.
|
|
.PP
|
|
TQComboTableItem items have the edit type WhenCurrent (see EditType). The TQComboTableItem's list of items is provided by a TQStringList passed to the constructor.
|
|
.PP
|
|
The list of items may be changed using setStringList(). The current item can be set with setCurrentItem() and retrieved with currentItem(). The text of the current item can be obtained with currentText(), and the text of a particular item can be retrieved with text().
|
|
.PP
|
|
If isEditable() is TRUE the TQComboTableItem will permit the user to either choose an existing list item, or create a new list item by entering their own text; otherwise the user may only choose one of the existing list items.
|
|
.PP
|
|
To populate a table cell with a TQComboTableItem use TQTable::setItem().
|
|
.PP
|
|
TQComboTableItems may be deleted with TQTable::clearCell().
|
|
.PP
|
|
TQComboTableItems can be distinguished from TQTableItems and TQCheckTableItems using their Run Time Type Identification number (see rtti()).
|
|
.PP
|
|
<center>
|
|
.ce 1
|
|
.B "[Image Omitted]"
|
|
.PP
|
|
</center>
|
|
.PP
|
|
See also TQCheckTableItem, TQTableItem, TQComboBox, and Advanced Widgets.
|
|
.SH MEMBER FUNCTION DOCUMENTATION
|
|
.SH "TQComboTableItem::TQComboTableItem ( TQTable * table, const TQStringList & list, bool editable = FALSE )"
|
|
Creates a combo table item for the table \fItable\fR. The combobox's list of items is passed in the \fIlist\fR argument. If \fIeditable\fR is TRUE the user may type in new list items; if \fIeditable\fR is FALSE the user may only select from the list of items provided.
|
|
.PP
|
|
By default TQComboTableItems cannot be replaced by other table items since isReplaceable() returns FALSE by default.
|
|
.PP
|
|
See also TQTable::clearCell() and EditType.
|
|
.SH "TQComboTableItem::~TQComboTableItem ()"
|
|
TQComboTableItem destructor.
|
|
.SH "int TQComboTableItem::count () const"
|
|
Returns the total number of list items in the combo table item.
|
|
.SH "int TQComboTableItem::currentItem () const"
|
|
Returns the index of the combo table item's current list item.
|
|
.PP
|
|
See also setCurrentItem().
|
|
.SH "TQString TQComboTableItem::currentText () const"
|
|
Returns the text of the combo table item's current list item.
|
|
.PP
|
|
See also currentItem() and text().
|
|
.SH "bool TQComboTableItem::isEditable () const"
|
|
Returns TRUE if the user can add their own list items to the combobox's list of items; otherwise returns FALSE.
|
|
.PP
|
|
See also setEditable().
|
|
.SH "int TQComboTableItem::rtti () const\fC [virtual]\fR"
|
|
Returns 1.
|
|
.PP
|
|
Make your derived classes return their own values for rtti()to distinguish between different table item subclasses. You should use values greater than 1000, preferably a large random number, to allow for extensions to this class.
|
|
.PP
|
|
See also TQTableItem::rtti().
|
|
.PP
|
|
Reimplemented from TQTableItem.
|
|
.SH "void TQComboTableItem::setCurrentItem ( int i )\fC [virtual]\fR"
|
|
Sets the list item \fIi\fR to be the combo table item's current list item.
|
|
.PP
|
|
See also currentItem().
|
|
.PP
|
|
Example: table/small-table-demo/main.cpp.
|
|
.SH "void TQComboTableItem::setCurrentItem ( const TQString & s )\fC [virtual]\fR"
|
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
|
.PP
|
|
Sets the list item whose text is \fIs\fR to be the combo table item's current list item. Does nothing if no list item has the text \fIs\fR.
|
|
.PP
|
|
See also currentItem().
|
|
.SH "void TQComboTableItem::setEditable ( bool b )\fC [virtual]\fR"
|
|
If \fIb\fR is TRUE the combo table item can be edited, i.e. the user may enter a new text item themselves. If \fIb\fR is FALSE the user may may only choose one of the existing items.
|
|
.PP
|
|
See also isEditable().
|
|
.SH "void TQComboTableItem::setStringList ( const TQStringList & l )\fC [virtual]\fR"
|
|
Sets the list items of this TQComboTableItem to the strings in the string list \fIl\fR.
|
|
.SH "TQString TQComboTableItem::text ( int i ) const"
|
|
Returns the text of the combo's list item at index \fIi\fR.
|
|
.PP
|
|
See also currentText().
|
|
|
|
.SH "SEE ALSO"
|
|
.BR http://doc.trolltech.com/tqcombotableitem.html
|
|
.BR http://www.trolltech.com/faq/tech.html
|
|
.SH COPYRIGHT
|
|
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
|
|
license file included in the distribution for a complete license
|
|
statement.
|
|
.SH AUTHOR
|
|
Generated automatically from the source code.
|
|
.SH BUGS
|
|
If you find a bug in Qt, please report it as described in
|
|
.BR http://doc.trolltech.com/bughowto.html .
|
|
Good bug reports help us to help you. Thank you.
|
|
.P
|
|
The definitive TQt documentation is provided in HTML format; it is
|
|
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
|
|
a web browser. This man page is provided as a convenience for those
|
|
users who prefer man pages, although this format is not officially
|
|
supported by Trolltech.
|
|
.P
|
|
If you find errors in this manual page, please report them to
|
|
.BR qt-bugs@trolltech.com .
|
|
Please include the name of the manual page (tqcombotableitem.3qt) and the Qt
|
|
version (3.3.8).
|