#include <qcomboview.h>
Inherits TQWidget.
Inherited by KComboView.
Public Types | |
enum | Policy { NoInsertion, AtTop, AtCurrent, AtBottom, AfterCurrent, BeforeCurrent } |
Public Slots | |
virtual void | clear () |
void | clearValidator () |
void | clearEdit () |
virtual void | setEditText (const TQString &) |
Public Member Functions | |
QComboView (bool rw, TQWidget *parent=0, const char *name=0) | |
~QComboView () | |
int | childCount () const |
TQListViewItem * | currentItem () const |
virtual void | setCurrentItem (TQListViewItem *) |
virtual void | setCurrentActiveItem (TQListViewItem *) |
bool | autoResize () const |
virtual void | setAutoResize (bool) |
TQSize | sizeHint () const |
void | setPalette (const TQPalette &) |
void | setFont (const TQFont &) |
void | setEnabled (bool) |
virtual void | setSizeLimit (int) |
int | sizeLimit () const |
virtual void | setInsertionPolicy (Policy policy) |
Policy | insertionPolicy () const |
virtual void | setValidator (const TQValidator *) |
const TQValidator * | validator () const |
virtual void | setListView (TQListView *) |
TQListView * | listView () const |
virtual void | setLineEdit (TQLineEdit *edit) |
TQLineEdit * | lineEdit () const |
virtual void | setAutoCompletion (bool) |
bool | autoCompletion () const |
bool | eventFilter (TQObject *object, TQEvent *event) |
void | setDuplicatesEnabled (bool enable) |
bool | duplicatesEnabled () const |
bool | editable () const |
void | setEditable (bool) |
virtual void | popup () |
TQString | currentText () const |
void | setCurrentText (const TQString &) |
Protected Member Functions | |
void | paintEvent (TQPaintEvent *) |
void | resizeEvent (TQResizeEvent *) |
void | mousePressEvent (TQMouseEvent *) |
void | mouseMoveEvent (TQMouseEvent *) |
void | mouseReleaseEvent (TQMouseEvent *) |
void | mouseDoubleClickEvent (TQMouseEvent *) |
void | keyPressEvent (TQKeyEvent *e) |
void | focusInEvent (TQFocusEvent *e) |
void | focusOutEvent (TQFocusEvent *e) |
void | wheelEvent (TQWheelEvent *e) |
void | styleChange (TQStyle &) |
void | updateMask () |
Detailed Description
QComboView - a combo with a TQListView as a popup widget.
This means that you can have a treeview inside of a combo. Otherwise it works in the same way as TQComboBox and have similar API.
Definition at line 41 of file qcomboview.h.
Constructor & Destructor Documentation
◆ QComboView()
QComboView::QComboView | ( | bool | rw, |
TQWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
Constructs a combobox with a maximum size and either Motif 2.0 or Windows look and feel.
The input field can be edited if rw is TRUE, otherwise the user may only choose one of the items in the combobox.
The parent and name arguments are passed on to the TQWidget constructor.
Definition at line 141 of file qcomboview.cpp.
◆ ~QComboView()
QComboView::~QComboView | ( | ) |
Destroys the combobox.
Definition at line 175 of file qcomboview.cpp.
Member Function Documentation
◆ clear
|
virtualslot |
Removes all comboview items.
Definition at line 200 of file qcomboview.cpp.
◆ clearEdit
|
slot |
Clears the line edit without changing the combobox's contents. Does nothing if the combobox isn't editable.
This is particularly useful when using a combobox as a line edit with history. For example you can connect the combobox's activated() signal to clearEdit() in order to present the user with a new, empty line as soon as Enter is pressed.
- See also
- setEditText()
Definition at line 1294 of file qcomboview.cpp.
◆ clearValidator
|
slot |
This slot is equivalent to setValidator( 0 ).
Definition at line 1191 of file qcomboview.cpp.
◆ eventFilter()
bool QComboView::eventFilter | ( | TQObject * | object, |
TQEvent * | event | ||
) |
reimp
Definition at line 849 of file qcomboview.cpp.
◆ focusInEvent()
|
protected |
reimp
Definition at line 613 of file qcomboview.cpp.
◆ focusOutEvent()
|
protected |
reimp
Definition at line 625 of file qcomboview.cpp.
◆ keyPressEvent()
|
protected |
reimp
Definition at line 525 of file qcomboview.cpp.
◆ lineEdit()
TQLineEdit * QComboView::lineEdit | ( | ) | const |
Returns the line edit, or 0 if there is no line edit.
Only editable listboxes have a line editor.
Definition at line 1275 of file qcomboview.cpp.
◆ listView()
TQListView * QComboView::listView | ( | ) | const |
Returns the current list box, or 0 if there is no list box. (QComboView can use TQPopupMenu instead of TQListBox.) Provided to match setlistView().
- See also
- setlistView()
Definition at line 1265 of file qcomboview.cpp.
◆ mouseDoubleClickEvent()
|
protected |
reimp
Definition at line 516 of file qcomboview.cpp.
◆ mouseMoveEvent()
|
protected |
reimp
Definition at line 502 of file qcomboview.cpp.
◆ mousePressEvent()
|
protected |
reimp
Definition at line 467 of file qcomboview.cpp.
◆ mouseReleaseEvent()
|
protected |
reimp
Definition at line 509 of file qcomboview.cpp.
◆ paintEvent()
|
protected |
reimp
Definition at line 412 of file qcomboview.cpp.
◆ popup()
|
virtual |
Pops up the combobox popup list.
If the list is empty, no items appear.
Definition at line 719 of file qcomboview.cpp.
◆ resizeEvent()
|
protected |
reimp
Definition at line 401 of file qcomboview.cpp.
◆ setEditText
|
virtualslot |
Sets the text in the line edit to newText without changing the combobox's contents. Does nothing if the combobox isn't editable.
This is useful e.g. for providing a good starting point for the user's editing and entering the change in the combobox only when the user presses Enter.
- See also
- clearEdit() insertItem()
Definition at line 1312 of file qcomboview.cpp.
◆ setEnabled()
void QComboView::setEnabled | ( | bool | enable | ) |
reimp
Definition at line 1151 of file qcomboview.cpp.
◆ setFont()
void QComboView::setFont | ( | const TQFont & | font | ) |
Sets the font for both the combobox button and the combobox popup list to font.
Definition at line 386 of file qcomboview.cpp.
◆ setLineEdit()
|
virtual |
Sets the line edit to use edit instead of the current line edit.
Definition at line 1412 of file qcomboview.cpp.
◆ setListView()
|
virtual |
Sets the combobox to use newListBox instead of the current list box or popup. As a side effect, it clears the combobox of its current contents.
- Warning
- QComboView assumes that newListBox->text(n) returns non-null for 0 <= n < newListbox->count(). This assumption is necessary because of the line edit in QComboView.
Definition at line 1208 of file qcomboview.cpp.
◆ setPalette()
void QComboView::setPalette | ( | const TQPalette & | palette | ) |
Sets the palette for both the combobox button and the combobox popup list to palette.
Definition at line 372 of file qcomboview.cpp.
◆ setValidator()
|
virtual |
Applies the validator v to the combobox so that only text which is valid according to v is accepted.
This function does nothing if the combobox is not editable.
- See also
- validator() clearValidator() TQValidator
Definition at line 1167 of file qcomboview.cpp.
◆ sizeHint()
TQSize QComboView::sizeHint | ( | ) | const |
reimp
This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value call setFont().
Definition at line 275 of file qcomboview.cpp.
◆ styleChange()
|
protected |
reimp
Definition at line 1334 of file qcomboview.cpp.
◆ updateMask()
|
protected |
reimp
Definition at line 786 of file qcomboview.cpp.
◆ validator()
const TQValidator * QComboView::validator | ( | ) | const |
Returns the validator which constrains editing for this combobox if there is one; otherwise returns 0.
- See also
- setValidator() clearValidator() TQValidator
Definition at line 1181 of file qcomboview.cpp.
◆ wheelEvent()
|
protected |
reimp
Definition at line 637 of file qcomboview.cpp.
The documentation for this class was generated from the following files: