FOSSredder 0.5.0
Loading...
Searching...
No Matches
ui::FileSystemBrowser Class Reference

Exposes directory listing and application-directory lookup to QML. More...

#include <FileSystemBrowser.h>

Inheritance diagram for ui::FileSystemBrowser:
Collaboration diagram for ui::FileSystemBrowser:

Public Member Functions

 FileSystemBrowser (QObject *parent=nullptr)
 Create the filesystem helper exposed to QML.
Q_INVOKABLE QVariantList listDir (const QString &path) const
 List the contents of a directory in a QML-friendly payload shape.
Q_INVOKABLE QString appDir () const
 Return the current application directory path.
Q_INVOKABLE bool openLocation (const QString &path) const
 Opens the containing folder for a file or directory path.

Detailed Description

Exposes directory listing and application-directory lookup to QML.

Definition at line 17 of file FileSystemBrowser.h.

Constructor & Destructor Documentation

◆ FileSystemBrowser()

ui::FileSystemBrowser::FileSystemBrowser ( QObject * parent = nullptr)
explicit

Create the filesystem helper exposed to QML.

Definition at line 18 of file FileSystemBrowser.cpp.

Member Function Documentation

◆ appDir()

QString ui::FileSystemBrowser::appDir ( ) const

Return the current application directory path.

Returns
Application directory path

Definition at line 37 of file FileSystemBrowser.cpp.

◆ listDir()

QVariantList ui::FileSystemBrowser::listDir ( const QString & path) const

List the contents of a directory in a QML-friendly payload shape.

Parameters
pathDirectory path
Returns
Directory contents as QVariantList

Definition at line 20 of file FileSystemBrowser.cpp.

◆ openLocation()

bool ui::FileSystemBrowser::openLocation ( const QString & path) const

Opens the containing folder for a file or directory path.

Parameters
pathFile or directory path.
Returns
True when an existing location was opened.

Definition at line 41 of file FileSystemBrowser.cpp.


The documentation for this class was generated from the following files: