37 QHash<QString, QString> Name_;
38 QHash<QString, QString> GenericName_;
39 QHash<QString, QString> Comments_;
41 QStringList Categories_;
46 mutable std::optional<QIcon> Icon_;
48 bool IsHidden_ =
false;
110 QString
GetName (
const QString& language)
const;
132 QString
GetComment (
const QString& language)
const;
Describes a single XDG .desktop entry.
QIcon GetIcon(const ICoreProxy_ptr &) const
Returns the icon previously set by SetIcon().
void Execute(const ICoreProxy_ptr &proxy) const
Executes this item, if possible.
QString GetCommand() const
Returns type type-specific command for this item.
bool IsValid() const
Checks whether this XDG item is valid.
static Item_ptr FromDesktopFile(const QString &file)
Loads the XDG .desktop item from file.
Type GetType() const
Returns the type of this item.
QString GetWorkingDirectory() const
Returns the working directory for command execution.
QString GetComment(const QString &language) const
Returns the comment of this item.
QString GetPermanentID() const
Returns the permanent ID of this item.
bool IsHidden() const
Checks whether this XDG item should be hidden.
QString GetGenericName(const QString &language) const
Returns the generic name of this item.
QString GetName(const QString &language) const
Returns the name of this item.
QString GetIconName() const
Returns the name of the icon for this item.
QStringList GetCategories() const
Returns the categories where this item belongs.
QDebug DebugPrint(QDebug stream) const
Serializes item contents to the debugging stream.
auto operator==(const T &left, const T &right)
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
std::shared_ptr< Item > Item_ptr
Type
Describes the various types of XDG .desktop files.
QDebug operator<<(QDebug dbg, const Item &item)
Serializes item contents to the debugging stream.