MauiKit File Browsing
FileBrowser.qml
33 * @brief This control displays the file system entries in a given directory, allows subsequent browsing of the file hierarchy and exposes basic file handling functionality.
35 * This controls inherits from MauiKit Page, to checkout its inherited properties refer to the docs.
42 * This control exposes a series of convenient properties and functions for filtering and sorting, for creating new entries, perform searches, and modify the entries.
44 * There are two different possible ways to display the contents: Grid and List, using the `settings.viewType` property.
50 * Some basic file item actions are implemented by default, like copy, cut, rename and remove, and exposed as methods.
56 * @note This component functionality can be easily expanded to be more feature rich, see for example the Maui Index application.
58 * This control allows to perform recursive searches, or simple filtering of elements in the current location by using the search bar. Besides these two, the user can quickly start fly-typing within the browser, to jump quickly to a matching entry.
61 * This control supports multiple keyboard shortcuts, for selecting multiple elements, creating new entries, copying, deleting and renaming files.
82 * This control inherits from MauiKit Page, so it has a header and footer. The header bar has a search field for performing searches, by default it is hidden.
84 * The footer bar by default has contextual buttons, depending on the current location. For example, for the trash location, it has contextual actions for emptying the trash can, etc.
86 * @warning It is recommended to not add elements to the footer or header bars, instead - if needed - wrap this control into a MauiKit Page, and utilize its toolbars.
99 * <a href="https://invent.kde.org/maui/mauikit-filebrowser/examples/FileBrowser.qml">You can find a more complete example at this link.</a>
121 * To list a directory path, or other location, use the right schema, some of them are `file://`, `webdav://`, `trash://`/, `tags://`, `fish://`.
124 * @note KDE KIO is used as the back-end technology, so any of the supported plugins by KIO will also work here.
132 * @brief A group of properties for controlling the sorting, listing and other behaviour of the browser.
147 * @brief The browser could be in two different view states: [1]the file browsing or [2]the search view.
161 * By default some of the drop actions are handled, for other type of URIs this alias can be used to handle those.
163 * The urlsDropped signal is emitted once one or multiple valid file URLs are dropped, and a popup contextual menu is opened with the supported default actions.
173 Binding on currentIndex
194 * @brief The file browser model controller. This is the controller which allows for filtering, index mapping, and sorting.
205 * @brief Whether the file browser enters selection mode, allowing the selection of multiple items.
221 * @note The size is actually taken as the size of the icon thumbnail. And it is mapped to the nearest size of the standard icon sizes.
228 * This is optional, but if it is not set, then some feature will not work, such as selection mode, selection shortcuts etc.
287 * @brief Whether the browser is on a read only mode, and modifications are now allowed, such as pasting, moving, removing or renaming.
472 message: i18nd("mauikitfilebrowsing", "Delete %1 \nTotal freed space %2", (Maui.Handy.isLinux ? "or move to trash?" : "? This action can not be undone."), Maui.Handy.formatSize(freedSpace))
525 title: _newDirOp.checked ? i18nd("mauikitfilebrowsing", "New folder") : i18nd("mauikitfilebrowsing", "New file")
584 message: i18nd("mauikitfilebrowsing", "Change the name of a file or folder. Write a new name and click Rename to apply the change.")
697 if((event.key === Qt.Key_Left || event.key === Qt.Key_Right || event.key === Qt.Key_Down || event.key === Qt.Key_Up) && (event.modifiers & Qt.ControlModifier) && (event.modifiers & Qt.ShiftModifier))
762 if(event.key === Qt.Key_Escape) //TODO not working, the event is not catched or emitted or is being accepted else where?
951 active: (control.currentPath === "tags://" || control.currentPath === "tags:///") && !control.readOnly
1065 * @brief Given an index position of a element, try to open it, it can be a directory, a file or an executable.
1194 if(control.selectionBar == null || item.path.startsWith("tags://") || item.path.startsWith("applications://"))
1222 function selectAll() //TODO for now dont select more than 100 items so things dont freeze or break
1291 * @brief Perform a recursive search starting form the current location and down to all the children directories.
1349 * @note Keep in mind that the selection bar can have entries from multiple different locations. With this method only the entries which are inside the `currentPath` will be returned.
1351 * @param currentPath The currentPath must be a directory, so the selection entries can be compared as its parent directory.
1354 * @return the list of entries in the selection that match the currentPath as their parent directory
bool visible
The FM class stands for File Management, and exposes methods for file listing, browsing and handling,...
Definition fm.h:104
Q_SCRIPTABLE CaptureState status()
QString i18nd(const char *domain, 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)
KIOWIDGETS_EXPORT DropJob * drop(const QDropEvent *dropEvent, const QUrl &destUrl, DropJobFlags dropjobFlags, JobFlags flags=DefaultFlags)
KIOCORE_EXPORT CopyJob * copy(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
KIOWIDGETS_EXPORT PasteJob * paste(const QMimeData *mimeData, const QUrl &destDir, JobFlags flags=DefaultFlags)
QString path(const QString &relativePath)
QAction * cut(const QObject *recvr, const char *slot, QObject *parent)
QAction * renameFile(const QObject *recvr, const char *slot, QObject *parent)
QAction * selectAll(const QObject *recvr, const char *slot, QObject *parent)
KGuiItem remove()
KGuiItem close()
QString label(StandardShortcut id)
String
QString & append(QChar ch)
QString & fill(QChar ch, qsizetype size)
QString left(qsizetype n) const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QTextStream & right(QTextStream &stream)
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.