KIO
kdiroperator.cpp
10#include <defaults-kfile.h> // ConfigGroup, DefaultShowHidden, DefaultDirsFirst, DefaultSortReversed
153 void slotAskUserDeleteResult(bool allowDelete, const QList<QUrl> &urls, KIO::AskUserActionInterface::DeletionType deletionType, QWidget *parent);
198 bool m_onlyDoubleClickSelectsFiles = !qApp->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick);
449 const QItemSelection selection = d->m_proxyModel->mapSelectionToSource(d->m_itemView->selectionModel()->selection());
505 return static_cast<KFile::FileView>(KFile::Simple | KFile::Detail | KFile::Tree | KFile::DetailTree);
513 KFile::FileView view = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Detail);
522 KFile::FileView view = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Simple);
540 KFile::FileView view = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::DetailTree);
658 KFile::FileView fileView = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Simple);
672 KFile::FileView fileView = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Simple);
710KIO::DeleteJob *KDirOperator::del(const KFileItemList &items, QWidget *parent, bool ask, bool showProgress)
713 KMessageBox::information(parent, i18n("You did not select a file to delete."), i18n("Nothing to Delete"));
727 doIt = uiDelegate.askDeleteConfirmation(urls, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation);
745 KMessageBox::information(this, i18n("You did not select a file to delete."), i18n("Nothing to Delete"));
750 auto *deleteJob = new KIO::DeleteOrTrashJob(urls, Iface::Delete, Iface::DefaultConfirmation, this);
754KIO::CopyJob *KDirOperator::trash(const KFileItemList &items, QWidget *parent, bool ask, bool showProgress)
757 KMessageBox::information(parent, i18n("You did not select a file to trash."), i18n("Nothing to Trash"));
767 doIt = uiDelegate.askDeleteConfirmation(urls, KIO::JobUiDelegate::Trash, KIO::JobUiDelegate::DefaultConfirmation);
788 d->m_inlinePreviewState = show ? KDirOperatorPrivate::ForcedToTrue : KDirOperatorPrivate::ForcedToFalse;
823 connect(dialog, &KIO::RenameFileDialog::renamingFinished, this, [this](const QList<QUrl> &urls) {
844 KMessageBox::information(this, i18n("You did not select a file to trash."), i18n("Nothing to Trash"));
849 auto *trashJob = new KIO::DeleteOrTrashJob(urls, Iface::Trash, Iface::DefaultConfirmation, this);
888 QUrl newurl = _newurl.isValid() ? _newurl.adjusted(QUrl::NormalizePathSegments) : QUrl::fromLocalFile(QDir::homePath());
969 const bool result = KProtocolManager::supportsListing(url) && isSchemeSupported(url.scheme()) && m_dirLister->openUrl(url, flags);
1082 const QUrl _url = newUrl.adjusted(QUrl::StripTrailingSlash).adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash);
1177 KToggleAction *previewAction = static_cast<KToggleAction *>(action(KDirOperator::ShowPreviewPanel));
1255 const QModelIndex hoveredIndex = d->m_itemView->indexAt(d->m_itemView->viewport()->mapFromGlobal(QCursor::pos()));
1263 const QModelIndex currentIndex = d->m_itemView->selectionModel() ? d->m_itemView->selectionModel()->currentIndex() : QModelIndex();
1265 if (!hoveredIndex.isValid() && currentIndex.isValid() && (d->m_lastHoveredIndex != currentIndex)) {
1266 const KFileItem item = d->m_itemView->model()->data(currentIndex, KDirModel::FileItemRole).value<KFileItem>();
1278 // Navigate and then discard the event so it doesn't select an item on the directory navigated to.
1294 const QModelIndex hoveredIndex = d->m_itemView->indexAt(d->m_itemView->viewport()->mapFromGlobal(QCursor::pos()));
1295 const QModelIndex focusedIndex = d->m_itemView->selectionModel() ? d->m_itemView->selectionModel()->currentIndex() : QModelIndex();
1297 if (((!focusedIndex.isValid()) || !d->m_itemView->selectionModel()->isSelected(focusedIndex)) && (!hoveredIndex.isValid())) {
1306 const QModelIndex currentIndex = d->m_itemView->selectionModel() ? d->m_itemView->selectionModel()->currentIndex() : QModelIndex();
1309 const KFileItem item = d->m_itemView->model()->data(currentIndex, KDirModel::FileItemRole).value<KFileItem>();
1332 const QList<QUrl> urls = KUrlMimeData::urlsFromMimeData(evt->mimeData(), KUrlMimeData::PreferLocalUrls);
1367 const QList<QUrl> urls = KUrlMimeData::urlsFromMimeData(evt->mimeData(), KUrlMimeData::PreferLocalUrls);
1418 && d->m_progressBar->parent() == this /* it could have been reparented to a statusbar */) { /* clang-format on */
1447 const QStringList nameFilters = m_dirLister->nameFilter().split(QLatin1Char(' '), Qt::SkipEmptyParts);
1473 const QMimeType mt = db.mimeTypeForFile(filter, QMimeDatabase::MatchExtension /*fast mode, no file contents exist*/);
1545 preview = (KFile::isPreviewInfo(defaultViewKind) || KFile::isPreviewContents(defaultViewKind)) && action(KDirOperator::ShowPreviewPanel)->isEnabled();
1648 connect(headerView, &QHeaderView::sortIndicatorChanged, this, [this](int logicalIndex, Qt::SortOrder order) {
1657 connect(d->m_itemView, &QAbstractItemView::customContextMenuRequested, this, [this](QPoint pos) {
1683 connect(d->m_itemView->selectionModel(), &QItemSelectionModel::currentChanged, this, [this](QModelIndex index) {
1686 connect(d->m_itemView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [this]() {
1704 const bool previewShown = d->m_inlinePreviewState == KDirOperatorPrivate::NotForced ? d->m_showPreviews : previewForcedToTrue;
1706 d->m_itemView->setIconSize(previewForcedToTrue ? QSize(KIconLoader::SizeHuge, KIconLoader::SizeHuge) : QSize(d->m_iconSize, d->m_iconSize));
1774 connect(d->m_dirLister, &KCoreDirLister::redirection, this, [this](const QUrl &, const QUrl &newUrl) {
1953 QAction *upAction = KStandardActions::create(KStandardActions::Up, this, &KDirOperator::cdUp, this);
1957 QAction *backAction = KStandardActions::create(KStandardActions::Back, this, &KDirOperator::back, this);
1964 QAction *forwardAction = KStandardActions::create(KStandardActions::Forward, this, &KDirOperator::forward, this);
1968 QAction *homeAction = KStandardActions::create(KStandardActions::Home, this, &KDirOperator::home, this);
1972 QAction *reloadAction = KStandardActions::create(KStandardActions::Redisplay, this, &KDirOperator::rereadDir, this);
2149 KToggleAction *allowExpansionAction = new KToggleAction(i18n("Allow Expansion in Details View"), this);
2169 KToggleAction *inlinePreview = new KToggleAction(QIcon::fromTheme(QStringLiteral("view-preview")), i18n("Show Preview"), this);
2262 const bool del = !d->m_currUrl.isLocalFile() || (QApplication::keyboardModifiers() & Qt::ShiftModifier) || cg.readEntry("ShowDeleteCommand", false);
2329 action(KDirOperator::ViewIconsView)->setChecked(KFile::isSimpleView(fv) && d->m_decorationPosition == QStyleOptionViewItem::Top);
2330 action(KDirOperator::ViewCompactView)->setChecked(KFile::isSimpleView(fv) && d->m_decorationPosition == QStyleOptionViewItem::Left);
2331 action(KDirOperator::ViewDetailsView)->setChecked(KFile::isDetailTreeView(fv) || KFile::isDetailView(fv));
2366 const bool hiddenFilesLast = configGroup.readEntry(QStringLiteral("Sort hidden files last"), DefaultHiddenFilesLast);
2393 (QStyleOptionViewItem::Position)configGroup.readEntry(QStringLiteral("Decoration position"), (int)QStyleOptionViewItem::Top);
2410 configGroup.writeEntry(QStringLiteral("Sort reversed"), action(KDirOperator::SortDescending)->isChecked());
2412 configGroup.writeEntry(QStringLiteral("Sort directories first"), action(KDirOperator::SortFoldersFirst)->isChecked());
2425 KToggleAction *previewAction = static_cast<KToggleAction *>(action(KDirOperator::ShowPreviewPanel));
2439 configGroup.writeEntry(QStringLiteral("Show hidden files"), action(KDirOperator::ShowHiddenFiles)->isChecked());
2441 configGroup.writeEntry(QStringLiteral("Allow Expansion"), action(KDirOperator::AllowExpansionInDetailsView)->isChecked());
2469 if ((m_iconSize == zoomSettings.defaultValue) && !m_configGroup->hasDefault(zoomSettings.name)) {
2649 if (m_followSelectedDirectories || (m_viewKind != KFile::Tree && m_viewKind != KFile::DetailTree)) {
2666 const bool multiSelectionMode = (m_itemView->selectionMode() == QAbstractItemView::ExtendedSelection);
2692 if ((m_preview != nullptr && !m_preview->isHidden()) && index.isValid() && (index.column() == KDirModel::Name)) {
2825 if (item.url().adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash) == url.adjusted(QUrl::StripTrailingSlash)) {
void setPopupMode(QToolButton::ToolButtonPopupMode popupMode)
void addAction(QAction *action)
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder) override
virtual void clear()
void match(const QString &item)
void revertToDefault(const char *key, WriteConfigFlags pFlag=WriteConfigFlags())
bool hasDefault(const char *key) const
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString readEntry(const char *key, const char *aDefault=nullptr) const
void percent(int percent)
Progress signal showing the overall progress of the KCoreDirLister.
void setShowHiddenFiles(bool showHiddenFiles)
Toggles whether hidden files (e.g.
Definition kcoredirlister.cpp:2171
void clear()
Signals to the view to remove all items (when e.g. going from dirA to dirB).
bool openUrl(const QUrl &dirUrl, OpenUrlFlags flags=NoFlags)
Run the directory lister on the given url.
Definition kcoredirlister.cpp:2124
void jobError(KIO::Job *job)
Emitted if listing a directory fails with an error.
void started(const QUrl &dirUrl)
Tell the view that this KCoreDirLister has started to list dirUrl.
KFileItem findByUrl(const QUrl &url) const
Find an item by its URL.
Definition kcoredirlister.cpp:2310
QStringList mimeFilters() const
Returns the list of MIME type based filters, as set via setMimeFilter().
Definition kcoredirlister.cpp:2375
void redirection(const QUrl &oldUrl, const QUrl &newUrl)
Signals a redirection.
void itemsDeleted(const KFileItemList &items)
Signal that items have been deleted.
@ Reload
Indicates whether to use the cache or to reread the directory from the disk.
Definition kcoredirlister.h:80
Subclass of KCoreDirLister which uses QWidgets to show error messages and to associate jobs with wind...
Definition kdirlister.h:25
void expand(const QModelIndex &index)
Emitted for each subdirectory that is a parent of a url passed to expandToUrl This allows to asynchro...
Q_INVOKABLE QModelIndex indexForItem(const KFileItem &) const
Return the index for a given kfileitem.
Definition kdirmodel.cpp:1201
@ FileItemRole
returns the KFileItem for a given index. roleName is "fileItem".
Definition kdirmodel.h:160
KFileItem itemForIndex(const QModelIndex &index) const
Return the fileitem for a given index.
Definition kdirmodel.cpp:1189
void setNewFileMenuSupportedMimeTypes(const QStringList &mime)
Only show the files in a given set of MIME types.
Definition kdiroperator.cpp:1160
void setIconSize(int value)
Notifies that the icons size should change.
Definition kdiroperator.cpp:853
void keyEnterReturnPressed()
Triggered when the user hit Enter/Return.
virtual void setDropOptions(int options)
Sets the options for dropping files.
Definition kdiroperator.cpp:1521
virtual void setAcceptDrops(bool b)
Reimplemented - allow dropping of files if b is true, defaults to true since 5.59.
Definition kdiroperator.cpp:1508
void setInlinePreviewShown(bool show)
Forces the inline previews to be shown or hidden, depending on show.
Definition kdiroperator.cpp:786
void setSupportedSchemes(const QStringList &schemes)
Set the URL schemes that the file widget should allow navigating to.
Definition kdiroperator.cpp:2932
virtual void selectDir(const KFileItem &item)
Enters the directory specified by the given item.
Definition kdiroperator.cpp:1788
void renamingFinished(const QList< QUrl > &urls)
Emitted when renaming selected files has finished.
KDirOperator(const QUrl &urlName=QUrl{}, QWidget *parent=nullptr)
Constructs the KDirOperator with no initial view.
Definition kdiroperator.cpp:265
QStringList supportedSchemes() const
Returns the URL schemes that the file widget should allow navigating to.
Definition kdiroperator.cpp:2938
KCompletion * dirCompletionObject() const
Definition kdiroperator.cpp:488
virtual void setShowHiddenFiles(bool s)
Enables/disables showing hidden files.
Definition kdiroperator.cpp:2889
void setMimeFilter(const QStringList &mimetypes)
Sets a list of MIME types as filter.
Definition kdiroperator.cpp:1149
void showOpenWithActions(bool enable)
Call with true to add open-with actions to items in the view.
Definition kdiroperator.cpp:1238
virtual void setMode(KFile::Modes m)
Sets the listing/selection mode for the views, an OR'ed combination of.
Definition kdiroperator.cpp:1577
void setFollowNewDirectories(bool enable)
Toggles whether setUrl is called on newly created directories.
Definition kdiroperator.cpp:2519
void updateSortActions()
Updates the sorting-related actions to comply with the current sorting.
Definition kdiroperator.cpp:2288
QString makeCompletion(const QString &)
Tries to complete the given string (only completes files).
Definition kdiroperator.cpp:1898
void updateSelectionDependentActions()
Enables/disables actions that are selection dependent.
Definition kdiroperator.cpp:411
KFilePreviewGenerator * previewGenerator() const
Returns the preview generator for the current view.
Definition kdiroperator.cpp:781
bool isInlinePreviewShown() const
Returns whether the inline previews are shown or not.
Definition kdiroperator.cpp:791
void toggleIgnoreCase()
Toggles case sensitive / case insensitive sorting.
Definition kdiroperator.cpp:402
void prepareCompletionObjects()
Synchronizes the completion objects with the entries of the currently listed url.
Definition kdiroperator.cpp:1920
virtual void readConfig(const KConfigGroup &configGroup)
Reads the default settings for a view, i.e. the default KFile::FileView.
Definition kdiroperator.cpp:2334
void updateViewActions()
Updates the view-related actions to comply with the current KFile::FileView.
Definition kdiroperator.cpp:2315
virtual void forward()
Goes one step forward in the history and opens that url.
Definition kdiroperator.cpp:1096
void setCurrentItem(const QUrl &url)
Clears the current selection and attempts to set url the current url file.
Definition kdiroperator.cpp:1809
void setSorting(QDir::SortFlags)
Sets the way to sort files and directories.
Definition kdiroperator.cpp:334
void setNameFilter(const QString &filter)
Sets a filter like "*.cpp *.h *.o".
Definition kdiroperator.cpp:1138
virtual void back()
Goes one step back in the history and opens that url.
Definition kdiroperator.cpp:1069
virtual QAbstractItemView * createView(QWidget *parent, KFile::FileView viewKind)
A view factory for creating predefined fileviews.
Definition kdiroperator.cpp:1494
void toggleDirsFirst()
Toggles showing directories first / having them sorted like files.
Definition kdiroperator.cpp:397
int iconSize() const
Returns the icon size in pixels, ranged from KIconLoader::SizeSmall (16) to KIconLoader::SizeEnormous...
Definition kdiroperator.cpp:796
virtual void setUrl(const QUrl &url, bool clearforward)
Sets a new url to list.
Definition kdiroperator.cpp:886
virtual void writeConfig(KConfigGroup &configGroup)
Saves the current settings like sorting, simple or detailed view.
Definition kdiroperator.cpp:2397
void contextMenuAboutToShow(const KFileItem &item, QMenu *menu)
Emitted just before the context menu is shown, allows users to extend the menu with custom actions.
Action
Actions provided by KDirOperator that can be accessed from the outside using action()
Definition kdiroperator.h:109
virtual void trashSelected()
Trashes the currently selected files/directories.
Definition kdiroperator.cpp:831
void setFollowSelectedDirectories(bool enable)
Toggles whether setUrl is called on selected directories when a tree view is used.
Definition kdiroperator.cpp:2529
bool followSelectedDirectories() const
Definition kdiroperator.cpp:2534
bool onlyDoubleClickSelectsFiles() const
Definition kdiroperator.cpp:2514
void clearFilter()
Clears both the namefilter and MIME type filter, so that all files and directories will be shown.
Definition kdiroperator.cpp:1131
void fileHighlighted(const KFileItem &item)
Emitted when a file is highlighted or generally the selection changes in multiselection mode.
void highlightFile(const KFileItem &item)
Emits fileHighlighted(item)
Definition kdiroperator.cpp:1800
void setViewMode(KFile::FileView viewKind)
Set the view mode to one of the predefined modes.
Definition kdiroperator.cpp:1529
void slotCompletionMatch(const QString &match)
Tries to make the given match as current item in the view and emits completion( match )
Definition kdiroperator.cpp:1938
virtual KIO::DeleteJob * del(const KFileItemList &items, QWidget *parent=nullptr, bool ask=true, bool showProgress=true)
Starts and returns a KIO::DeleteJob to delete the given items.
Definition kdiroperator.cpp:710
QStringList newFileMenuSupportedMimeTypes() const
Definition kdiroperator.cpp:1165
virtual void setDirLister(KDirLister *lister)
Sets a custom KDirLister to list directories.
Definition kdiroperator.cpp:1722
QString makeDirCompletion(const QString &)
Tries to complete the given string (only completes directories).
Definition kdiroperator.cpp:1909
void resetCursor()
Restores the normal cursor after showing the busy-cursor.
Definition kdiroperator.cpp:363
bool isSaving() const
Returns whether KDirOperator will force a double click to accept.
Definition kdiroperator.cpp:806
virtual void deleteSelected()
Deletes the currently selected files/directories.
Definition kdiroperator.cpp:741
void setIsSaving(bool isSaving)
If the system is set up to trigger items on single click, if isSaving is true, we will force to doubl...
Definition kdiroperator.cpp:801
void setOnlyDoubleClickSelectsFiles(bool enable)
This toggles between double/single click file and directory selection mode.
Definition kdiroperator.cpp:2505
virtual void activatedMenu(const KFileItem &item, const QPoint &pos)
Called upon right-click to activate the popupmenu.
Definition kdiroperator.cpp:1189
QList< QAction * > allActions() const
A list of all actions for this KDirOperator.
Definition kdiroperator.cpp:498
void setNewFileMenuSelectDirWhenAlreadyExist(bool selectOnDirExists)
Setting this to true will make a directory get selected when trying to create a new one that has the ...
Definition kdiroperator.cpp:1170
void viewChanged(QAbstractItemView *newView)
Emitted whenever the current fileview is changed, either by an explicit call to setView() or by the u...
QAction * action(KDirOperator::Action action) const
Obtain a given action from the KDirOperator's set of actions.
Definition kdiroperator.cpp:493
void setupMenu()
Sets up the context-menu with all the necessary actions.
Definition kdiroperator.cpp:2221
virtual void setPreviewWidget(KPreviewWidgetBase *w)
Sets a preview-widget to be shown next to the file-view.
Definition kdiroperator.cpp:420
void currentIconSizeChanged(int size)
Will notify that the icon size has changed.
void renameSelected()
Initiates a rename operation on the currently selected files/directories, prompting the user to choos...
Definition kdiroperator.cpp:811
void setDecorationPosition(QStyleOptionViewItem::Position position)
Sets the position where icons shall be shown relative to the labels of file items in the icon view.
Definition kdiroperator.cpp:2904
void pathChanged()
Called after setUrl() to load the directory, update the history, etc.
Definition kdiroperator.cpp:1029
virtual KIO::CopyJob * trash(const KFileItemList &items, QWidget *parent, bool ask=true, bool showProgress=true)
Starts and returns a KIO::CopyJob to trash the given items.
Definition kdiroperator.cpp:754
QStyleOptionViewItem::Position decorationPosition() const
Returns the position where icons are shown relative to the labels of file items in the icon view.
Definition kdiroperator.cpp:2899
virtual void setEnableDirHighlighting(bool enable)
When using the up or back actions to navigate the directory hierarchy, KDirOperator can highlight the...
Definition kdiroperator.cpp:2598
void setCurrentItems(const QList< QUrl > &urls)
Clears the current selection and attempts to set urls the current url files.
Definition kdiroperator.cpp:1846
virtual void setViewConfig(KConfigGroup &configGroup)
Sets the config object and the to be used group in KDirOperator.
Definition kdiroperator.cpp:2878
bool checkPreviewSupport()
Checks if there support from KIO::PreviewJob for the currently shown files, taking mimeFilter() and n...
Definition kdiroperator.cpp:1175
Acts as proxy model for KDirModel to sort and filter KFileItems.
Definition kdirsortfilterproxymodel.h:43
void setSortFoldersFirst(bool foldersFirst)
Choose if files and folders are sorted separately (with folders first) or not.
Definition kdirsortfilterproxymodel.cpp:123
This class creates and handles the actions for a url (or urls) in a popupmenu.
Definition kfileitemactions.h:50
void insertOpenWithActionsTo(QAction *before, QMenu *topMenu, const QStringList &excludedDesktopEntryNames)
Generates the "Open With <Application>" actions, and inserts them in menu, before action before.
Definition kfileitemactions.cpp:288
void setItemListProperties(const KFileItemListProperties &itemList)
Sets all the data for the next instance of the popupmenu.
Definition kfileitemactions.cpp:245
KFileItemDelegate is intended to be used to provide a KDE file system view, when using one of the sta...
Definition kfileitemdelegate.h:56
Provides information about the common properties of a group of KFileItem objects.
Definition kfileitemlistproperties.h:39
List of KFileItems, which adds a few helper methods to QList<KFileItem>.
Definition kfileitem.h:632
Generates previews for files of an item view.
Definition kfilepreviewgenerator.h:43
void setPreviewShown(bool show)
If show is set to true, a preview is generated for each item.
Definition kfilepreviewgenerator.cpp:1163
KFile is a class which provides a namespace for some enumerated values associated with the kfile libr...
Definition kfile.h:24
The AskUserActionInterface class allows a KIO::Job to prompt the user for a decision when e....
CopyJob is used to move, copy or symlink files and directories.
A more complex Job to delete files and directories.
This job asks the user for confirmation to delete or move to Trash a list of URLs; or if the job is c...
Definition deleteortrashjob.h:42
A UI delegate tuned to be used with KIO Jobs.
bool askDeleteConfirmation(const QList< QUrl > &urls, DeletionType deletionType, ConfirmationType confirmationType) override
Ask for confirmation before deleting/trashing urls.
Definition jobuidelegate.cpp:178
void setWindow(QWidget *window) override
Associate this job with a window given by window.
Definition jobuidelegate.cpp:153
static QStringList supportedMimeTypes()
Returns a list of all supported MIME types.
Definition previewjob.cpp:1044
Dialog for renaming a variable number of files.
A KIO job that retrieves information about a file or directory.
Universal Directory Service.
SizeHuge
SizeSmall
void setAutoErrorHandlingEnabled(bool enable)
bool exec()
KJobUiDelegate * uiDelegate() const
The 'Create New' submenu, for creating files using templates (e.g. "new HTML file") and directories.
Definition knewfilemenu.h:47
void directoryCreated(const QUrl &url)
Emitted once the directory url has been successfully created.
void selectExistingDir(const QUrl &url)
Emitted when trying to create a new directory that has the same name as an existing one,...
Abstract baseclass for all preview widgets which shall be used via KFileDialog::setPreviewWidget(cons...
Definition kpreviewwidgetbase.h:36
virtual void showPreview(const QUrl &url)=0
This slot is called every time the user selects another file in the file dialog.
static bool supportsListing(const QUrl &url)
Returns whether the protocol can list files/objects.
Definition kprotocolmanager.cpp:189
static bool supportsMoving(const QUrl &url)
Returns whether the protocol can move files/objects between different locations.
Definition kprotocolmanager.cpp:259
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
KIOCORE_EXPORT DeleteJob * del(const QUrl &src, JobFlags flags=DefaultFlags)
Delete a file or directory.
Definition deletejob.cpp:597
OpenFileManagerWindowJob * highlightInFileManager(const QList< QUrl > &urls, const QByteArray &asn)
Convenience method for creating a job to highlight a certain file or folder.
Definition openfilemanagerwindowjob.cpp:139
KIOCORE_EXPORT StatJob * stat(const QUrl &url, JobFlags flags=DefaultFlags)
Find all details for one file or directory.
Definition statjob.cpp:203
KIOCORE_EXPORT ListJob * listDir(const QUrl &url, JobFlags flags=DefaultFlags, ListJob::ListFlags listFlags=ListJob::ListFlag::IncludeHidden)
List the contents of url, which is assumed to be a directory.
Definition listjob.cpp:239
KIOCORE_EXPORT CopyJob * trash(const QUrl &src, JobFlags flags=DefaultFlags)
Trash a file or directory.
Definition copyjob.cpp:2710
void setWindow(QObject *job, QWidget *widget)
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition krecentdirs.cpp:33
QString name(StandardAction id)
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
Forward
Redisplay
QAction * create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional< Qt::ConnectionType > connectionType=std::nullopt)
const QList< QKeySequence > & showHideHiddenFiles()
const QList< QKeySequence > & shortcut(StandardShortcut id)
const QList< QKeySequence > & openContextMenu()
PreferLocalUrls
KCOREADDONS_EXPORT QList< QUrl > urlsFromMimeData(const QMimeData *mimeData, DecodeOptions decodeOptions=PreferKdeUrls, MetaDataMap *metaData=nullptr)
EnsureVisible
ExtendedSelection
void activated(const QModelIndex &index)
void entered(const QModelIndex &index)
virtual QModelIndex indexAt(const QPoint &point) const const=0
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)=0
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QItemSelectionModel * selectionModel() const const
void update(const QModelIndex &index)
QWidget * viewport() const const
void setChecked(bool)
void setEnabled(bool)
void setIcon(const QIcon &icon)
void setActionGroup(QActionGroup *group)
void setShortcut(const QKeySequence &shortcut)
void setShortcuts(QKeySequence::StandardKey key)
void setShortcutContext(Qt::ShortcutContext context)
QList< QKeySequence > shortcuts() const const
void setText(const QString &text)
void toggled(bool checked)
void setToolTip(const QString &tip)
void triggered(bool checked)
void setExclusive(bool b)
QPoint pos()
virtual void open()
SortByMask
QString currentPath()
QString homePath()
void ignore()
const QMimeData * mimeData() const const
MouseMove
void accept()
Qt::KeyboardModifiers keyboardModifiers()
void restoreOverrideCursor()
void setOverrideCursor(const QCursor &cursor)
void setSortIndicator(int logicalIndex, Qt::SortOrder order)
void sortIndicatorChanged(int logicalIndex, Qt::SortOrder order)
QIcon fromTheme(const QString &name)
Qt::KeyboardModifiers modifiers() const const
QModelIndexList indexes() const const
virtual void clear()
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
QModelIndex currentIndex() const const
bool hasSelection() const const
virtual void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
virtual void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
int key() const const
Iterator
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
iterator begin()
void clear()
const T & constFirst() const const
bool contains(const AT &value) const const
qsizetype count() const const
iterator end()
iterator erase(const_iterator begin, const_iterator end)
bool isEmpty() const const
qsizetype size() const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
MatchExtension
QMimeType mimeTypeForFile(const QFileInfo &fileInfo, MatchMode mode) const const
QMimeType mimeTypeForUrl(const QUrl &url) const const
name
bool isValid() const const
int column() const const
bool isValid() const const
Q_EMITQ_EMIT
bool blockSignals(bool block)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
virtual bool eventFilter(QObject *watched, QEvent *event)
void installEventFilter(QObject *filterObj)
QObject * parent() const const
T qobject_cast(QObject *object)
void removeEventFilter(QObject *obj)
int & ry()
int y() const const
void setValue(int value)
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, MatchType matchType, MatchOptions matchOptions) const const
void setPattern(const QString &pattern)
QString wildcardToRegularExpression(QStringView pattern, WildcardConversionOptions options)
bool hasMatch() const const
Qt::MouseButton button() const const
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const const override
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const override
void addWidget(QWidget *widget)
QList< int > sizes() const const
void splitterMoved(int pos, int index)
QString & append(QChar ch)
qsizetype length() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
qsizetype indexOf(const QRegularExpression &re, qsizetype from) const const
PM_DefaultFrameWidth
SH_ItemView_ActivateItemOnSingleClick
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
Position
CaseSensitivity
QueuedConnection
CustomContextMenu
WaitCursor
WheelFocus
Key_Return
ShiftModifier
LeftToRight
SHIFT
BackButton
WidgetWithChildrenShortcut
SortOrder
SkipEmptyParts
WA_Hover
void setSingleShot(bool singleShot)
void start()
void stop()
void timeout()
InstantPopup
void expand(const QModelIndex &index)
QHeaderView * header() const const
StripTrailingSlash
QUrl adjusted(FormattingOptions options) const const
QUrl fromLocalFile(const QString &localFile)
bool isEmpty() const const
bool isLocalFile() const const
bool isParentOf(const QUrl &childUrl) const const
bool isRelative() const const
bool isValid() const const
bool matches(const QUrl &url, FormattingOptions options) const const
QString path(ComponentFormattingOptions options) const const
QUrl resolved(const QUrl &relative) const const
QString scheme() const const
QString toLocalFile() const const
QPoint angleDelta() const const
QWidget * topLevelWidget() const const
void setAcceptDrops(bool on)
QList< QAction * > actions() const const
QAction * addAction(const QIcon &icon, const QString &text)
virtual void changeEvent(QEvent *event)
void customContextMenuRequested(const QPoint &pos)
virtual bool event(QEvent *event) override
void setFocusPolicy(Qt::FocusPolicy policy)
height
void hide()
bool isHidden() const const
void setLayoutDirection(Qt::LayoutDirection direction)
pos
void raise()
void setFocus()
void setFocusProxy(QWidget *w)
void show()
size
QStyle * style() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.