KCompletion
kcompletionbox.cpp
152 if (d->tabHandling && (ev->modifiers() == Qt::NoButton || (ev->modifiers() & Qt::ShiftModifier))) {
423 selectionModel()->setCurrentIndex(moveCursor(QAbstractItemView::MovePageDown, Qt::NoModifier), QItemSelectionModel::SelectCurrent);
virtual void popup()
Adjusts the size of the box to fit the width of the parent given in the constructor and pops it up at...
Definition: kcompletionbox.cpp:273
void append(const T &value)
QRect calculateGeometry() const
This calculates the size of the dropdown and the relative position of the top left corner with respec...
Definition: kcompletionbox.cpp:370
QString text() const const
virtual bool event(QEvent *e) override
void activated(const QString &text)
Emitted when an item is selected, text is the text of the selected item.
QWidget * window() const const
virtual void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
void setCancelledText(const QString &text)
Sets the text to be emitted if the user chooses not to pick from the available matches.
Definition: kcompletionbox.cpp:453
Move
void setVisible(bool visible) override
Reimplemented for internal reasons.
Definition: kcompletionbox.cpp:338
pos
QSize size() const const
frameWidth
QListWidgetItem * item(int row) const const
Plain
int right() const const
Q_EMITQ_EMIT
QCA_EXPORT void init()
bool isAncestorOf(const QWidget *child) const const
QItemSelectionModel * selectionModel() const const
void itemClicked(QListWidgetItem *item)
QScreen * screen() const const
int x() const const
int y() const const
QWidget * activeWindow()
ScrollBarAsNeeded
virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
QList::const_iterator constBegin() const const
int x() const const
int y() const const
int width() const const
QListWidgetItem * takeItem(int row)
NoButton
QStringList items() const
Returns a list of all items currently in the box.
Definition: kcompletionbox.cpp:88
QRect visualItemRect(const QListWidgetItem *item) const const
void hide()
void reserve(int alloc)
SelectCurrent
bool isVisible() const const
ToolTip
bool signalsBlocked() const const
virtual QRect visualRect(const QModelIndex &index) const const override
MovePageDown
Qt::KeyboardModifiers modifiers() const const
int bottom() const const
void setItems(const QStringList &items)
Clears the box and inserts items.
Definition: kcompletionbox.cpp:499
windowFlags
PopupFocusReason
void insertItems(int row, const QStringList &labels)
void currentTextChanged(const QString ¤tText)
bool blockSignals(bool block)
void up()
Moves the selection one line up or select the first item if nothing is selected yet.
Definition: kcompletionbox.cpp:407
void setActivateOnSelect(bool doEmit)
Set whether or not the selected signal should be emitted when an item is selected.
Definition: kcompletionbox.cpp:562
KCompletionBox(QWidget *parent=nullptr)
Constructs a KCompletionBox.
Definition: kcompletionbox.cpp:40
geometry
Definition: klineedit.h:138
virtual QSize minimumSizeHint() const const override
bool eventFilter(QObject *, QEvent *) override
Reimplemented from QListWidget to get events from the viewport (to hide this widget on mouse-click,...
Definition: kcompletionbox.cpp:115
QPoint mapToGlobal(const QPoint &pos) const const
QList< QListWidgetItem * > selectedItems() const const
A helper widget for "completion-widgets" (KLineEdit, KComboBox))
Definition: kcompletionbox.h:36
Key_Backtab
QListWidgetItem * currentItem() const const
QScreen * screenAt(const QPoint &point)
void show()
virtual bool eventFilter(QObject *object, QEvent *event) override
typedef ConstIterator
void setTabHandling(bool enable)
Makes this widget (when visible) capture Tab-key events to traverse the items in the dropdown list (T...
Definition: kcompletionbox.cpp:441
void addItems(const QStringList &labels)
Box
void insertItems(const QStringList &items, int index=-1)
Inserts items into the box.
Definition: kcompletionbox.cpp:490
void resize(int w, int h)
height
void itemDoubleClicked(QListWidgetItem *item)
int height() const const
QList::const_iterator constEnd() const const
int key() const const
QEvent::Type type() const const
void addItem(const QString &label)
virtual QPoint globalPositionHint() const
The preferred global coordinate at which the completion box's top left corner should be positioned.
Definition: kcompletionbox.cpp:329
void move(int x, int y)
int row(const QListWidgetItem *item) const const
void setText(const QString &text)
void resizeAndReposition()
This properly resizes and repositions the listbox.
Definition: kcompletionbox.cpp:291
width
void textActivated(const QString &text)
Emitted when an item is selected, text is the text of the selected item.
ShiftModifier
virtual void slotActivated(QListWidgetItem *)
Called when an item is activated.
Definition: kcompletionbox.cpp:101
size
void setCurrentRow(int row)
QObject * parent() const const
void down()
Moves the selection one line down or select the first item if nothing is selected yet.
Definition: kcompletionbox.cpp:393
WA_ShowWithoutActivating
void clearSelection()
Q_D(Todo)
void accept()
count
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:07:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jun 27 2022 04:07:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.