Filer
|
Represents an application bundle or executable in various formats. More...
#include <ApplicationBundle.h>
Public Types | |
enum class | Type { Unknown , AppBundle , AppDir , AppImage , DesktopFile } |
Enumerates the different types of application bundles. More... | |
Public Member Functions | |
ApplicationBundle (const QString &path) | |
Constructs an ApplicationBundle object for the specified path. More... | |
QString | path () const |
Returns the path of the application bundle. More... | |
bool | isValid () const |
Checks if the application bundle is valid and exists. More... | |
Type | type () const |
Returns the type of the application bundle. More... | |
QIcon | icon () const |
Retrieves the icon of the application bundle. More... | |
QString | iconName () const |
Retrieves the name of the icon file. More... | |
QString | name () const |
Retrieves the name of the application. More... | |
QString | executable () const |
Retrieves the path to the executable of the application. More... | |
QStringList | arguments () const |
Retrieves the list of arguments passed to the executable. More... | |
bool | isCommandLineTool () const |
Checks if the application bundle is a command line tool. More... | |
QString | typeName () const |
Gets the name of the type as a string. More... | |
bool | launch (QStringList arguments) const |
Launches the application. More... | |
QIcon | quadraticIcon (QIcon icon) const |
Public Attributes | |
QString | m_path |
bool | m_isValid |
Type | m_type |
QString | m_name |
QString | m_icon |
QString | m_executable |
QStringList | m_arguments |
Represents an application bundle or executable in various formats.
The ApplicationBundle class provides methods to work with different types of application bundles, including AppImages, AppDirs, desktop files, and regular executables. It can be used to retrieve information about the application, such as its type, icon, name, executable path, and arguments.
The class supports multiple types of application bundles, each identified by its Type. Application types include AppBundle (application bundle directory), AppDir (AppImage-like), AppImage (AppImage executable), and DesktopFile (desktop entry).
|
strong |
ApplicationBundle::ApplicationBundle | ( | const QString & | path | ) |
Constructs an ApplicationBundle object for the specified path.
path | The path to the application bundle. |
QStringList ApplicationBundle::arguments | ( | ) | const |
Retrieves the list of arguments passed to the executable.
QString ApplicationBundle::executable | ( | ) | const |
Retrieves the path to the executable of the application.
QIcon ApplicationBundle::icon | ( | ) | const |
Retrieves the icon of the application bundle.
QString ApplicationBundle::iconName | ( | ) | const |
Retrieves the name of the icon file.
bool ApplicationBundle::isCommandLineTool | ( | ) | const |
Checks if the application bundle is a command line tool.
bool ApplicationBundle::isValid | ( | ) | const |
Checks if the application bundle is valid and exists.
bool ApplicationBundle::launch | ( | QStringList | arguments | ) | const |
Launches the application.
arguments | The list of arguments to pass to the application. |
QString ApplicationBundle::name | ( | ) | const |
Retrieves the name of the application.
QString ApplicationBundle::path | ( | ) | const |
Returns the path of the application bundle.
ApplicationBundle::Type ApplicationBundle::type | ( | ) | const |
Returns the type of the application bundle.
QString ApplicationBundle::typeName | ( | ) | const |
Gets the name of the type as a string.
QStringList ApplicationBundle::m_arguments |
The list of arguments.
QString ApplicationBundle::m_executable |
The path to the executable.
QString ApplicationBundle::m_icon |
The path of the application's icon.
bool ApplicationBundle::m_isValid |
Indicates if the bundle is valid.
QString ApplicationBundle::m_name |
The name of the application.
QString ApplicationBundle::m_path |
The path of the application bundle.
Type ApplicationBundle::m_type |
The type of the application bundle.