KItemViews
klistwidgetsearchline.cpp
110 connect(d->listWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(_k_rowsInserted(QModelIndex,int,int)));
111 connect(d->listWidget->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(_k_dataChanged(QModelIndex,QModelIndex)));
132 return (item->text().indexOf(s, 0, caseSensitive() ? Qt::CaseSensitive : Qt::CaseInsensitive) >= 0);
144 QObject::connect(listWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), q, SLOT(_k_rowsInserted(QModelIndex,int,int)));
145 QObject::connect(listWidget->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), q, SLOT(_k_dataChanged(QModelIndex,QModelIndex)));
189 if (keyEvent->matches(QKeySequence::MoveToNextLine) || keyEvent->matches(QKeySequence::SelectNextLine)
190 || keyEvent->matches(QKeySequence::MoveToPreviousLine) || keyEvent->matches(QKeySequence::SelectPreviousLine)
191 || keyEvent->matches(QKeySequence::MoveToNextPage) || keyEvent->matches(QKeySequence::SelectNextPage)
192 || keyEvent->matches(QKeySequence::MoveToPreviousPage) || keyEvent->matches(QKeySequence::SelectPreviousPage)) {
235void KListWidgetSearchLinePrivate::_k_rowsInserted(const QModelIndex &parent, int start, int end)
244void KListWidgetSearchLinePrivate::_k_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
bool event(QEvent *event) override
Re-implemented for internal reasons.
Definition klistwidgetsearchline.cpp:185
~KListWidgetSearchLine() override
Destroys the KListWidgetSearchLine.
Definition klistwidgetsearchline.cpp:53
void clear()
Clear line edit and empty hiddenItems, returning elements to listWidget.
Definition klistwidgetsearchline.cpp:79
virtual void updateSearch(const QString &s=QString())
Updates search to only make visible the items that match s.
Definition klistwidgetsearchline.cpp:71
void setCaseSensitivity(Qt::CaseSensitivity cs)
Make the search case sensitive or case insensitive.
Definition klistwidgetsearchline.cpp:93
KListWidgetSearchLine(QWidget *parent=nullptr, QListWidget *listWidget=nullptr)
Constructs a KListWidgetSearchLine with listWidget being the QListWidget to be filtered.
Definition klistwidgetsearchline.cpp:45
QListWidget * listWidget() const
Returns the listWidget that is currently filtered by the search.
Definition klistwidgetsearchline.cpp:63
Qt::CaseSensitivity caseSensitive() const
Returns if the search is case sensitive.
Definition klistwidgetsearchline.cpp:58
virtual bool itemMatches(const QListWidgetItem *item, const QString &s) const
Returns true if item matches the search s.
Definition klistwidgetsearchline.cpp:122
void setListWidget(QListWidget *lv)
Sets the QListWidget that is filtered by this search line.
Definition klistwidgetsearchline.cpp:98
Q_SCRIPTABLE QString start(QString train="")
Q_SCRIPTABLE Q_NOREPLY void start()
const QList< QKeySequence > & end()
QAbstractItemModel * model() const const
bool sendEvent(QObject *receiver, QEvent *event)
KeyPress
MoveToNextLine
QLineEdit(QWidget *parent)
void clear()
virtual bool event(QEvent *e) override
text
bool isHidden() const const
void setHidden(bool hide)
QString text() const const
bool isValid() const const
QModelIndex parent() const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void destroyed(QObject *obj)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
bool isNull() const const
CaseSensitivity
Key_Enter
singleShot
QWidget(QWidget *parent, Qt::WindowFlags f)
void setEnabled(bool)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:21 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:21 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.