KIO
kdiroperator.cpp
10#include <defaults-kfile.h> // ConfigGroup, DefaultShowHidden, DefaultDirsFirst, DefaultSortReversed
152 void slotAskUserDeleteResult(bool allowDelete, const QList<QUrl> &urls, KIO::AskUserActionInterface::DeletionType deletionType, QWidget *parent);
197 bool m_onlyDoubleClickSelectsFiles = !qApp->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick);
448 const QItemSelection selection = d->m_proxyModel->mapSelectionToSource(d->m_itemView->selectionModel()->selection());
504 return static_cast<KFile::FileView>(KFile::Simple | KFile::Detail | KFile::Tree | KFile::DetailTree);
512 KFile::FileView view = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Detail);
521 KFile::FileView view = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Simple);
539 KFile::FileView view = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::DetailTree);
657 KFile::FileView fileView = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Simple);
671 KFile::FileView fileView = static_cast<KFile::FileView>((m_viewKind & ~allViews()) | KFile::Simple);
709KIO::DeleteJob *KDirOperator::del(const KFileItemList &items, QWidget *parent, bool ask, bool showProgress)
712 KMessageBox::information(parent, i18n("You did not select a file to delete."), i18n("Nothing to Delete"));
726 doIt = uiDelegate.askDeleteConfirmation(urls, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation);
744 KMessageBox::information(this, i18n("You did not select a file to delete."), i18n("Nothing to Delete"));
749 auto *deleteJob = new KIO::DeleteOrTrashJob(urls, Iface::Delete, Iface::DefaultConfirmation, this);
753KIO::CopyJob *KDirOperator::trash(const KFileItemList &items, QWidget *parent, bool ask, bool showProgress)
756 KMessageBox::information(parent, i18n("You did not select a file to trash."), i18n("Nothing to Trash"));
766 doIt = uiDelegate.askDeleteConfirmation(urls, KIO::JobUiDelegate::Trash, KIO::JobUiDelegate::DefaultConfirmation);
787 d->m_inlinePreviewState = show ? KDirOperatorPrivate::ForcedToTrue : KDirOperatorPrivate::ForcedToFalse;
822 connect(dialog, &KIO::RenameFileDialog::renamingFinished, this, [this](const QList<QUrl> &urls) {
843 KMessageBox::information(this, i18n("You did not select a file to trash."), i18n("Nothing to Trash"));
848 auto *trashJob = new KIO::DeleteOrTrashJob(urls, Iface::Trash, Iface::DefaultConfirmation, this);
887 QUrl newurl = _newurl.isValid() ? _newurl.adjusted(QUrl::NormalizePathSegments) : QUrl::fromLocalFile(QDir::homePath());
968 const bool result = KProtocolManager::supportsListing(url) && isSchemeSupported(url.scheme()) && m_dirLister->openUrl(url, flags);
1081 const QUrl _url = newUrl.adjusted(QUrl::StripTrailingSlash).adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash);
1176 KToggleAction *previewAction = static_cast<KToggleAction *>(action(KDirOperator::ShowPreviewPanel));
1254 const QModelIndex hoveredIndex = d->m_itemView->indexAt(d->m_itemView->viewport()->mapFromGlobal(QCursor::pos()));
1262 const QModelIndex currentIndex = d->m_itemView->selectionModel() ? d->m_itemView->selectionModel()->currentIndex() : QModelIndex();
1264 if (!hoveredIndex.isValid() && currentIndex.isValid() && (d->m_lastHoveredIndex != currentIndex)) {
1265 const KFileItem item = d->m_itemView->model()->data(currentIndex, KDirModel::FileItemRole).value<KFileItem>();
1275 const QModelIndex hoveredIndex = d->m_itemView->indexAt(d->m_itemView->viewport()->mapFromGlobal(QCursor::pos()));
1276 const QModelIndex focusedIndex = d->m_itemView->selectionModel() ? d->m_itemView->selectionModel()->currentIndex() : QModelIndex();
1278 if (((!focusedIndex.isValid()) || !d->m_itemView->selectionModel()->isSelected(focusedIndex)) && (!hoveredIndex.isValid())) {
1312 const QList<QUrl> urls = KUrlMimeData::urlsFromMimeData(evt->mimeData(), KUrlMimeData::PreferLocalUrls);
1347 const QList<QUrl> urls = KUrlMimeData::urlsFromMimeData(evt->mimeData(), KUrlMimeData::PreferLocalUrls);
1398 && d->m_progressBar->parent() == this /* it could have been reparented to a statusbar */) { /* clang-format on */
1427 const QStringList nameFilters = m_dirLister->nameFilter().split(QLatin1Char(' '), Qt::SkipEmptyParts);
1453 const QMimeType mt = db.mimeTypeForFile(filter, QMimeDatabase::MatchExtension /*fast mode, no file contents exist*/);
1525 preview = (KFile::isPreviewInfo(defaultViewKind) || KFile::isPreviewContents(defaultViewKind)) && action(KDirOperator::ShowPreviewPanel)->isEnabled();
1628 connect(headerView, &QHeaderView::sortIndicatorChanged, this, [this](int logicalIndex, Qt::SortOrder order) {
1637 connect(d->m_itemView, &QAbstractItemView::customContextMenuRequested, this, [this](QPoint pos) {
1663 connect(d->m_itemView->selectionModel(), &QItemSelectionModel::currentChanged, this, [this](QModelIndex index) {
1666 connect(d->m_itemView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [this]() {
1684 const bool previewShown = d->m_inlinePreviewState == KDirOperatorPrivate::NotForced ? d->m_showPreviews : previewForcedToTrue;
1686 d->m_itemView->setIconSize(previewForcedToTrue ? QSize(KIconLoader::SizeHuge, KIconLoader::SizeHuge) : QSize(d->m_iconSize, d->m_iconSize));
1754 connect(d->m_dirLister, &KCoreDirLister::redirection, this, [this](const QUrl &, const QUrl &newUrl) {
1937 QAction *backAction = KStandardAction::create(KStandardAction::Back, this, SLOT(back()), this);
1944 QAction *forwardAction = KStandardAction::create(KStandardAction::Forward, this, SLOT(forward()), this);
1948 QAction *homeAction = KStandardAction::create(KStandardAction::Home, this, SLOT(home()), this);
1952 QAction *reloadAction = KStandardAction::create(KStandardAction::Redisplay, this, SLOT(rereadDir()), this);
2129 KToggleAction *allowExpansionAction = new KToggleAction(i18n("Allow Expansion in Details View"), this);
2149 KToggleAction *inlinePreview = new KToggleAction(QIcon::fromTheme(QStringLiteral("view-preview")), i18n("Show Preview"), this);
2242 const bool del = !d->m_currUrl.isLocalFile() || (QApplication::keyboardModifiers() & Qt::ShiftModifier) || cg.readEntry("ShowDeleteCommand", false);
2309 action(KDirOperator::ViewIconsView)->setChecked(KFile::isSimpleView(fv) && d->m_decorationPosition == QStyleOptionViewItem::Top);
2310 action(KDirOperator::ViewCompactView)->setChecked(KFile::isSimpleView(fv) && d->m_decorationPosition == QStyleOptionViewItem::Left);
2311 action(KDirOperator::ViewDetailsView)->setChecked(KFile::isDetailTreeView(fv) || KFile::isDetailView(fv));
2346 const bool hiddenFilesLast = configGroup.readEntry(QStringLiteral("Sort hidden files last"), DefaultHiddenFilesLast);
2373 (QStyleOptionViewItem::Position)configGroup.readEntry(QStringLiteral("Decoration position"), (int)QStyleOptionViewItem::Top);
2390 configGroup.writeEntry(QStringLiteral("Sort reversed"), action(KDirOperator::SortDescending)->isChecked());
2392 configGroup.writeEntry(QStringLiteral("Sort directories first"), action(KDirOperator::SortFoldersFirst)->isChecked());
2405 KToggleAction *previewAction = static_cast<KToggleAction *>(action(KDirOperator::ShowPreviewPanel));
2419 configGroup.writeEntry(QStringLiteral("Show hidden files"), action(KDirOperator::ShowHiddenFiles)->isChecked());
2421 configGroup.writeEntry(QStringLiteral("Allow Expansion"), action(KDirOperator::AllowExpansionInDetailsView)->isChecked());
2625 if (m_followSelectedDirectories || (m_viewKind != KFile::Tree && m_viewKind != KFile::DetailTree)) {
2642 const bool multiSelectionMode = (m_itemView->selectionMode() == QAbstractItemView::ExtendedSelection);
2668 if ((m_preview != nullptr && !m_preview->isHidden()) && index.isValid() && (index.column() == KDirModel::Name)) {
2801 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 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:2156
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:2109
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:2295
QStringList mimeFilters() const
Returns the list of MIME type based filters, as set via setMimeFilter().
Definition kcoredirlister.cpp:2360
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:1187
@ FileItemRole
returns the KFileItem for a given index. roleName is "fileItem".
Definition kdirmodel.h:158
KFileItem itemForIndex(const QModelIndex &index) const
Return the fileitem for a given index.
Definition kdirmodel.cpp:1175
void setNewFileMenuSupportedMimeTypes(const QStringList &mime)
Only show the files in a given set of MIME types.
Definition kdiroperator.cpp:1159
void setIconSize(int value)
Notifies that the icons size should change.
Definition kdiroperator.cpp:852
void keyEnterReturnPressed()
Triggered when the user hit Enter/Return.
virtual void setDropOptions(int options)
Sets the options for dropping files.
Definition kdiroperator.cpp:1501
virtual void setAcceptDrops(bool b)
Reimplemented - allow dropping of files if b is true, defaults to true since 5.59.
Definition kdiroperator.cpp:1488
void setInlinePreviewShown(bool show)
Forces the inline previews to be shown or hidden, depending on show.
Definition kdiroperator.cpp:785
void setSupportedSchemes(const QStringList &schemes)
Set the URL schemes that the file widget should allow navigating to.
Definition kdiroperator.cpp:2911
virtual void selectDir(const KFileItem &item)
Enters the directory specified by the given item.
Definition kdiroperator.cpp:1768
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:264
QStringList supportedSchemes() const
Returns the URL schemes that the file widget should allow navigating to.
Definition kdiroperator.cpp:2917
KCompletion * dirCompletionObject() const
Definition kdiroperator.cpp:487
virtual void setShowHiddenFiles(bool s)
Enables/disables showing hidden files.
Definition kdiroperator.cpp:2868
void setMimeFilter(const QStringList &mimetypes)
Sets a list of MIME types as filter.
Definition kdiroperator.cpp:1148
void showOpenWithActions(bool enable)
Call with true to add open-with actions to items in the view.
Definition kdiroperator.cpp:1237
virtual void setMode(KFile::Modes m)
Sets the listing/selection mode for the views, an OR'ed combination of.
Definition kdiroperator.cpp:1557
void setFollowNewDirectories(bool enable)
Toggles whether setUrl is called on newly created directories.
Definition kdiroperator.cpp:2495
void updateSortActions()
Updates the sorting-related actions to comply with the current sorting.
Definition kdiroperator.cpp:2268
QString makeCompletion(const QString &)
Tries to complete the given string (only completes files).
Definition kdiroperator.cpp:1878
void updateSelectionDependentActions()
Enables/disables actions that are selection dependent.
Definition kdiroperator.cpp:410
KFilePreviewGenerator * previewGenerator() const
Returns the preview generator for the current view.
Definition kdiroperator.cpp:780
bool isInlinePreviewShown() const
Returns whether the inline previews are shown or not.
Definition kdiroperator.cpp:790
void toggleIgnoreCase()
Toggles case sensitive / case insensitive sorting.
Definition kdiroperator.cpp:401
void prepareCompletionObjects()
Synchronizes the completion objects with the entries of the currently listed url.
Definition kdiroperator.cpp:1900
virtual void readConfig(const KConfigGroup &configGroup)
Reads the default settings for a view, i.e. the default KFile::FileView.
Definition kdiroperator.cpp:2314
void updateViewActions()
Updates the view-related actions to comply with the current KFile::FileView.
Definition kdiroperator.cpp:2295
virtual void forward()
Goes one step forward in the history and opens that url.
Definition kdiroperator.cpp:1095
void setCurrentItem(const QUrl &url)
Clears the current selection and attempts to set url the current url file.
Definition kdiroperator.cpp:1789
void setSorting(QDir::SortFlags)
Sets the way to sort files and directories.
Definition kdiroperator.cpp:333
void setNameFilter(const QString &filter)
Sets a filter like "*.cpp *.h *.o".
Definition kdiroperator.cpp:1137
virtual void back()
Goes one step back in the history and opens that url.
Definition kdiroperator.cpp:1068
virtual QAbstractItemView * createView(QWidget *parent, KFile::FileView viewKind)
A view factory for creating predefined fileviews.
Definition kdiroperator.cpp:1474
void toggleDirsFirst()
Toggles showing directories first / having them sorted like files.
Definition kdiroperator.cpp:396
int iconSize() const
Returns the icon size in pixels, ranged from KIconLoader::SizeSmall (16) to KIconLoader::SizeEnormous...
Definition kdiroperator.cpp:795
virtual void setUrl(const QUrl &url, bool clearforward)
Sets a new url to list.
Definition kdiroperator.cpp:885
virtual void writeConfig(KConfigGroup &configGroup)
Saves the current settings like sorting, simple or detailed view.
Definition kdiroperator.cpp:2377
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:830
void setFollowSelectedDirectories(bool enable)
Toggles whether setUrl is called on selected directories when a tree view is used.
Definition kdiroperator.cpp:2505
bool followSelectedDirectories() const
Definition kdiroperator.cpp:2510
bool onlyDoubleClickSelectsFiles() const
Definition kdiroperator.cpp:2490
void clearFilter()
Clears both the namefilter and MIME type filter, so that all files and directories will be shown.
Definition kdiroperator.cpp:1130
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:1780
void setViewMode(KFile::FileView viewKind)
Set the view mode to one of the predefined modes.
Definition kdiroperator.cpp:1509
void slotCompletionMatch(const QString &match)
Tries to make the given match as current item in the view and emits completion( match )
Definition kdiroperator.cpp:1918
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:709
QStringList newFileMenuSupportedMimeTypes() const
Definition kdiroperator.cpp:1164
virtual void setDirLister(KDirLister *lister)
Sets a custom KDirLister to list directories.
Definition kdiroperator.cpp:1702
QString makeDirCompletion(const QString &)
Tries to complete the given string (only completes directories).
Definition kdiroperator.cpp:1889
void resetCursor()
Restores the normal cursor after showing the busy-cursor.
Definition kdiroperator.cpp:362
bool isSaving() const
Returns whether KDirOperator will force a double click to accept.
Definition kdiroperator.cpp:805
virtual void deleteSelected()
Deletes the currently selected files/directories.
Definition kdiroperator.cpp:740
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:800
void setOnlyDoubleClickSelectsFiles(bool enable)
This toggles between double/single click file and directory selection mode.
Definition kdiroperator.cpp:2481
virtual void activatedMenu(const KFileItem &item, const QPoint &pos)
Called upon right-click to activate the popupmenu.
Definition kdiroperator.cpp:1188
QList< QAction * > allActions() const
A list of all actions for this KDirOperator.
Definition kdiroperator.cpp:497
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:1169
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:492
void setupMenu()
Sets up the context-menu with all the necessary actions.
Definition kdiroperator.cpp:2201
virtual void setPreviewWidget(KPreviewWidgetBase *w)
Sets a preview-widget to be shown next to the file-view.
Definition kdiroperator.cpp:419
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:810
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:2883
void pathChanged()
Called after setUrl() to load the directory, update the history, etc.
Definition kdiroperator.cpp:1028
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:753
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:2878
virtual void setEnableDirHighlighting(bool enable)
When using the up or back actions to navigate the directory hierarchy, KDirOperator can highlight the...
Definition kdiroperator.cpp:2574
void setCurrentItems(const QList< QUrl > &urls)
Clears the current selection and attempts to set urls the current url files.
Definition kdiroperator.cpp:1826
virtual void setViewConfig(KConfigGroup &configGroup)
Sets the config object and the to be used group in KDirOperator.
Definition kdiroperator.cpp:2857
bool checkPreviewSupport()
Checks if there support from KIO::PreviewJob for the currently shown files, taking mimeFilter() and n...
Definition kdiroperator.cpp:1174
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:262
void setItemListProperties(const KFileItemListProperties &itemList)
Sets all the data for the next instance of the popupmenu.
Definition kfileitemactions.cpp:216
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:630
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:1158
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....
Definition askuseractioninterface.h:44
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
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:936
Dialog for renaming a variable number of files.
Definition renamefiledialog.h:39
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:699
static bool supportsMoving(const QUrl &url)
Returns whether the protocol can move files/objects between different locations.
Definition kprotocolmanager.cpp:769
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:119
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:2679
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
QAction * renameFile(const QObject *recvr, const char *slot, QObject *parent)
QAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
Forward
Redisplay
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
QString name(StandardShortcut id)
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
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
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 Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.