browserchooser 0.0.2
A simple browser chooser.
Loading...
Searching...
No Matches
DesktopEntry Class Reference

#include <desktopentry.h>

Public Member Functions

 DesktopEntry ()=default
 DesktopEntry (const QString &filename)
bool parse (const QString &filename)
bool isValid () const
QString filename () const
QString name () const
QString exec () const
QString executableName () const
QString icon () const
QString comment () const
QString startupWMClass () const
QStringList categories () const
QStringList mimeTypes () const
bool noDisplay () const

Detailed Description

Represents a desktop entry (.desktop file).

Constructor & Destructor Documentation

◆ DesktopEntry() [1/2]

DesktopEntry::DesktopEntry ( )
default

Constructor.

◆ DesktopEntry() [2/2]

DesktopEntry::DesktopEntry ( const QString & filename)
explicit

Constructor that parses the given .desktop file.

Parameters
filenameThe path to the .desktop file.

Member Function Documentation

◆ categories()

QStringList DesktopEntry::categories ( ) const
inlinenodiscard

Returns the categories of the desktop entry.

◆ comment()

QString DesktopEntry::comment ( ) const
nodiscard

Returns the comment/description of the desktop entry.

◆ exec()

QString DesktopEntry::exec ( ) const
inlinenodiscard

Returns the executable command of the desktop entry.

◆ executableName()

QString DesktopEntry::executableName ( ) const
nodiscard

Returns the executable name (first token of Exec) for PATH lookup.

◆ filename()

QString DesktopEntry::filename ( ) const
inlinenodiscard

Returns the filename of the desktop entry.

◆ icon()

QString DesktopEntry::icon ( ) const
inlinenodiscard

Returns the icon name of the desktop entry.

◆ isValid()

bool DesktopEntry::isValid ( ) const
inlinenodiscard

Checks if the desktop entry is valid.

◆ mimeTypes()

QStringList DesktopEntry::mimeTypes ( ) const
inlinenodiscard

Returns the MIME types of the desktop entry.

◆ name()

QString DesktopEntry::name ( ) const
nodiscard

Returns the name of the desktop entry.

◆ noDisplay()

bool DesktopEntry::noDisplay ( ) const
inlinenodiscard

Returns whether the desktop entry has NoDisplay set (hidden from menus).

◆ parse()

bool DesktopEntry::parse ( const QString & filename)

Parses the given .desktop file.

Parameters
filenameThe path to the .desktop file.
Returns
True if parsing was successful, false otherwise.

◆ startupWMClass()

QString DesktopEntry::startupWMClass ( ) const
inlinenodiscard

Returns the startup WM class of the desktop entry.


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