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>
47using namespace KDEPrivate;
49struct KUrlNavigatorData {
52Q_DECLARE_METATYPE(KUrlNavigatorData)
54class KUrlNavigatorPrivate
59 ~KUrlNavigatorPrivate()
61 m_dropDownButton->removeEventFilter(q);
63 m_toggleEditableMode->removeEventFilter(q);
65 for (KUrlNavigatorButton *button :
std::as_const(m_navButtons)) {
66 button->removeEventFilter(q);
71 void applyUncommittedUrl();
72 void slotApplyUrl(
QUrl url);
75 bool slotCheckFilters(
const QString &text);
77 void slotReturnPressed();
78 void slotSchemeChanged(
const QString &);
79 void openPathSelectorMenu();
86 void appendWidget(
QWidget *widget,
int stretch = 0);
92 void slotToggleEditableButtonPressed();
101 void dropUrls(
const QUrl &destination,
QDropEvent *event, KUrlNavigatorButton *dropButton);
114 void openContextMenu(
const QPoint &p);
116 void slotPathBoxChanged(
const QString &text);
118 void updateContent();
128 void updateButtons(
int startIndex);
135 void updateButtonVisibility();
140 QString firstButtonText()
const;
145 QUrl buttonUrl(
int index)
const;
147 void switchToBreadcrumbMode();
153 void deleteButtons();
162 QUrl retrievePlaceUrl()
const;
171 KUrlNavigatorPlacesSelector *m_placesSelector =
nullptr;
173 KUrlNavigatorSchemeCombo *m_schemes =
nullptr;
174 KUrlNavigatorDropDownButton *m_dropDownButton =
nullptr;
175 KUrlNavigatorButtonBase *m_toggleEditableMode =
nullptr;
176 QWidget *m_dropWidget =
nullptr;
177 QWidget *m_badgeWidgetContainer =
nullptr;
179 bool m_editable =
false;
180 bool m_active =
true;
181 bool m_showPlacesSelector =
false;
182 bool m_showFullPath =
false;
185 bool showHidden =
false;
186 bool sortHiddenLast =
false;
187 } m_subfolderOptions;
193 , m_showPlacesSelector(placesModel != nullptr)
195 m_layout->setSpacing(0);
196 m_layout->setContentsMargins(0, 0, 0, 0);
198 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::currentLocationUrlChanged, q, [
this]() {
199 Q_EMIT q->urlChanged(m_coreUrlNavigator->currentLocationUrl());
202 Q_EMIT q->urlAboutToBeChanged(url);
204 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::historySizeChanged, q, [
this]() {
205 Q_EMIT q->historyChanged();
207 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::historyIndexChanged, q, [
this]() {
208 Q_EMIT q->historyChanged();
211 Q_EMIT q->historyChanged();
214 Q_EMIT q->urlSelectionRequested(url);
218 q->setAutoFillBackground(
false);
220 if (placesModel !=
nullptr) {
221 m_placesSelector =
new KUrlNavigatorPlacesSelector(q, placesModel);
225 auto updateContentFunc = [
this]() {
234 m_schemes =
new KUrlNavigatorSchemeCombo(
QString(), q);
235 q->connect(m_schemes, &KUrlNavigatorSchemeCombo::activated, q, [
this](
const QString &schene) {
236 slotSchemeChanged(schene);
240 m_dropDownButton =
new KUrlNavigatorDropDownButton(q);
242 m_dropDownButton->installEventFilter(q);
243 q->connect(m_dropDownButton, &KUrlNavigatorDropDownButton::clicked, q, [
this]() {
244 openPathSelectorMenu();
248 m_pathBox =
new KUrlComboBox(KUrlComboBox::Directories,
true, q);
250 m_pathBox->installEventFilter(q);
253 m_pathBox->setCompletionObject(kurlCompletion);
254 m_pathBox->setAutoDeleteCompletionObject(
true);
262 slotPathBoxChanged(text);
265 m_badgeWidgetContainer =
new QWidget(q);
266 auto badgeLayout =
new QHBoxLayout(m_badgeWidgetContainer);
267 badgeLayout->setContentsMargins(0, 0, 0, 0);
271 m_toggleEditableMode =
new KUrlNavigatorToggleButton(q);
272 m_toggleEditableMode->installEventFilter(q);
273 m_toggleEditableMode->setMinimumWidth(20);
274 q->connect(m_toggleEditableMode, &KUrlNavigatorToggleButton::clicked, q, [
this]() {
275 slotToggleEditableButtonPressed();
278 if (m_placesSelector !=
nullptr) {
279 m_layout->addWidget(m_placesSelector);
281 m_layout->addWidget(m_schemes);
282 m_layout->addWidget(m_dropDownButton);
283 m_layout->addWidget(m_pathBox, 1);
284 m_layout->addWidget(m_badgeWidgetContainer);
285 m_layout->addWidget(m_toggleEditableMode);
293void KUrlNavigatorPrivate::appendWidget(
QWidget *widget,
int stretch)
299void KUrlNavigatorPrivate::slotApplyUrl(
QUrl url)
309 url.
setPath(QStringLiteral(
"/"));
316 m_pathBox->
setUrls(urls, KUrlComboBox::RemoveBottom);
324bool KUrlNavigatorPrivate::slotCheckFilters(
const QString &text)
327 filteredData.setCheckForExecutables(
false);
329 const auto filtersList =
QStringList{QStringLiteral(
"kshorturifilter")};
332 slotApplyUrl(filteredData.uri());
337void KUrlNavigatorPrivate::applyUncommittedUrl()
347 if (slotCheckFilters(text)) {
367 if (!job->error() && job->statResult().isDir()) {
368 slotApplyUrl(job->url());
373 if (slotCheckFilters(text)) {
382void KUrlNavigatorPrivate::slotReturnPressed()
384 applyUncommittedUrl();
392 auto switchModeFunc = [
this]() {
393 switchToBreadcrumbMode();
399void KUrlNavigatorPrivate::slotSchemeChanged(
const QString &scheme)
401 Q_ASSERT(m_editable);
409 url.
setPath(QStringLiteral(
"/"));
419void KUrlNavigatorPrivate::openPathSelectorMenu()
421 if (m_navButtons.
count() <= 0) {
430 auto *popupFilter =
new KUrlNavigatorPathSelectorEventFilter(popup.
data());
432 popup->installEventFilter(popupFilter);
434 const QUrl placeUrl = retrievePlaceUrl();
442 dirName = QStringLiteral(
"/");
448 const QString text = spacer + dirName;
451 const QUrl currentUrl = buttonUrl(idx);
452 if (currentUrl == firstVisibleUrl) {
453 popup->addSeparator();
456 popup->addAction(action);
461 }
while (!dirName.isEmpty());
464 const QAction *activatedAction = popup->exec(pos);
465 if (activatedAction !=
nullptr) {
472 popup->deleteLater();
476void KUrlNavigatorPrivate::slotToggleEditableButtonPressed()
479 applyUncommittedUrl();
485void KUrlNavigatorPrivate::switchView()
487 m_toggleEditableMode->setFocus();
488 m_editable = !m_editable;
489 m_toggleEditableMode->setChecked(m_editable);
499void KUrlNavigatorPrivate::dropUrls(
const QUrl &destination,
QDropEvent *event, KUrlNavigatorButton *dropButton)
501 if (
event->mimeData()->hasUrls()) {
502 m_dropWidget = qobject_cast<QWidget *>(dropButton);
520void KUrlNavigatorPrivate::openContextMenu(
const QPoint &p)
536 popup->addSeparator();
542 if (isTabSignal || isWindowSignal) {
543 auto it = std::find_if(m_navButtons.
cbegin(), m_navButtons.
cend(), [&p](
const KUrlNavigatorButton *button) {
544 return button->geometry().contains(p);
546 if (it != m_navButtons.
cend()) {
547 const auto *button = *it;
548 const QUrl url = button->
url();
549 const QString text = button->text();
552 QAction *openInTab = popup->addAction(
QIcon::fromTheme(QStringLiteral(
"tab-new")),
i18nc(
"@item:inmenu",
"Open \"%1\" in New Tab", text));
558 if (isWindowSignal) {
560 popup->addAction(
QIcon::fromTheme(QStringLiteral(
"window-new")),
i18nc(
"@item:inmenu",
"Open \"%1\" in New Window", text));
569 QAction *editAction = popup->addAction(
i18n(
"Edit"));
572 QAction *navigateAction = popup->addAction(
i18n(
"Navigate"));
584 popup->addSeparator();
587 QAction *showFullPathAction = popup->addAction(
i18n(
"Show Full Path"));
592 if (activatedAction == copyAction) {
596 }
else if (activatedAction == pasteAction) {
598 }
else if (activatedAction == editAction) {
600 }
else if (activatedAction == navigateAction) {
602 }
else if (activatedAction == showFullPathAction) {
608 popup->deleteLater();
612void KUrlNavigatorPrivate::slotPathBoxChanged(
const QString &text)
616 m_schemes->setScheme(scheme);
617 if (m_supportedSchemes.
count() != 1) {
625void KUrlNavigatorPrivate::updateContent()
628 if (m_placesSelector !=
nullptr) {
629 m_placesSelector->updateSelection(currentUrl);
634 m_dropDownButton->hide();
635 m_badgeWidgetContainer->
hide();
642 m_pathBox->
setUrl(currentUrl);
645 m_badgeWidgetContainer->
show();
655 if ((m_placesSelector !=
nullptr) && !m_showFullPath) {
656 placeUrl = m_placesSelector->selectedPlaceUrl();
660 placeUrl = retrievePlaceUrl();
662 QString placePath = Utils::trailingSlashRemoved(placeUrl.
path());
665 updateButtons(startIndex);
669void KUrlNavigatorPrivate::updateButtons(
int startIndex)
678 const int oldButtonCount = m_navButtons.
count();
680 int idx = startIndex;
683 const bool createButton = (idx - startIndex) >= oldButtonCount;
684 const bool isFirstButton = (idx == startIndex);
686 hasNext = isFirstButton || !dirName.
isEmpty();
688 KUrlNavigatorButton *button =
nullptr;
690 button =
new KUrlNavigatorButton(buttonUrl(idx), q);
691 button->installEventFilter(q);
693 q->
connect(button, &KUrlNavigatorButton::urlsDroppedOnNavButton, q, [
this, button](
const QUrl &destination,
QDropEvent *event) {
694 dropUrls(destination, event, button);
698 slotNavigatorButtonClicked(url, btn, modifiers);
700 q->
connect(button, &KUrlNavigatorButton::navigatorButtonActivated, q, activatedFunc);
702 q->
connect(button, &KUrlNavigatorButton::finishedTextResolving, q, [
this]() {
703 updateButtonVisibility();
706 appendWidget(button);
708 button = m_navButtons[idx - startIndex];
709 button->setUrl(buttonUrl(idx));
713 button->setText(firstButtonText());
718 if (!isFirstButton) {
721 m_navButtons.
append(button);
730 const int newButtonCount = idx - startIndex;
731 if (newButtonCount < oldButtonCount) {
732 const auto itBegin = m_navButtons.
begin() + newButtonCount;
733 const auto itEnd = m_navButtons.
end();
734 for (
auto it = itBegin; it != itEnd; ++it) {
737 navBtn->deleteLater();
739 m_navButtons.
erase(itBegin, itEnd);
745 updateButtonVisibility();
748void KUrlNavigatorPrivate::updateButtonVisibility()
754 const int buttonsCount = m_navButtons.
count();
755 if (buttonsCount == 0) {
756 m_dropDownButton->hide();
761 int availableWidth = q->
width() - m_toggleEditableMode->minimumWidth();
763 availableWidth -= m_badgeWidgetContainer->
width();
765 if ((m_placesSelector !=
nullptr) && m_placesSelector->isVisible()) {
766 availableWidth -= m_placesSelector->width();
769 if ((m_schemes !=
nullptr) && m_schemes->isVisible()) {
770 availableWidth -= m_schemes->width();
774 int requiredButtonWidth = 0;
775 for (
const auto *button :
std::as_const(m_navButtons)) {
776 requiredButtonWidth += button->minimumWidth();
779 if (requiredButtonWidth > availableWidth) {
783 availableWidth -= m_dropDownButton->width();
787 bool isLastButton =
true;
788 bool hasHiddenButtons =
false;
790 for (
auto it = m_navButtons.
crbegin(); it != m_navButtons.
crend(); ++it) {
791 KUrlNavigatorButton *button = *it;
792 availableWidth -= button->minimumWidth();
793 if ((availableWidth <= 0) && !isLastButton) {
795 hasHiddenButtons =
true;
802 buttonsToShow.
append(button);
804 isLastButton =
false;
809 for (KUrlNavigatorButton *button :
std::as_const(buttonsToShow)) {
813 if (hasHiddenButtons) {
814 m_dropDownButton->show();
821 m_dropDownButton->setVisible(visible);
825QString KUrlNavigatorPrivate::firstButtonText()
const
831 if ((m_placesSelector !=
nullptr) && !m_showFullPath) {
832 text = m_placesSelector->selectedPlaceText();
842 text = QStringLiteral(
"/");
850 text =
query.queryItemValue(QStringLiteral(
"title"));
864QUrl KUrlNavigatorPrivate::buttonUrl(
int index)
const
882 path = QStringLiteral(
"/");
893void KUrlNavigatorPrivate::switchToBreadcrumbMode()
898void KUrlNavigatorPrivate::deleteButtons()
900 for (KUrlNavigatorButton *button :
std::as_const(m_navButtons)) {
902 button->deleteLater();
904 m_navButtons.
clear();
907QUrl KUrlNavigatorPrivate::retrievePlaceUrl()
const
923 , d(new KUrlNavigatorPrivate(url, this, placesModel))
925 const int minHeight = d->m_pathBox->sizeHint().height();
933KUrlNavigator::~KUrlNavigator()
935 d->m_dropDownButton->removeEventFilter(
this);
936 d->m_pathBox->removeEventFilter(
this);
937 for (
auto *button :
std::as_const(d->m_navButtons)) {
938 button->removeEventFilter(
this);
944 return d->m_coreUrlNavigator->locationUrl(
historyIndex);
949 auto current = d->m_coreUrlNavigator->locationState().value<KUrlNavigatorData>();
950 current.state = state;
956 return d->m_coreUrlNavigator->locationState(
historyIndex).value<KUrlNavigatorData>().state;
961 return d->m_coreUrlNavigator->goBack();
966 return d->m_coreUrlNavigator->goForward();
971 return d->m_coreUrlNavigator->goUp();
976 if (d->m_homeUrl.isEmpty() || !d->m_homeUrl.isValid()) {
988QUrl KUrlNavigator::homeUrl()
const
995 if (d->m_editable != editable) {
1002 return d->m_editable;
1007 if (d->m_showFullPath !=
show) {
1008 d->m_showFullPath =
show;
1015 return d->m_showFullPath;
1020 if (active != d->m_active) {
1021 d->m_active = active;
1023 d->m_dropDownButton->setActive(active);
1024 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1025 button->setActive(active);
1042 if (
visible == d->m_showPlacesSelector) {
1046 if (
visible && (d->m_placesSelector ==
nullptr)) {
1052 d->m_showPlacesSelector =
visible;
1053 d->m_placesSelector->setVisible(
visible);
1058 return d->m_showPlacesSelector;
1063 KUriFilterData filteredData(d->m_pathBox->currentText().trimmed());
1066 return filteredData.
uri();
1074 d->m_coreUrlNavigator->setCurrentLocationUrl(newUrl);
1089 d->m_pathBox->setFocus();
1120 const QRect bounds = d->m_toggleEditableMode->geometry();
1139 d->updateButtonVisibility();
1152 switch (
event->type()) {
1154 if (watched == d->m_pathBox) {
1158 for (KUrlNavigatorButton *button :
std::as_const(d->m_navButtons)) {
1159 button->setShowMnemonic(
true);
1164 for (KUrlNavigatorButton *button :
std::as_const(d->m_navButtons)) {
1165 button->setShowMnemonic(
false);
1178 return d->m_coreUrlNavigator->historySize();
1183 return d->m_coreUrlNavigator->historyIndex();
1188 return d->m_pathBox;
1193 d->m_supportedSchemes = schemes;
1194 d->m_schemes->setSupportedSchemes(d->m_supportedSchemes);
1199 return d->m_supportedSchemes;
1204 return d->m_dropWidget;
1214 return d->m_subfolderOptions.showHidden;
1224 return d->m_subfolderOptions.sortHiddenLast;
1231 if (widget == oldWidget) {
1234 d->m_badgeWidgetContainer->layout()->replaceWidget(oldWidget, widget);
1237 d->m_badgeWidgetContainer->layout()->addWidget(widget);
1243 QLayoutItem *item = d->m_badgeWidgetContainer->layout()->itemAt(0);
1251#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
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