10#include "kurlnavigator.h"
11#include "kcoreurlnavigator.h"
13#include "../utils_p.h"
14#include "kurlnavigatorbutton_p.h"
15#include "kurlnavigatordropdownbutton_p.h"
16#include "kurlnavigatorpathselectoreventfilter_p.h"
17#include "kurlnavigatorplacesselector_p.h"
18#include "kurlnavigatorschemecombo_p.h"
19#include "kurlnavigatortogglebutton_p.h"
22#include <KLocalizedString>
24#include <kfileplacesmodel.h>
25#include <kprotocolinfo.h>
26#include <kurifilter.h>
27#include <kurlcombobox.h>
28#include <kurlcompletion.h>
30#include <QActionGroup>
31#include <QApplication>
40#include <QMimeDatabase>
48using namespace KDEPrivate;
50struct KUrlNavigatorData {
53Q_DECLARE_METATYPE(KUrlNavigatorData)
55class KUrlNavigatorPrivate
60 ~KUrlNavigatorPrivate()
62 m_dropDownButton->removeEventFilter(q);
64 m_toggleEditableMode->removeEventFilter(q);
66 for (KUrlNavigatorButton *button : std::as_const(m_navButtons)) {
67 button->removeEventFilter(q);
71 enum class ApplyUrlMethod { Apply, Tab, ActiveTab, NewWindow };
74 void applyUncommittedUrl(ApplyUrlMethod method);
75 void slotApplyUrl(
QUrl url);
79 std::optional<QUrl> checkFilters(
const QString &text);
81 void slotReturnPressed();
82 void slotSchemeChanged(
const QString &);
83 void openPathSelectorMenu();
90 void appendWidget(
QWidget *widget,
int stretch = 0);
96 void slotToggleEditableButtonPressed();
105 void dropUrls(
const QUrl &destination,
QDropEvent *event, KUrlNavigatorButton *dropButton);
118 void openContextMenu(
const QPoint &p);
120 void slotPathBoxChanged(
const QString &text);
122 void updateContent();
132 void updateButtons(
int startIndex);
139 void updateButtonVisibility();
144 QString firstButtonText()
const;
149 QUrl buttonUrl(
int index)
const;
151 void switchToBreadcrumbMode();
157 void deleteButtons();
166 QUrl retrievePlaceUrl()
const;
175 KUrlNavigatorPlacesSelector *m_placesSelector =
nullptr;
177 KUrlNavigatorSchemeCombo *m_schemes =
nullptr;
178 KUrlNavigatorDropDownButton *m_dropDownButton =
nullptr;
179 KUrlNavigatorButtonBase *m_toggleEditableMode =
nullptr;
180 QWidget *m_dropWidget =
nullptr;
181 QWidget *m_badgeWidgetContainer =
nullptr;
183 bool m_editable =
false;
184 bool m_active =
true;
185 bool m_showPlacesSelector =
false;
186 bool m_showFullPath =
false;
189 bool showHidden =
false;
190 bool sortHiddenLast =
false;
191 } m_subfolderOptions;
197 , m_showPlacesSelector(placesModel != nullptr)
199 m_layout->setSpacing(0);
200 m_layout->setContentsMargins(0, 0, 0, 0);
202 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::currentLocationUrlChanged, q, [
this]() {
203 Q_EMIT q->urlChanged(m_coreUrlNavigator->currentLocationUrl());
206 Q_EMIT q->urlAboutToBeChanged(url);
208 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::historySizeChanged, q, [
this]() {
209 Q_EMIT q->historyChanged();
211 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::historyIndexChanged, q, [
this]() {
212 Q_EMIT q->historyChanged();
215 Q_EMIT q->historyChanged();
218 Q_EMIT q->urlSelectionRequested(url);
222 q->setAutoFillBackground(
false);
224 if (placesModel !=
nullptr) {
225 m_placesSelector =
new KUrlNavigatorPlacesSelector(q, placesModel);
229 auto updateContentFunc = [
this]() {
238 m_schemes =
new KUrlNavigatorSchemeCombo(
QString(), q);
239 q->connect(m_schemes, &KUrlNavigatorSchemeCombo::activated, q, [
this](
const QString &schene) {
240 slotSchemeChanged(schene);
244 m_dropDownButton =
new KUrlNavigatorDropDownButton(q);
246 m_dropDownButton->installEventFilter(q);
247 q->connect(m_dropDownButton, &KUrlNavigatorDropDownButton::clicked, q, [
this]() {
248 openPathSelectorMenu();
252 m_pathBox =
new KUrlComboBox(KUrlComboBox::Directories,
true, q);
254 m_pathBox->installEventFilter(q);
257 m_pathBox->setCompletionObject(kurlCompletion);
258 m_pathBox->setAutoDeleteCompletionObject(
true);
266 slotPathBoxChanged(text);
269 m_badgeWidgetContainer =
new QWidget(q);
270 auto badgeLayout =
new QHBoxLayout(m_badgeWidgetContainer);
271 badgeLayout->setContentsMargins(0, 0, 0, 0);
275 m_toggleEditableMode =
new KUrlNavigatorToggleButton(q);
276 m_toggleEditableMode->installEventFilter(q);
277 m_toggleEditableMode->setMinimumWidth(20);
278 q->connect(m_toggleEditableMode, &KUrlNavigatorToggleButton::clicked, q, [
this]() {
279 slotToggleEditableButtonPressed();
282 if (m_placesSelector !=
nullptr) {
283 m_layout->addWidget(m_placesSelector);
285 m_layout->addWidget(m_schemes);
286 m_layout->addWidget(m_dropDownButton);
287 m_layout->addWidget(m_pathBox, 1);
288 m_layout->addWidget(m_badgeWidgetContainer);
289 m_layout->addWidget(m_toggleEditableMode);
297void KUrlNavigatorPrivate::appendWidget(
QWidget *widget,
int stretch)
303void KUrlNavigatorPrivate::slotApplyUrl(
QUrl url)
313 url.
setPath(QStringLiteral(
"/"));
320 m_pathBox->
setUrls(urls, KUrlComboBox::RemoveBottom);
328std::optional<QUrl> KUrlNavigatorPrivate::checkFilters(
const QString &text)
331 filteredData.setCheckForExecutables(
false);
333 const auto filtersList =
QStringList{QStringLiteral(
"kshorturifilter")};
336 return filteredData.uri();
341void KUrlNavigatorPrivate::applyUncommittedUrl(ApplyUrlMethod method)
346 auto applyUrl = [
this, method](
const QUrl &url) {
348 case ApplyUrlMethod::Apply:
351 case ApplyUrlMethod::Tab:
354 case ApplyUrlMethod::ActiveTab:
357 case ApplyUrlMethod::NewWindow:
368 if (
const auto filteredUrl = checkFilters(text); filteredUrl) {
369 applyUrl(*filteredUrl);
389 if (!job->error() && job->statResult().isDir()) {
390 applyUrl(job->url());
395 if (
const auto filteredUrl = checkFilters(text); filteredUrl) {
396 applyUrl(*filteredUrl);
405void KUrlNavigatorPrivate::slotReturnPressed()
411 applyUncommittedUrl(ApplyUrlMethod::Tab);
413 applyUncommittedUrl(ApplyUrlMethod::ActiveTab);
416 applyUncommittedUrl(ApplyUrlMethod::NewWindow);
418 applyUncommittedUrl(ApplyUrlMethod::Apply);
427 auto switchModeFunc = [
this]() {
428 switchToBreadcrumbMode();
434void KUrlNavigatorPrivate::slotSchemeChanged(
const QString &scheme)
436 Q_ASSERT(m_editable);
444 url.
setPath(QStringLiteral(
"/"));
454void KUrlNavigatorPrivate::openPathSelectorMenu()
456 if (m_navButtons.
count() <= 0) {
465 auto *popupFilter =
new KUrlNavigatorPathSelectorEventFilter(popup.
data());
467 popup->installEventFilter(popupFilter);
469 const QUrl placeUrl = retrievePlaceUrl();
477 dirName = QStringLiteral(
"/");
483 const QString text = spacer + dirName;
486 const QUrl currentUrl = buttonUrl(idx);
487 if (currentUrl == firstVisibleUrl) {
488 popup->addSeparator();
491 popup->addAction(action);
496 }
while (!dirName.isEmpty());
499 const QAction *activatedAction = popup->exec(pos);
500 if (activatedAction !=
nullptr) {
507 popup->deleteLater();
511void KUrlNavigatorPrivate::slotToggleEditableButtonPressed()
514 applyUncommittedUrl(ApplyUrlMethod::Apply);
520void KUrlNavigatorPrivate::switchView()
522 m_toggleEditableMode->setFocus();
523 m_editable = !m_editable;
524 m_toggleEditableMode->setChecked(m_editable);
534void KUrlNavigatorPrivate::dropUrls(
const QUrl &destination,
QDropEvent *event, KUrlNavigatorButton *dropButton)
536 if (
event->mimeData()->hasUrls()) {
537 m_dropWidget = qobject_cast<QWidget *>(dropButton);
555void KUrlNavigatorPrivate::openContextMenu(
const QPoint &p)
571 popup->addSeparator();
577 if (isTabSignal || isWindowSignal) {
578 auto it = std::find_if(m_navButtons.
cbegin(), m_navButtons.
cend(), [&p](
const KUrlNavigatorButton *button) {
579 return button->geometry().contains(p);
581 if (it != m_navButtons.
cend()) {
582 const auto *button = *it;
583 const QUrl url = button->
url();
584 const QString text = button->text();
587 QAction *openInTab = popup->addAction(
QIcon::fromTheme(QStringLiteral(
"tab-new")),
i18nc(
"@item:inmenu",
"Open \"%1\" in New Tab", text));
593 if (isWindowSignal) {
595 popup->addAction(
QIcon::fromTheme(QStringLiteral(
"window-new")),
i18nc(
"@item:inmenu",
"Open \"%1\" in New Window", text));
604 QAction *editAction = popup->addAction(
i18n(
"Edit"));
607 QAction *navigateAction = popup->addAction(
i18n(
"Navigate"));
619 popup->addSeparator();
622 QAction *showFullPathAction = popup->addAction(
i18n(
"Show Full Path"));
627 if (activatedAction == copyAction) {
631 }
else if (activatedAction == pasteAction) {
633 }
else if (activatedAction == editAction) {
635 }
else if (activatedAction == navigateAction) {
637 }
else if (activatedAction == showFullPathAction) {
643 popup->deleteLater();
647void KUrlNavigatorPrivate::slotPathBoxChanged(
const QString &text)
651 m_schemes->setScheme(scheme);
652 if (m_supportedSchemes.
count() != 1) {
660void KUrlNavigatorPrivate::updateContent()
663 if (m_placesSelector !=
nullptr) {
664 m_placesSelector->updateSelection(currentUrl);
669 m_dropDownButton->hide();
670 m_badgeWidgetContainer->
hide();
677 m_pathBox->
setUrl(currentUrl);
680 m_badgeWidgetContainer->
show();
690 if ((m_placesSelector !=
nullptr) && !m_showFullPath) {
691 placeUrl = m_placesSelector->selectedPlaceUrl();
695 placeUrl = retrievePlaceUrl();
697 QString placePath = Utils::trailingSlashRemoved(placeUrl.
path());
700 updateButtons(startIndex);
704void KUrlNavigatorPrivate::updateButtons(
int startIndex)
713 const int oldButtonCount = m_navButtons.
count();
715 int idx = startIndex;
718 const bool createButton = (idx - startIndex) >= oldButtonCount;
719 const bool isFirstButton = (idx == startIndex);
721 hasNext = isFirstButton || !dirName.
isEmpty();
723 KUrlNavigatorButton *button =
nullptr;
725 button =
new KUrlNavigatorButton(buttonUrl(idx), q);
726 button->installEventFilter(q);
728 q->
connect(button, &KUrlNavigatorButton::urlsDroppedOnNavButton, q, [
this, button](
const QUrl &destination,
QDropEvent *event) {
729 dropUrls(destination, event, button);
733 slotNavigatorButtonClicked(url, btn, modifiers);
735 q->
connect(button, &KUrlNavigatorButton::navigatorButtonActivated, q, activatedFunc);
737 q->
connect(button, &KUrlNavigatorButton::finishedTextResolving, q, [
this]() {
738 updateButtonVisibility();
741 appendWidget(button);
743 button = m_navButtons[idx - startIndex];
744 button->setUrl(buttonUrl(idx));
748 button->setText(firstButtonText());
753 if (!isFirstButton) {
756 m_navButtons.
append(button);
765 const int newButtonCount = idx - startIndex;
766 if (newButtonCount < oldButtonCount) {
767 const auto itBegin = m_navButtons.
begin() + newButtonCount;
768 const auto itEnd = m_navButtons.
end();
769 for (
auto it = itBegin; it != itEnd; ++it) {
772 navBtn->deleteLater();
774 m_navButtons.
erase(itBegin, itEnd);
780 updateButtonVisibility();
783void KUrlNavigatorPrivate::updateButtonVisibility()
789 const int buttonsCount = m_navButtons.
count();
790 if (buttonsCount == 0) {
791 m_dropDownButton->hide();
796 int availableWidth = q->
width() - m_toggleEditableMode->minimumWidth();
798 availableWidth -= m_badgeWidgetContainer->
width();
800 if ((m_placesSelector !=
nullptr) && m_placesSelector->isVisible()) {
801 availableWidth -= m_placesSelector->width();
804 if ((m_schemes !=
nullptr) && m_schemes->isVisible()) {
805 availableWidth -= m_schemes->width();
809 int requiredButtonWidth = 0;
810 for (
const auto *button : std::as_const(m_navButtons)) {
811 requiredButtonWidth += button->minimumWidth();
814 if (requiredButtonWidth > availableWidth) {
818 availableWidth -= m_dropDownButton->width();
822 bool isLastButton =
true;
823 bool hasHiddenButtons =
false;
825 for (
auto it = m_navButtons.
crbegin(); it != m_navButtons.
crend(); ++it) {
826 KUrlNavigatorButton *button = *it;
827 availableWidth -= button->minimumWidth();
828 if ((availableWidth <= 0) && !isLastButton) {
830 hasHiddenButtons =
true;
837 buttonsToShow.
append(button);
839 isLastButton =
false;
844 for (KUrlNavigatorButton *button : std::as_const(buttonsToShow)) {
848 if (hasHiddenButtons) {
849 m_dropDownButton->show();
856 m_dropDownButton->setVisible(visible);
860QString KUrlNavigatorPrivate::firstButtonText()
const
866 if ((m_placesSelector !=
nullptr) && !m_showFullPath) {
867 text = m_placesSelector->selectedPlaceText();
877 text = QStringLiteral(
"/");
899QUrl KUrlNavigatorPrivate::buttonUrl(
int index)
const
917 path = QStringLiteral(
"/");
928void KUrlNavigatorPrivate::switchToBreadcrumbMode()
933void KUrlNavigatorPrivate::deleteButtons()
935 for (KUrlNavigatorButton *button : std::as_const(m_navButtons)) {
937 button->deleteLater();
939 m_navButtons.
clear();
942QUrl KUrlNavigatorPrivate::retrievePlaceUrl()
const
958 , d(new KUrlNavigatorPrivate(url, this, placesModel))
960 const int minHeight = d->m_pathBox->sizeHint().
height();
968KUrlNavigator::~KUrlNavigator()
970 d->m_dropDownButton->removeEventFilter(
this);
971 d->m_pathBox->removeEventFilter(
this);
972 for (
auto *button : std::as_const(d->m_navButtons)) {
973 button->removeEventFilter(
this);
979 return d->m_coreUrlNavigator->locationUrl(
historyIndex);
984 auto current = d->m_coreUrlNavigator->locationState().value<KUrlNavigatorData>();
985 current.state = state;
991 return d->m_coreUrlNavigator->locationState(
historyIndex).value<KUrlNavigatorData>().state;
996 return d->m_coreUrlNavigator->goBack();
1001 return d->m_coreUrlNavigator->goForward();
1006 return d->m_coreUrlNavigator->goUp();
1011 if (d->m_homeUrl.isEmpty() || !d->m_homeUrl.isValid()) {
1023QUrl KUrlNavigator::homeUrl()
const
1025 return d->m_homeUrl;
1030 if (d->m_editable != editable) {
1037 return d->m_editable;
1042 if (d->m_showFullPath !=
show) {
1043 d->m_showFullPath =
show;
1050 return d->m_showFullPath;
1055 if (active != d->m_active) {
1056 d->m_active = active;
1058 d->m_dropDownButton->setActive(active);
1059 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1060 button->setActive(active);
1077 if (
visible == d->m_showPlacesSelector) {
1081 if (
visible && (d->m_placesSelector ==
nullptr)) {
1087 d->m_showPlacesSelector =
visible;
1088 d->m_placesSelector->setVisible(
visible);
1093 return d->m_showPlacesSelector;
1098 KUriFilterData filteredData(d->m_pathBox->currentText().trimmed());
1101 return filteredData.
uri();
1109 d->m_coreUrlNavigator->setCurrentLocationUrl(newUrl);
1124 d->m_pathBox->setFocus();
1155 const QRect bounds = d->m_toggleEditableMode->geometry();
1174 d->updateButtonVisibility();
1187 switch (
event->type()) {
1189 if (watched == d->m_pathBox) {
1193 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1194 button->setShowMnemonic(
true);
1199 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1200 button->setShowMnemonic(
false);
1224 return d->m_coreUrlNavigator->historySize();
1229 return d->m_coreUrlNavigator->historyIndex();
1234 return d->m_pathBox;
1239 d->m_supportedSchemes = schemes;
1240 d->m_schemes->setSupportedSchemes(d->m_supportedSchemes);
1245 return d->m_supportedSchemes;
1250 return d->m_dropWidget;
1260 return d->m_subfolderOptions.showHidden;
1270 return d->m_subfolderOptions.sortHiddenLast;
1277 if (widget == oldWidget) {
1280 d->m_badgeWidgetContainer->layout()->replaceWidget(oldWidget, widget);
1283 d->m_badgeWidgetContainer->layout()->addWidget(widget);
1289 QLayoutItem *item = d->m_badgeWidgetContainer->layout()->itemAt(0);
1297#include "moc_kurlnavigator.cpp"
void setEditUrl(const QUrl &url)
void returnPressed(const QString &text)
Object that helps with keeping track of URLs in file-manager like interfaces.
Q_SIGNAL void urlSelectionRequested(const QUrl &url)
When the URL is changed and the new URL (e.g. /home/user1/) is a parent of the previous URL (e....
Q_SIGNAL void currentUrlAboutToChange(const QUrl &newUrl)
Is emitted, before the location URL is going to be changed to newUrl.
int historyIndex
The history index of the current location, where 0 <= history index < KCoreUrlNavigator::historySize(...
Q_SIGNAL void historyChanged()
Is emitted, if the history has been changed.
Q_INVOKABLE QUrl locationUrl(int historyIndex=-1) const
This class is a list view model.
static QString protocolClass(const QString &protocol)
Returns the protocol class for the specified protocol.
This class is a basic messaging class used to exchange filtering information between the filter plugi...
QUrl uri() const
Returns the filtered or the original URL.
QString typedString() const
The string as typed by the user, before any URL processing is done.
void setCheckForExecutables(bool check)
Check whether the provided uri is executable or not.
static KUriFilter * self()
Returns an instance of KUriFilter.
bool filterUri(KUriFilterData &data, const QStringList &filters=QStringList())
Filters data using the specified filters.
This combobox shows a number of recent URLs/directories, as well as some default directories.
void setUrls(const QStringList &urls)
Inserts urls into the combobox below the "default urls" (see addDefaultUrl).
void setUrl(const QUrl &url)
Sets the current url.
void urlActivated(const QUrl &url)
Emitted when an item was clicked at.
This class does completion of URLs including user directories (~user) and environment variables.
Widget that allows to navigate through the paths of an URL.
void newWindowRequested(const QUrl &url)
Is emitted if the URL url should be opened in a new window because the user left-clicked on a breadcr...
void setShowFullPath(bool show)
Shows the full path of the URL even if a place represents a part of the URL.
void setBadgeWidget(QWidget *widget)
Puts widget to the right of the breadcrumb.
void setSortHiddenFoldersLast(bool sortHiddenFoldersLast)
Sets whether to sort hidden folders in the subdirectories popup last.
void setPlacesSelectorVisible(bool visible)
Sets the places selector visible, if visible is true.
void setLocationUrl(const QUrl &url)
Sets the location to url.
bool goUp()
Goes up one step of the URL path and remembers the old path in the history.
bool showHiddenFolders() const
Returns whether to show hidden folders in the subdirectories popup.
void editableStateChanged(bool editable)
Is emitted, if the editable state for the URL has been changed (see KUrlNavigator::setUrlEditable()).
QUrl uncommittedUrl() const
KUrlComboBox * editor() const
QStringList supportedSchemes() const
Returns the URL schemes that the navigator should allow navigating to.
KUrlNavigator(QWidget *parent=nullptr)
bool sortHiddenFoldersLast() const
Returns whether to sort hidden folders in the subdirectories popup last.
void tabRequested(const QUrl &url)
Is emitted if the URL url should be opened in a new inactive tab because the user clicked on a breadc...
void saveLocationState(const QByteArray &state)
Saves the location state described by state for the current location.
void goHome()
Goes to the home URL and remembers the old URL in the history.
void setHomeUrl(const QUrl &url)
Sets the home URL used by KUrlNavigator::goHome().
QWidget * badgeWidget() const
Returns the badge widget set by setBadgeWidget().
void activeTabRequested(const QUrl &url)
Is emitted if the URL url should be opened in a new active tab because the user clicked on a breadcru...
bool goBack()
Goes back one step in the URL history.
QUrl locationUrl(int historyIndex=-1) const
void requestActivation()
Activates the URL navigator (KUrlNavigator::isActive() will return true) and emits the signal KUrlNav...
void setUrlEditable(bool editable)
Allows to edit the URL of the navigation bar if editable is true, and sets the focus accordingly.
bool isPlacesSelectorVisible() const
bool showFullPath() const
bool goForward()
Goes forward one step in the URL history.
void setShowHiddenFolders(bool showHiddenFolders)
Sets whether to show hidden folders in the subdirectories popup.
void urlsDropped(const QUrl &destination, QDropEvent *event)
Is emitted if a dropping has been done above the destination destination.
void setActive(bool active)
Set the URL navigator to the active mode, if active is true.
QWidget * dropWidget() const
The child widget that received the QDropEvent when dropping on the URL navigator.
void activated()
Is emitted, if the URL navigator has been activated by an user interaction.
QByteArray locationState(int historyIndex=-1) const
bool isUrlEditable() const
void returnPressed()
This signal is emitted when the Return or Enter key is pressed.
void setSupportedSchemes(const QStringList &schemes)
Set the URL schemes that the navigator should allow navigating to.
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
KSERVICE_EXPORT KService::List query(FilterFunc filterFunc)
KIOCORE_EXPORT StatJob * stat(const QUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
KIOCORE_EXPORT QUrl upUrl(const QUrl &url)
This function is useful to implement the "Up" button in a file manager for example.
@ HideProgressInfo
Hide progress information dialog, i.e. don't show a GUI.
@ StatBasic
Filename, access, type, size, linkdest.
@ StatResolveSymlink
Resolve symlinks.
QString path(const QString &relativePath)
const QList< QKeySequence > & openContextMenu()
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles)
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
QVariant data() const const
void setData(const QVariant &data)
void triggered(bool checked)
QAction * addAction(QAction *action)
virtual int count() const const override
const QMimeData * mimeData(Mode mode) const const
void setMimeData(QMimeData *src, Mode mode)
QString text(Mode mode) const const
AdjustToContentsOnFirstShow
void editTextChanged(const QString &text)
Qt::KeyboardModifiers keyboardModifiers()
QIcon fromTheme(const QString &name)
void append(QList< T > &&value)
const_iterator cbegin() const const
const_iterator cend() const const
const T & constFirst() const const
const T & constLast() const const
qsizetype count() const const
const_reverse_iterator crbegin() const const
const_reverse_iterator crend() const const
iterator erase(const_iterator begin, const_iterator end)
void prepend(parameter_type value)
qsizetype removeAll(const AT &t)
bool hasText() const const
void setText(const QString &text)
QString text() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool eventFilter(QObject *watched, QEvent *event)
bool isSignalConnected(const QMetaMethod &signal) const const
void removeEventFilter(QObject *obj)
bool contains(const QPoint &point, bool proper) const const
qsizetype count() const const
QString & append(QChar ch)
bool isEmpty() const const
QString left(qsizetype n) const const
qsizetype length() const const
QString section(QChar sep, qsizetype start, qsizetype end, SectionFlags flags) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
typedef KeyboardModifiers
void keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
QUrl fromLocalFile(const QString &localFile)
QString host(ComponentFormattingOptions options) const const
bool isEmpty() const const
bool isLocalFile() const const
bool isValid() const const
bool matches(const QUrl &url, FormattingOptions options) const const
QString path(ComponentFormattingOptions options) const const
QString scheme() const const
void setAuthority(const QString &authority, ParsingMode mode)
void setPath(const QString &path, ParsingMode mode)
void setScheme(const QString &scheme)
QString toDisplayString(FormattingOptions options) const const
QString toString(FormattingOptions options) const const
QString url(FormattingOptions options) const const
QVariant fromValue(T &&value)
QString toString() const const