#include </home/clem/local/src/opie/libopie2/qt3/opieui/ocompletionbox.h>
Collaboration diagram for OCompletionBox:

Public Slots | |
| QStringList | items () const |
| void | insertItems (const QStringList &items, int index=-1) |
| void | setItems (const QStringList &items) |
| virtual void | popup () |
| void | setTabHandling (bool enable) |
| bool | isTabHandling () const |
| void | setCancelledText (const QString &) |
| QString | cancelledText () const |
| void | down () |
| void | up () |
| void | pageDown () |
| void | pageUp () |
| void | home () |
| void | end () |
| virtual void | show () |
| virtual void | hide () |
Signals | |
| void | activated (const QString &) |
| void | userCancelled (const QString &) |
Public Member Functions | |
| OCompletionBox (QWidget *parent, const char *name=0) | |
| ~OCompletionBox () | |
| virtual QSize | sizeHint () const |
Protected Slots | |
| virtual void | slotActivated (QListBoxItem *) |
Protected Member Functions | |
| virtual bool | eventFilter (QObject *, QEvent *) |
Properties | |
| bool | isTabHandling |
| QString | cancelledText |
Private Slots | |
| void | slotSetCurrentItem (QListBoxItem *i) |
| void | slotCurrentChanged () |
| void | cancelled () |
| void | slotItemClicked (QListBoxItem *) |
Private Attributes | |
| OCompletionBoxPrivate * | d |
Classes | |
| class | OCompletionBoxPrivate |
A little utility class for "completion-widgets", like OLineEdit or OComboBox. OCompletionBox is a listbox, displayed as a rectangle without any window decoration, usually directly under the lineedit or combobox. It is filled with all possible matches for a completion, so the user can select the one he wants.
It is used when OGlobalSettings::Completion == CompletionPopup or CompletionPopupAuto.
Definition at line 57 of file ocompletionbox.h.
|
||||||||||||
|
Constructs a OCompletionBox. Notice: the parent needs to be always 0L, so you can't specify it in the constructor. Because of that, Qt's auto-deletion does not take place, so you have to explicitly delete this widget when you don't need it anymore. The parent widget is used to give the focus back when pressing the up-button on the very first item. Definition at line 50 of file ocompletionbox.cpp. References d, OCompletionBox::OCompletionBoxPrivate::down_workaround, OCompletionBox::OCompletionBoxPrivate::m_parent, slotActivated(), slotCurrentChanged(), slotItemClicked(), and OCompletionBox::OCompletionBoxPrivate::tabHandling. |
|
|
Destroys the box Definition at line 80 of file ocompletionbox.cpp. References d, and OCompletionBox::OCompletionBoxPrivate::m_parent. |
|
|
Emitted when an item was selected, contains the text of the selected item. Referenced by slotActivated(), and slotItemClicked(). |
|
|
Definition at line 336 of file ocompletionbox.cpp. References OCompletionBox::OCompletionBoxPrivate::cancelText, d, hide(), QString::isNull(), and userCancelled(). Referenced by eventFilter(). |
|
|
|
|
|
Moves the selection one line down or select the first item if nothing is selected yet. Definition at line 271 of file ocompletionbox.cpp. References d, OCompletionBox::OCompletionBoxPrivate::down_workaround, and i. Referenced by eventFilter(). |
|
|
Moves the selection down to the last item. Definition at line 311 of file ocompletionbox.cpp. |
|
||||||||||||
|
Reimplemented from OListBox to get events from the viewport (to hide this widget on mouse-click, Escape-presses, etc. Definition at line 104 of file ocompletionbox.cpp. References cancelled(), d, down(), hide(), KeyPress, OCompletionBox::OCompletionBoxPrivate::m_parent, pageDown(), pageUp(), sizeHint(), OCompletionBox::OCompletionBoxPrivate::tabHandling, type, and up(). |
|
|
Re-implemented for internal reasons. API is unaffected. Definition at line 252 of file ocompletionbox.cpp. References OCompletionBox::OCompletionBoxPrivate::cancelText, d, OCompletionBox::OCompletionBoxPrivate::m_parent, QString::null, and qApp. Referenced by cancelled(), OLineEdit::completionMenuActivated(), OLineEdit::eventFilter(), eventFilter(), OLineEdit::keyPressEvent(), OLineEdit::makeCompletion(), popup(), OLineEdit::setCompletedItems(), OLineEdit::setCompletionMode(), slotActivated(), and slotItemClicked(). |
|
|
Moves the selection up to the first item. Definition at line 306 of file ocompletionbox.cpp. |
|
||||||||||||
|
Inserts Definition at line 351 of file ocompletionbox.cpp. References d, and OCompletionBox::OCompletionBoxPrivate::down_workaround. |
|
|
|
|
|
Returns a list of all items currently in the box. Definition at line 86 of file ocompletionbox.cpp. References QValueList< T >::append(), i, list, and text. |
|
|
Moves the selection one page down. Definition at line 292 of file ocompletionbox.cpp. References i. Referenced by eventFilter(). |
|
|
Moves the selection one page up. Definition at line 299 of file ocompletionbox.cpp. References i. Referenced by eventFilter(). |
|
|
Adjusts the size of the box to fit the width of the parent given in the constructor and pops it up at the most appropriate place, relative to the parent. Depending on the screensize and the position of the parent, this may be a different place, however the default is to pop it up and the lower left corner of the parent. Make sure to hide() the box when appropriate. Definition at line 205 of file ocompletionbox.cpp. References height, hide(), show(), size, and sizeHint(). Referenced by OpieUIDemo::demoOCompletionBox(), and OLineEdit::setCompletedItems(). |
|
|
Sets the text to be emitted if the user chooses not to pick from the available matches. If the cancelled text is not set through this function, the userCancelled signal will not be emitted.
Definition at line 326 of file ocompletionbox.cpp. References OCompletionBox::OCompletionBoxPrivate::cancelText, and d. Referenced by OLineEdit::setCompletedItems(). |
|
|
Clears the box and inserts Definition at line 360 of file ocompletionbox.cpp. References QValueList< T >::begin(), d, OCompletionBox::OCompletionBoxPrivate::down_workaround, and QValueList< T >::end(). Referenced by OLineEdit::setCompletedItems(). |
|
|
Makes this widget (when visible) capture Tab-key events to traverse the items in the dropdown list. Default off, as it conflicts with the usual behavior of Tab to traverse widgets. It is useful for cases like Konqueror's Location Bar, though.
Definition at line 316 of file ocompletionbox.cpp. References d, and OCompletionBox::OCompletionBoxPrivate::tabHandling. |
|
|
Re-implemented for internal reasons. API is unaffected. Definition at line 223 of file ocompletionbox.cpp. References d, height, OCompletionBox::OCompletionBoxPrivate::m_parent, qApp, sizeHint(), width, Opie::MM::x, and Opie::MM::y. Referenced by popup(). |
|
|
Definition at line 260 of file ocompletionbox.cpp. References d, height, OCompletionBox::OCompletionBoxPrivate::m_parent, and width. Referenced by eventFilter(), popup(), and show(). |
|
|
Called when an item was activated. Emits activated() with the item. Definition at line 95 of file ocompletionbox.cpp. References activated(), and hide(). Referenced by OCompletionBox(). |
|
|
Definition at line 391 of file ocompletionbox.cpp. References d, and OCompletionBox::OCompletionBoxPrivate::down_workaround. Referenced by OCompletionBox(). |
|
|
Definition at line 396 of file ocompletionbox.cpp. References activated(), d, OCompletionBox::OCompletionBoxPrivate::down_workaround, and hide(). Referenced by OCompletionBox(). |
|
|
Definition at line 221 of file ocompletionbox.h. |
|
|
Moves the selection one line up or select the first item if nothing is selected yet. Definition at line 286 of file ocompletionbox.cpp. Referenced by eventFilter(). |
|
|
Emitted whenever the user chooses to ignore the available selections and close the this box. Referenced by cancelled(). |
|
|
Definition at line 227 of file ocompletionbox.h. Referenced by cancelled(), down(), eventFilter(), hide(), insertItems(), OCompletionBox(), setCancelledText(), setItems(), setTabHandling(), show(), sizeHint(), slotCurrentChanged(), slotItemClicked(), and ~OCompletionBox(). |
|
|
Definition at line 61 of file ocompletionbox.h. |
|
|
Definition at line 59 of file ocompletionbox.h. |
1.4.2