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 {
79 void applyUncommittedUrl(ApplyUrlMethod method);
80 void slotApplyUrl(
QUrl url);
84 std::optional<QUrl> checkFilters(
const QString &text);
86 void slotReturnPressed();
87 void slotSchemeChanged(
const QString &);
88 void openPathSelectorMenu();
95 void appendWidget(
QWidget *widget,
int stretch = 0);
101 void slotToggleEditableButtonPressed();
110 void dropUrls(
const QUrl &destination,
QDropEvent *event, KUrlNavigatorButton *dropButton);
123 void openContextMenu(
const QPoint &p);
125 void slotPathBoxChanged(
const QString &text);
127 void updateContent();
137 void updateButtons(
int startIndex);
144 void updateButtonVisibility();
152 void updateTabOrder();
157 QString firstButtonText()
const;
162 QUrl buttonUrl(
int index)
const;
164 void switchToBreadcrumbMode();
170 void deleteButtons();
179 QUrl retrievePlaceUrl()
const;
188 KUrlNavigatorPlacesSelector *m_placesSelector =
nullptr;
190 KUrlNavigatorSchemeCombo *m_schemes =
nullptr;
191 KUrlNavigatorDropDownButton *m_dropDownButton =
nullptr;
192 KUrlNavigatorButtonBase *m_toggleEditableMode =
nullptr;
193 QWidget *m_dropWidget =
nullptr;
194 QWidget *m_badgeWidgetContainer =
nullptr;
196 bool m_editable =
false;
197 bool m_active =
true;
198 bool m_showPlacesSelector =
false;
199 bool m_showFullPath =
false;
202 bool showHidden =
false;
203 bool sortHiddenLast =
false;
204 } m_subfolderOptions;
210 , m_showPlacesSelector(placesModel != nullptr)
212 m_layout->setSpacing(0);
213 m_layout->setContentsMargins(0, 0, 0, 0);
215 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::currentLocationUrlChanged, q, [
this]() {
216 Q_EMIT q->urlChanged(m_coreUrlNavigator->currentLocationUrl());
219 Q_EMIT q->urlAboutToBeChanged(url);
221 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::historySizeChanged, q, [
this]() {
222 Q_EMIT q->historyChanged();
224 q->connect(m_coreUrlNavigator, &KCoreUrlNavigator::historyIndexChanged, q, [
this]() {
225 Q_EMIT q->historyChanged();
228 Q_EMIT q->historyChanged();
231 Q_EMIT q->urlSelectionRequested(url);
235 q->setAutoFillBackground(
false);
237 if (placesModel !=
nullptr) {
238 m_placesSelector =
new KUrlNavigatorPlacesSelector(q, placesModel);
242 auto updateContentFunc = [
this]() {
251 m_schemes =
new KUrlNavigatorSchemeCombo(
QString(), q);
252 q->connect(m_schemes, &KUrlNavigatorSchemeCombo::activated, q, [
this](
const QString &schene) {
253 slotSchemeChanged(schene);
257 m_dropDownButton =
new KUrlNavigatorDropDownButton(q);
259 m_dropDownButton->installEventFilter(q);
260 q->connect(m_dropDownButton, &KUrlNavigatorDropDownButton::clicked, q, [
this]() {
261 openPathSelectorMenu();
265 m_pathBox =
new KUrlComboBox(KUrlComboBox::Directories,
true, q);
267 m_pathBox->installEventFilter(q);
270 m_pathBox->setCompletionObject(kurlCompletion);
271 m_pathBox->setAutoDeleteCompletionObject(
true);
279 slotPathBoxChanged(text);
282 m_badgeWidgetContainer =
new QWidget(q);
283 auto badgeLayout =
new QHBoxLayout(m_badgeWidgetContainer);
284 badgeLayout->setContentsMargins(0, 0, 0, 0);
288 m_toggleEditableMode =
new KUrlNavigatorToggleButton(q);
289 m_toggleEditableMode->installEventFilter(q);
290 m_toggleEditableMode->setMinimumWidth(20);
291 q->connect(m_toggleEditableMode, &KUrlNavigatorToggleButton::clicked, q, [
this]() {
292 slotToggleEditableButtonPressed();
295 if (m_placesSelector !=
nullptr) {
296 m_layout->addWidget(m_placesSelector);
298 m_layout->addWidget(m_schemes);
299 m_layout->addWidget(m_dropDownButton);
300 m_layout->addWidget(m_pathBox, 1);
301 m_layout->addWidget(m_badgeWidgetContainer);
302 m_layout->addWidget(m_toggleEditableMode);
310void KUrlNavigatorPrivate::appendWidget(
QWidget *widget,
int stretch)
316void KUrlNavigatorPrivate::slotApplyUrl(
QUrl url)
326 url.
setPath(QStringLiteral(
"/"));
333 m_pathBox->
setUrls(urls, KUrlComboBox::RemoveBottom);
341std::optional<QUrl> KUrlNavigatorPrivate::checkFilters(
const QString &text)
344 filteredData.setCheckForExecutables(
false);
346 const auto filtersList =
QStringList{QStringLiteral(
"kshorturifilter")};
349 return filteredData.uri();
354void KUrlNavigatorPrivate::applyUncommittedUrl(ApplyUrlMethod method)
359 auto applyUrl = [
this, method](
const QUrl &url) {
361 case ApplyUrlMethod::Apply:
364 case ApplyUrlMethod::Tab:
367 case ApplyUrlMethod::ActiveTab:
370 case ApplyUrlMethod::NewWindow:
381 if (
const auto filteredUrl = checkFilters(text); filteredUrl) {
382 applyUrl(*filteredUrl);
402 if (!job->error() && job->statResult().isDir()) {
403 applyUrl(job->url());
408 if (
const auto filteredUrl = checkFilters(text); filteredUrl) {
409 applyUrl(*filteredUrl);
418void KUrlNavigatorPrivate::slotReturnPressed()
424 applyUncommittedUrl(ApplyUrlMethod::Tab);
426 applyUncommittedUrl(ApplyUrlMethod::ActiveTab);
429 applyUncommittedUrl(ApplyUrlMethod::NewWindow);
431 applyUncommittedUrl(ApplyUrlMethod::Apply);
440 auto switchModeFunc = [
this]() {
441 switchToBreadcrumbMode();
447void KUrlNavigatorPrivate::slotSchemeChanged(
const QString &scheme)
449 Q_ASSERT(m_editable);
457 url.
setPath(QStringLiteral(
"/"));
467void KUrlNavigatorPrivate::openPathSelectorMenu()
469 if (m_navButtons.
count() <= 0) {
478 auto *popupFilter =
new KUrlNavigatorPathSelectorEventFilter(popup.
data());
480 popup->installEventFilter(popupFilter);
482 const QUrl placeUrl = retrievePlaceUrl();
490 dirName = QStringLiteral(
"/");
496 const QString text = spacer + dirName;
499 const QUrl currentUrl = buttonUrl(idx);
500 if (currentUrl == firstVisibleUrl) {
501 popup->addSeparator();
504 popup->addAction(action);
509 }
while (!dirName.isEmpty());
512 const QAction *activatedAction = popup->exec(pos);
513 if (activatedAction !=
nullptr) {
520 popup->deleteLater();
524void KUrlNavigatorPrivate::slotToggleEditableButtonPressed()
527 applyUncommittedUrl(ApplyUrlMethod::Apply);
533void KUrlNavigatorPrivate::switchView()
535 m_toggleEditableMode->setFocus();
536 m_editable = !m_editable;
537 m_toggleEditableMode->setChecked(m_editable);
547void KUrlNavigatorPrivate::dropUrls(
const QUrl &destination,
QDropEvent *event, KUrlNavigatorButton *dropButton)
549 if (
event->mimeData()->hasUrls()) {
550 m_dropWidget = qobject_cast<QWidget *>(dropButton);
568void KUrlNavigatorPrivate::openContextMenu(
const QPoint &p)
584 popup->addSeparator();
590 if (isTabSignal || isWindowSignal) {
591 auto it = std::find_if(m_navButtons.
cbegin(), m_navButtons.
cend(), [&p](
const KUrlNavigatorButton *button) {
592 return button->geometry().contains(p);
594 if (it != m_navButtons.
cend()) {
595 const auto *button = *it;
596 const QUrl url = button->
url();
597 const QString text = button->text();
600 QAction *openInTab = popup->addAction(
QIcon::fromTheme(QStringLiteral(
"tab-new")),
i18nc(
"@item:inmenu",
"Open \"%1\" in New Tab", text));
606 if (isWindowSignal) {
608 popup->addAction(
QIcon::fromTheme(QStringLiteral(
"window-new")),
i18nc(
"@item:inmenu",
"Open \"%1\" in New Window", text));
617 QAction *editAction = popup->addAction(
i18n(
"Edit"));
620 QAction *navigateAction = popup->addAction(
i18n(
"Navigate"));
632 popup->addSeparator();
635 QAction *showFullPathAction = popup->addAction(
i18n(
"Show Full Path"));
640 if (activatedAction == copyAction) {
644 }
else if (activatedAction == pasteAction) {
646 }
else if (activatedAction == editAction) {
648 }
else if (activatedAction == navigateAction) {
650 }
else if (activatedAction == showFullPathAction) {
656 popup->deleteLater();
660void KUrlNavigatorPrivate::slotPathBoxChanged(
const QString &text)
664 m_schemes->setScheme(scheme);
665 if (m_supportedSchemes.
count() != 1) {
675void KUrlNavigatorPrivate::updateContent()
678 if (m_placesSelector !=
nullptr) {
679 m_placesSelector->updateSelection(currentUrl);
684 m_dropDownButton->hide();
685 m_badgeWidgetContainer->
hide();
692 m_pathBox->
setUrl(currentUrl);
698 m_badgeWidgetContainer->
show();
708 if ((m_placesSelector !=
nullptr) && !m_showFullPath) {
709 placeUrl = m_placesSelector->selectedPlaceUrl();
713 placeUrl = retrievePlaceUrl();
715 QString placePath = Utils::trailingSlashRemoved(placeUrl.
path());
718 updateButtons(startIndex);
722void KUrlNavigatorPrivate::updateButtons(
int startIndex)
731 const int oldButtonCount = m_navButtons.
count();
733 int idx = startIndex;
736 const bool createButton = (idx - startIndex) >= oldButtonCount;
737 const bool isFirstButton = (idx == startIndex);
739 hasNext = isFirstButton || !dirName.
isEmpty();
741 KUrlNavigatorButton *button =
nullptr;
743 button =
new KUrlNavigatorButton(buttonUrl(idx), q);
744 button->installEventFilter(q);
746 q->
connect(button, &KUrlNavigatorButton::urlsDroppedOnNavButton, q, [
this, button](
const QUrl &destination,
QDropEvent *event) {
747 dropUrls(destination, event, button);
751 slotNavigatorButtonClicked(url, btn, modifiers);
753 q->
connect(button, &KUrlNavigatorButton::navigatorButtonActivated, q, activatedFunc);
755 q->
connect(button, &KUrlNavigatorButton::finishedTextResolving, q, [
this]() {
756 updateButtonVisibility();
759 appendWidget(button);
761 button = m_navButtons[idx - startIndex];
762 button->setUrl(buttonUrl(idx));
766 button->setText(firstButtonText());
771 if (!isFirstButton) {
774 m_navButtons.
append(button);
783 const int newButtonCount = idx - startIndex;
784 if (newButtonCount < oldButtonCount) {
785 const auto itBegin = m_navButtons.
begin() + newButtonCount;
786 const auto itEnd = m_navButtons.
end();
787 for (
auto it = itBegin; it != itEnd; ++it) {
790 navBtn->deleteLater();
792 m_navButtons.
erase(itBegin, itEnd);
795 m_dropDownButton->setToolTip(
xi18nc(
"@info:tooltip for button. 1 is path",
796 "Go to any location on the path <filename>%1</filename>",
798 .
replace(QStringLiteral(
"///"), QStringLiteral(
"/")));
799 updateButtonVisibility();
802void KUrlNavigatorPrivate::updateButtonVisibility()
808 const int buttonsCount = m_navButtons.
count();
809 if (buttonsCount == 0) {
810 m_dropDownButton->hide();
815 int availableWidth = q->
width() - m_toggleEditableMode->minimumWidth();
817 availableWidth -= m_badgeWidgetContainer->
width();
819 if ((m_placesSelector !=
nullptr) && m_placesSelector->isVisible()) {
820 availableWidth -= m_placesSelector->width();
823 if ((m_schemes !=
nullptr) && m_schemes->isVisible()) {
824 availableWidth -= m_schemes->width();
828 int requiredButtonWidth = 0;
829 for (
const auto *button : std::as_const(m_navButtons)) {
830 requiredButtonWidth += button->minimumWidth();
833 if (requiredButtonWidth > availableWidth) {
837 availableWidth -= m_dropDownButton->width();
841 bool isLastButton =
true;
842 bool hasHiddenButtons =
false;
844 for (
auto it = m_navButtons.
crbegin(); it != m_navButtons.
crend(); ++it) {
845 KUrlNavigatorButton *button = *it;
846 availableWidth -= button->minimumWidth();
847 if ((availableWidth <= 0) && !isLastButton) {
849 hasHiddenButtons =
true;
856 buttonsToShow.
append(button);
858 isLastButton =
false;
863 for (KUrlNavigatorButton *button : std::as_const(buttonsToShow)) {
867 if (hasHiddenButtons) {
868 m_dropDownButton->show();
875 m_dropDownButton->setVisible(visible);
881void KUrlNavigatorPrivate::updateTabOrder()
885 for (
auto childWidget : childWidgets) {
886 if (childWidget->isVisible()) {
888 visibleChildrenSortedByX.
insert(childWidget->x(), childWidget);
890 visibleChildrenSortedByX.
insert(-childWidget->x(), childWidget);
894 if (visibleChildrenSortedByX.
isEmpty()) {
898 auto it = visibleChildrenSortedByX.
begin();
899 auto nextIt = ++visibleChildrenSortedByX.
begin();
900 while (nextIt != visibleChildrenSortedByX.
end()) {
907QString KUrlNavigatorPrivate::firstButtonText()
const
913 if ((m_placesSelector !=
nullptr) && !m_showFullPath) {
914 text = m_placesSelector->selectedPlaceText();
924 text = QStringLiteral(
"/");
946QUrl KUrlNavigatorPrivate::buttonUrl(
int index)
const
964 path = QStringLiteral(
"/");
975void KUrlNavigatorPrivate::switchToBreadcrumbMode()
980void KUrlNavigatorPrivate::deleteButtons()
982 for (KUrlNavigatorButton *button : std::as_const(m_navButtons)) {
984 button->deleteLater();
986 m_navButtons.
clear();
989QUrl KUrlNavigatorPrivate::retrievePlaceUrl()
const
1005 , d(new KUrlNavigatorPrivate(url, this, placesModel))
1007 const int minHeight = d->m_pathBox->sizeHint().
height();
1015KUrlNavigator::~KUrlNavigator()
1017 d->m_dropDownButton->removeEventFilter(
this);
1018 d->m_pathBox->removeEventFilter(
this);
1019 for (
auto *button : std::as_const(d->m_navButtons)) {
1020 button->removeEventFilter(
this);
1026 return d->m_coreUrlNavigator->locationUrl(
historyIndex);
1031 auto current = d->m_coreUrlNavigator->locationState().value<KUrlNavigatorData>();
1032 current.state = state;
1038 return d->m_coreUrlNavigator->locationState(
historyIndex).value<KUrlNavigatorData>().state;
1043 return d->m_coreUrlNavigator->goBack();
1048 return d->m_coreUrlNavigator->goForward();
1053 return d->m_coreUrlNavigator->goUp();
1058 if (d->m_homeUrl.isEmpty() || !d->m_homeUrl.isValid()) {
1070QUrl KUrlNavigator::homeUrl()
const
1072 return d->m_homeUrl;
1077 if (d->m_editable != editable) {
1084 return d->m_editable;
1089 if (d->m_showFullPath !=
show) {
1090 d->m_showFullPath =
show;
1097 return d->m_showFullPath;
1102 if (active != d->m_active) {
1103 d->m_active = active;
1105 d->m_dropDownButton->setActive(active);
1106 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1107 button->setActive(active);
1124 if (
visible == d->m_showPlacesSelector) {
1128 if (
visible && (d->m_placesSelector ==
nullptr)) {
1134 d->m_showPlacesSelector =
visible;
1135 d->m_placesSelector->setVisible(
visible);
1136 d->updateTabOrder();
1141 return d->m_showPlacesSelector;
1146 KUriFilterData filteredData(d->m_pathBox->currentText().trimmed());
1149 return filteredData.
uri();
1157 d->m_coreUrlNavigator->setCurrentLocationUrl(newUrl);
1172 d->m_pathBox->setFocus();
1203 const QRect bounds = d->m_toggleEditableMode->geometry();
1222 d->updateButtonVisibility();
1235 switch (
event->type()) {
1237 if (watched == d->m_pathBox) {
1241 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1242 button->setShowMnemonic(
true);
1247 for (KUrlNavigatorButton *button : std::as_const(d->m_navButtons)) {
1248 button->setShowMnemonic(
false);
1272 return d->m_coreUrlNavigator->historySize();
1277 return d->m_coreUrlNavigator->historyIndex();
1282 return d->m_pathBox;
1287 d->m_supportedSchemes = schemes;
1288 d->m_schemes->setSupportedSchemes(d->m_supportedSchemes);
1293 return d->m_supportedSchemes;
1298 return d->m_dropWidget;
1308 return d->m_subfolderOptions.showHidden;
1318 return d->m_subfolderOptions.sortHiddenLast;
1325 if (widget == oldWidget) {
1328 d->m_badgeWidgetContainer->layout()->replaceWidget(oldWidget, widget);
1331 d->m_badgeWidgetContainer->layout()->addWidget(widget);
1337 QLayoutItem *item = d->m_badgeWidgetContainer->layout()->itemAt(0);
1345#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 xi18nc(const char *context, const char *text, const TYPE &arg...)
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
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool eventFilter(QObject *watched, QEvent *event)
QList< T > findChildren(Qt::FindChildOptions options) const const
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 & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
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