LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::XDG Namespace Reference

Classes

class  DesktopParser
 A parser for XDG .desktop files. More...
 
class  DesktopParserTest
 
class  Item
 Describes a single XDG .desktop entry. More...
 
class  ItemsDatabase
 An ItemsFinder automatically watching for changes in .desktop files. More...
 
class  ItemsFinder
 Finds and parses XDG .desktop files. More...
 

Typedefs

using Item_ptr = std::shared_ptr<Item>
 
using Cat2Items_t = QHash<QString, QList<Item_ptr>>
 

Enumerations

enum class  Type {
  Other ,
  Application ,
  URL ,
  Dir
}
 Describes the various types of XDG .desktop files. More...
 

Functions

bool operator== (const Item &left, const Item &right)
 
bool operator!= (const Item &left, const Item &right)
 
QDebug operator<< (QDebug stream, const Item &item)
 Serializes item contents to the debugging stream.
 
QStringList ToPaths (const QList< Type > &types)
 Returns a set of typical directories with desktop files of the given types.
 
DesktopParser::LangValue_t SingleValue (const QString &val)
 
QIcon GetAppIcon (const QString &name)
 
QPixmap GetAppPixmap (const QString &name)
 

Variables

class UTIL_XDG_API Item
 
class UTIL_XDG_API ItemsFinder
 

Typedef Documentation

◆ Cat2Items_t

◆ Item_ptr

typedef std::shared_ptr< Item > LC::Util::XDG::Item_ptr = std::shared_ptr<Item>

Definition at line 24 of file item.h.

Enumeration Type Documentation

◆ Type

Describes the various types of XDG .desktop files.

Enumerator
Other 

Unknown type.

Application 

A shortcut to an application.

URL 

A shortcut to an URL.

Dir 

A shortcut to a directory.

Definition at line 23 of file itemtypes.h.

Function Documentation

◆ GetAppIcon()

UTIL_XDG_API QIcon LC::Util::XDG::GetAppIcon ( const QString & name)

Definition at line 15 of file xdg.cpp.

References LC::Util::Filter(), and GetAppPixmap().

+ Here is the call graph for this function:

◆ GetAppPixmap()

UTIL_XDG_API QPixmap LC::Util::XDG::GetAppPixmap ( const QString & name)

Definition at line 20 of file xdg.cpp.

References LC::Util::Filter().

Referenced by GetAppIcon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator!=()

bool LC::Util::XDG::operator!= ( const Item & left,
const Item & right )

The icon field obtained via GetIcon() is not checked for equality.

Parameters
[in]leftFirst XDG item to check for inequality.
[in]rightSecond XDG item to check for inequality.
Returns
Whether left and right are not equal.

Definition at line 36 of file item.cpp.

◆ operator<<()

QDebug LC::Util::XDG::operator<< ( QDebug stream,
const Item & item )

Serializes item contents to the debugging stream.

This function is provided for convenience to pretty-print contents of item to a debugging stream.

Parameters
[in]streamThe debug stream to print to.
[in]itemThe XDG item to print.
Returns
The debugging stream with the contents of the item.

Definition at line 239 of file item.cpp.

References LC::Util::Filter().

+ Here is the call graph for this function:

◆ operator==()

bool LC::Util::XDG::operator== ( const Item & left,
const Item & right )

The icon field obtained via GetIcon() is not checked for equality.

Parameters
[in]leftFirst XDG item to check for equality.
[in]rightSecond XDG item to check for equality.
Returns
Whether left and right are equal.

Definition at line 23 of file item.cpp.

◆ SingleValue()

DesktopParser::LangValue_t LC::Util::XDG::SingleValue ( const QString & val)

Definition at line 27 of file desktopparsertest.cpp.

References LC::Util::Filter().

+ Here is the call graph for this function:

◆ ToPaths()

UTIL_XDG_API QStringList LC::Util::XDG::ToPaths ( const QList< Type > & types)

Returns a set of typical directories with desktop files of the given types.

Parameters
[in]typesThe types of the interesting .desktop files.
Returns
The list of the directories where the said files typically reside.

Definition at line 60 of file itemtypes.cpp.

References LC::Util::ConcatMap(), and LC::Util::Filter().

Referenced by LC::Util::XDG::ItemsDatabase::ItemsDatabase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ Item

class UTIL_XDG_API LC::Util::XDG::Item

Definition at line 19 of file itemsfinder.h.

◆ ItemsFinder

class UTIL_XDG_API LC::Util::XDG::ItemsFinder

Definition at line 19 of file xdgfwd.h.