#include <qcomboview.h>
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.
Member Enumeration Documentation
◆ Policy
| enum QComboView::Policy |
Definition at line 83 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 140 of file qcomboview.cpp.
◆ ~QComboView()
| QComboView::~QComboView | ( | ) |
Destroys the combobox.
Definition at line 174 of file qcomboview.cpp.
Member Function Documentation
◆ autoCompletion()
| bool QComboView::autoCompletion | ( | ) | const |
Definition at line 1326 of file qcomboview.cpp.
◆ autoResize()
| bool QComboView::autoResize | ( | ) | const |
Definition at line 252 of file qcomboview.cpp.
◆ childCount()
| int QComboView::childCount | ( | ) | const |
Definition at line 189 of file qcomboview.cpp.
◆ clear
|
virtualslot |
Removes all comboview items.
Definition at line 199 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 1293 of file qcomboview.cpp.
◆ clearValidator
|
slot |
This slot is equivalent to setValidator( 0 ).
Definition at line 1190 of file qcomboview.cpp.
◆ currentItem()
| TQListViewItem * QComboView::currentItem | ( | ) | const |
Definition at line 212 of file qcomboview.cpp.
◆ currentText()
| TQString QComboView::currentText | ( | ) | const |
Definition at line 599 of file qcomboview.cpp.
◆ duplicatesEnabled()
| bool QComboView::duplicatesEnabled | ( | ) | const |
Definition at line 184 of file qcomboview.cpp.
◆ editable()
| bool QComboView::editable | ( | ) | const |
Definition at line 1341 of file qcomboview.cpp.
◆ eventFilter()
| bool QComboView::eventFilter | ( | TQObject * | object, |
| TQEvent * | event ) |
reimp
Definition at line 848 of file qcomboview.cpp.
◆ focusInEvent()
|
protected |
reimp
Definition at line 612 of file qcomboview.cpp.
◆ focusOutEvent()
|
protected |
reimp
Definition at line 624 of file qcomboview.cpp.
◆ insertionPolicy()
| QComboView::Policy QComboView::insertionPolicy | ( | ) | const |
Definition at line 1061 of file qcomboview.cpp.
◆ keyPressEvent()
|
protected |
reimp
Definition at line 524 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 1274 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 1264 of file qcomboview.cpp.
◆ mouseDoubleClickEvent()
|
protected |
reimp
Definition at line 515 of file qcomboview.cpp.
◆ mouseMoveEvent()
|
protected |
reimp
Definition at line 501 of file qcomboview.cpp.
◆ mousePressEvent()
|
protected |
reimp
Definition at line 466 of file qcomboview.cpp.
◆ mouseReleaseEvent()
|
protected |
reimp
Definition at line 508 of file qcomboview.cpp.
◆ paintEvent()
|
protected |
reimp
Definition at line 411 of file qcomboview.cpp.
◆ popup()
|
virtual |
Pops up the combobox popup list.
If the list is empty, no items appear.
Definition at line 718 of file qcomboview.cpp.
◆ resizeEvent()
|
protected |
reimp
Definition at line 400 of file qcomboview.cpp.
◆ setAutoCompletion()
|
virtual |
Definition at line 1319 of file qcomboview.cpp.
◆ setAutoResize()
|
virtual |
Definition at line 257 of file qcomboview.cpp.
◆ setCurrentActiveItem()
|
virtual |
Definition at line 1473 of file qcomboview.cpp.
◆ setCurrentItem()
|
virtual |
Definition at line 217 of file qcomboview.cpp.
◆ setCurrentText()
| void QComboView::setCurrentText | ( | const TQString & | txt | ) |
Definition at line 1456 of file qcomboview.cpp.
◆ setDuplicatesEnabled()
| void QComboView::setDuplicatesEnabled | ( | bool | enable | ) |
Definition at line 179 of file qcomboview.cpp.
◆ setEditable()
| void QComboView::setEditable | ( | bool | y | ) |
Definition at line 1346 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 1311 of file qcomboview.cpp.
◆ setEnabled()
| void QComboView::setEnabled | ( | bool | enable | ) |
reimp
Definition at line 1150 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 385 of file qcomboview.cpp.
◆ setInsertionPolicy()
|
virtual |
Definition at line 1066 of file qcomboview.cpp.
◆ setLineEdit()
|
virtual |
Sets the line edit to use edit instead of the current line edit.
Definition at line 1411 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 1207 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 371 of file qcomboview.cpp.
◆ setSizeLimit()
|
virtual |
Definition at line 1042 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 1166 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 274 of file qcomboview.cpp.
◆ sizeLimit()
| int QComboView::sizeLimit | ( | ) | const |
Definition at line 1037 of file qcomboview.cpp.
◆ styleChange()
|
protected |
reimp
Definition at line 1333 of file qcomboview.cpp.
◆ updateMask()
|
protected |
reimp
Definition at line 785 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 1180 of file qcomboview.cpp.
◆ wheelEvent()
|
protected |
reimp
Definition at line 636 of file qcomboview.cpp.
The documentation for this class was generated from the following files:
Trinity API Reference