KIO
kfilefiltercombo.cpp
42 KFileFilter m_defaultFilter = KFileFilter::fromFilterString(i18nc("Default mime type filter that shows all file types", "*|All Files")).first();
64void KFileFilterCombo::setFilters(const QList<KFileFilter> &types, const KFileFilter &defaultFilter)
101 const bool isAllFileFilters = std::any_of(mimeTypes.cbegin(), mimeTypes.cend(), [&db](const QString &mimeTypeName) {
125 const QString label = i18nc("%1 is the mimetype name, %2 is the extensions", "%1 (%2)", filter.label(), mimeSuffixes.join(QLatin1String(", ")));
void returnPressed(const QString &text)
void setTrapReturnKey(bool trap)
void setFilters(const QList< KFileFilter > &filters, const KFileFilter &defaultFilter=KFileFilter())
Sets the filters to be used.
Definition kfilefiltercombo.cpp:64
KFileFilter currentFilter() const
The currently selected/active filter.
Definition kfilefiltercombo.cpp:184
void setCurrentFilter(const KFileFilter &filter)
Sets the current filter.
Definition kfilefiltercombo.cpp:215
void setDefaultFilter(const KFileFilter &filter)
This method allows to set a default-filter, that is used when an empty filter is set.
Definition kfilefiltercombo.cpp:246
void filterChanged()
This signal is emitted whenever the filter has been changed.
KFileFilterCombo(QWidget *parent=nullptr)
Creates a new filter combo box.
Definition kfilefiltercombo.cpp:48
bool isEmpty() const
Whether the filer is empty, i.e. matches all files.
Definition kfilefilter.cpp:140
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
NoInsert
void activated(int index)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void clear()
count
void setCurrentIndex(int index)
currentText
void setInsertPolicy(InsertPolicy policy)
QString itemText(int index) const const
QLineEdit * lineEdit() const const
FocusOut
Type type() const const
T value(const Key &key) const const
const_iterator cbegin() const const
const_iterator cend() const const
qsizetype count() const const
T & first()
bool isEmpty() const const
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool eventFilter(QObject *watched, QEvent *event)
QString join(QChar separator) const const
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.