KIO
kurlcombobox.cpp
272 const int offset = qMax(0, static_cast<int>(d->itemList.size() + d->defaultList.size()) - d->myMaximum);
348 if (url.toString(QUrl::StripTrailingSlash) == mit.value()->url.toString(QUrl::StripTrailingSlash)) {
349 auto removePredicate = [&mit](const std::unique_ptr<const KUrlComboBoxPrivate::KUrlComboItem> &item) {
352 d->itemList.erase(std::remove_if(d->itemList.begin(), d->itemList.end(), removePredicate), d->itemList.end());
384 QStyle::visualRect(layoutDirection(), rect(), style()->subControlRect(QStyle::CC_ComboBox, &comboOpt, QStyle::SC_ComboBoxEditField, this)).x();
428// now that it would require clearing the text, and I don't see the point since the URL was already in the text.
void setTrapReturnKey(bool trap)
KCompletion * compObj() const
virtual void setCompletionObject(KCompletion *completionObject, bool handleSignals=true)
KCompletion * completionObject(bool handleSignals=true)
virtual void setOrder(CompOrder order)
Sorted
SizeMedium
SizeSmall
This combobox shows a number of recent URLs/directories, as well as some default directories.
Definition kurlcombobox.h:43
void setUrls(const QStringList &urls)
Inserts urls into the combobox below the "default urls" (see addDefaultUrl).
Definition kurlcombobox.cpp:164
OverLoadResolving
This Enumeration is used in setUrl() to determine which items will be removed when the given list is ...
Definition kurlcombobox.h:64
KUrlComboBox(Mode mode, QWidget *parent=nullptr)
Constructs a KUrlComboBox.
Definition kurlcombobox.cpp:89
void removeUrl(const QUrl &url, bool checkDefaultURLs=true)
Removes any occurrence of url.
Definition kurlcombobox.cpp:344
void setCompletionObject(KCompletion *compObj, bool hsig=true) override
Reimplemented from KComboBox (from KCompletion)
Definition kurlcombobox.cpp:368
void setMaxItems(int)
Sets how many items should be handled and displayed by the combobox.
Definition kurlcombobox.cpp:316
void setDefaults()
Clears all items and inserts the default urls into the combo.
Definition kurlcombobox.cpp:154
void addDefaultUrl(const QUrl &url, const QString &text=QString())
Adds a url that will always be shown in the combobox, it can't be "rotated away".
Definition kurlcombobox.cpp:144
KIOCORE_EXPORT QString iconNameForUrl(const QUrl &url)
Return the icon name for a URL.
Definition global.cpp:188
startDragDistance
NoInsert
void activated(int index)
void clear()
count
void setCurrentIndex(int index)
virtual bool event(QEvent *event) override
void insertItem(int index, const QIcon &icon, const QString &text, const QVariant &userData)
void setInsertPolicy(InsertPolicy policy)
QIcon itemIcon(int index) const const
QString itemText(int index) const const
virtual void mousePressEvent(QMouseEvent *e) override
void setItemIcon(int index, const QIcon &icon)
void setItemText(int index, const QString &text)
Qt::DropAction exec(Qt::DropActions supportedActions)
void setMimeData(QMimeData *data)
void setPixmap(const QPixmap &pixmap)
bool exists() const const
QIcon fromTheme(const QString &name)
ConstIterator
void append(QList< T > &&value)
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
bool isEmpty() const const
void removeFirst()
void removeLast()
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue) const const
void setText(const QString &text)
void setUrls(const QList< QUrl > &urls)
bool blockSignals(bool block)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
int x() const const
Expanding
bool isEmpty() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
CC_ComboBox
PM_DefaultFrameWidth
SC_ComboBoxEditField
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRectangle, const QRect &logicalRectangle)
void initFrom(const QWidget *widget)
LeftToRight
LeftButton
StripTrailingSlash
QUrl adjusted(FormattingOptions options) const const
QUrl fromLocalFile(const QString &localFile)
bool isEmpty() const const
bool isLocalFile() const const
void setUrl(const QString &url, ParsingMode parsingMode)
QString toDisplayString(FormattingOptions options) const const
QString toLocalFile() const const
QString toString(FormattingOptions options) const const
void setLayoutDirection(Qt::LayoutDirection direction)
virtual void mouseMoveEvent(QMouseEvent *event)
rect
void setSizePolicy(QSizePolicy)
QStyle * style() const const
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.