Filer
Public Types | Public Member Functions | Public Attributes | List of all members
ApplicationBundle Class Reference

Represents an application bundle or executable in various formats. More...

#include <ApplicationBundle.h>

Inheritance diagram for ApplicationBundle:
Inheritance graph
[legend]
Collaboration diagram for ApplicationBundle:
Collaboration graph
[legend]

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
 

Detailed Description

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).

Member Enumeration Documentation

◆ Type

Enumerates the different types of application bundles.

Enumerator
Unknown 

Unknown application bundle type.

AppBundle 

Simplified .app bundle.

AppDir 

ROX-style AppDir.

AppImage 

AppImage executable.

DesktopFile 

Desktop entry file.

Constructor & Destructor Documentation

◆ ApplicationBundle()

ApplicationBundle::ApplicationBundle ( const QString &  path)

Constructs an ApplicationBundle object for the specified path.

Parameters
pathThe path to the application bundle.

Member Function Documentation

◆ arguments()

QStringList ApplicationBundle::arguments ( ) const

Retrieves the list of arguments passed to the executable.

Returns
The list of arguments.

◆ executable()

QString ApplicationBundle::executable ( ) const

Retrieves the path to the executable of the application.

Returns
The executable path.

◆ icon()

QIcon ApplicationBundle::icon ( ) const

Retrieves the icon of the application bundle.

Returns
The icon.

◆ iconName()

QString ApplicationBundle::iconName ( ) const

Retrieves the name of the icon file.

Returns
The icon name.

◆ isCommandLineTool()

bool ApplicationBundle::isCommandLineTool ( ) const

Checks if the application bundle is a command line tool.

Returns
True if the application is a command-line tool, false otherwise.

◆ isValid()

bool ApplicationBundle::isValid ( ) const

Checks if the application bundle is valid and exists.

Returns
True if the bundle is valid, false otherwise.

◆ launch()

bool ApplicationBundle::launch ( QStringList  arguments) const

Launches the application.

Parameters
argumentsThe list of arguments to pass to the application.
Returns
True if the application was launched successfully, false otherwise.

◆ name()

QString ApplicationBundle::name ( ) const

Retrieves the name of the application.

Returns
The name.

◆ path()

QString ApplicationBundle::path ( ) const

Returns the path of the application bundle.

Returns
The path.

◆ type()

ApplicationBundle::Type ApplicationBundle::type ( ) const

Returns the type of the application bundle.

Returns
The type.

◆ typeName()

QString ApplicationBundle::typeName ( ) const

Gets the name of the type as a string.

Returns
The type name.

Member Data Documentation

◆ m_arguments

QStringList ApplicationBundle::m_arguments

The list of arguments.

◆ m_executable

QString ApplicationBundle::m_executable

The path to the executable.

◆ m_icon

QString ApplicationBundle::m_icon

The path of the application's icon.

◆ m_isValid

bool ApplicationBundle::m_isValid

Indicates if the bundle is valid.

◆ m_name

QString ApplicationBundle::m_name

The name of the application.

◆ m_path

QString ApplicationBundle::m_path

The path of the application bundle.

◆ m_type

Type ApplicationBundle::m_type

The type of the application bundle.


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