KDEUI
khistorycombobox.cpp
Go to the documentation of this file.
104 connect(this, SIGNAL(returnPressed(QString)), SLOT(slotSimulateActivated(QString)), Qt::QueuedConnection);
177 QAction* clearHistory = menu->addAction( KIcon("edit-clear-history"), i18n("Clear &History"), this, SLOT(slotClear()));
425 if ((insertPolicy() == NoInsert && findText(text, Qt::MatchFixedString|Qt::MatchCaseSensitive) == -1)) {
void insertItems(const QStringList &items)
Inserts items into the combo, honoring pixmapProvider() Does not update the completionObject.
Definition: khistorycombobox.cpp:395
QString i18n(const char *text)
Definition: knotification.h:247
void clear()
Qt::KeyboardModifiers modifiers() const
void clearEditText()
KPixmapProvider * pixmapProvider() const
Definition: khistorycombobox.cpp:438
void clear()
bool isVisible() const
QSize iconSize() const
virtual void keyPressEvent(QKeyEvent *e)
virtual void wheelEvent(QWheelEvent *ev)
Handling wheel-events, to rotate the items.
Definition: khistorycombobox.cpp:352
void setEditText(const QString &text)
QString itemText(int index) const
KCompletion * compObj() const
Returns a pointer to the completion object.
Definition: kcompletionbase.cpp:220
bool contains(const QString &text) const
Convenience method which iterates over all items and checks if any of them is equal to text...
Definition: kcombobox.cpp:88
bool removeFromHistory(const QString &item)
Removes all items named item.
Definition: khistorycombobox.cpp:235
void insertItem(int index, const QString &text, const QVariant &userData)
void addToHistory(const QString &item)
Adds an item to the end of the history list and to the completion list.
Definition: khistorycombobox.cpp:183
void aboutToShowContextMenu(QMenu *p)
Emitted before the context menu is displayed.
void addItem(const QString &text, const QVariant &userData)
int findText(const QString &text, QFlags< Qt::MatchFlag > flags) const
int count(const T &value) const
int count() const
void append(const T &value)
void pop_front()
KHistoryComboBox(QWidget *parent=0)
Constructs a "read-write" combobox.
Definition: khistorycombobox.cpp:66
bool isEmpty() const
virtual void keyPressEvent(QKeyEvent *)
Handling key-events, the shortcuts to rotate the items.
Definition: khistorycombobox.cpp:340
void activated(int index)
bool sendEvent(QObject *receiver, QEvent *event)
void reset()
Resets the current position of the up/down history.
Definition: khistorycombobox.cpp:443
virtual void setItems(const QStringList &list)
Sets the list of items available for completion.
Definition: kcompletion.cpp:99
void setDuplicatesEnabled(bool enable)
~KHistoryComboBox()
Destructs the combo, the completion-object and the pixmap-provider.
Definition: khistorycombobox.cpp:107
int key() const
void accept()
KCompletion * completionObject(bool hsig=true)
Returns a pointer to the current completion object.
Definition: kcompletionbase.cpp:96
int delta() const
static KNotification * event(const QString &eventId, const QString &title, const QString &text, const QPixmap &pixmap=QPixmap(), QWidget *widget=0L, const NotificationFlags &flags=CloseOnTimeout, const KComponentData &componentData=KComponentData())
emit an event
Definition: knotification.cpp:291
void removeItem(int index)
void setInsertPolicy(InsertPolicy policy)
typedef ConstIterator
int currentIndex() const
void removeItem(const QString &item)
Removes an item from the list of available completions.
Definition: kcompletion.cpp:208
void addItem(const QString &item)
Adds an item to the list of available completions.
Definition: kcompletion.cpp:146
const KShortcut & rotateDown()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:367
void setMaxCount(int max)
const_iterator constEnd() const
void setPixmapProvider(KPixmapProvider *prov)
Sets a pixmap provider, so that items in the combobox can have a pixmap.
Definition: khistorycombobox.cpp:377
const_iterator constBegin() const
QString currentText() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
const KShortcut & rotateUp()
Help users iterate through a list of entries.
Definition: kstandardshortcut.cpp:366
A tiny abstract class with just one method: pixmapFor()
Definition: kpixmapprovider.h:38
void setHistoryItems(const QStringList &items)
Inserts items into the combobox.
Definition: khistorycombobox.cpp:113
virtual void setOrder(CompOrder order)
KCompletion offers three different ways in which it offers its items:
Definition: kcompletion.cpp:78
void setEnabled(bool)
int height() const
QAbstractItemView * view() const
void cleared()
Emitted when the history was cleared by the entry in the popup menu.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.