LMMS
Loading...
Searching...
No Matches
lmms::gui::FileRevealer Class Reference

A utility class for revealing files and directories in the system's file manager. More...

#include <FileRevealer.h>

Static Public Member Functions

static const QString & getDefaultFileManager ()
 Retrieves the default file manager for the current platform.
static void openDir (const QFileInfo item)
 Opens the directory containing the specified file or folder in the file manager.
static void openDir (const QString &itemPath)
static const QStringList & getSelectCommand ()
 Checks whether the file manager supports selecting a specific file.
static void reveal (const QFileInfo item)
 Opens the file manager and selects the specified file if supported.
static void reveal (const QString &itemPath)

Static Protected Member Functions

static bool supportsArg (const QString &command, const QString &arg)
 Determines if the given command supports the argument.

Static Private Attributes

static bool s_canSelect = false

Detailed Description

A utility class for revealing files and directories in the system's file manager.

Member Function Documentation

◆ getDefaultFileManager()

const QString & lmms::gui::FileRevealer::getDefaultFileManager ( )
static

Retrieves the default file manager for the current platform.

Returns
The name or command of the default file manager.

◆ getSelectCommand()

const QStringList & lmms::gui::FileRevealer::getSelectCommand ( )
static

Checks whether the file manager supports selecting a specific file.

Returns
True if selection is supported, otherwise false.

◆ openDir() [1/2]

void lmms::gui::FileRevealer::openDir ( const QFileInfo item)
static

Opens the directory containing the specified file or folder in the file manager.

Parameters
itemThe QFileInfo object representing the file or folder.

◆ openDir() [2/2]

void lmms::gui::FileRevealer::openDir ( const QString & itemPath)
inlinestatic

◆ reveal() [1/2]

void lmms::gui::FileRevealer::reveal ( const QFileInfo item)
static

Opens the file manager and selects the specified file if supported.

Parameters
itemThe QFileInfo object representing the file to reveal.

◆ reveal() [2/2]

void lmms::gui::FileRevealer::reveal ( const QString & itemPath)
inlinestatic

◆ supportsArg()

bool lmms::gui::FileRevealer::supportsArg ( const QString & command,
const QString & arg )
staticprotected

Determines if the given command supports the argument.

Parameters
commandThe name of the file manager to check.
argThe command line argument to parse for
Returns
True if the file command the argument, otherwise false.

Member Data Documentation

◆ s_canSelect

bool lmms::gui::FileRevealer::s_canSelect = false
staticprivate

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