Home · All Classes · Main Classes · Deprecated |
Inherited by MAppletMetaData, and MApplicationExtensionMetaData.
Public Member Functions | |
MDesktopEntry (const QString &fileName) | |
virtual | ~MDesktopEntry () |
QString | fileName () const |
virtual bool | isValid () const |
virtual uint | hash () const |
QString | type () const |
QString | version () const |
QString | name () const |
QString | nameUnlocalized () const |
QString | genericName () const |
bool | noDisplay () const |
QString | comment () const |
QString | icon () const |
bool | hidden () const |
QStringList | onlyShowIn () const |
QStringList | notShowIn () const |
QString | tryExec () const |
QString | exec () const |
QString | path () const |
bool | terminal () const |
QStringList | mimeType () const |
QStringList | categories () const |
bool | startupNotify () const |
QString | startupWMClass () const |
QString | url () const |
QString | xMaemoService () const |
QString | value (const QString &key) const |
QString | value (const QString &group, const QString &key) const |
bool | contains (const QString &key) const |
bool | contains (const QString &group, const QString &key) const |
Static Public Member Functions | |
static bool | readDesktopFile (QIODevice &device, QMap< QString, QString > &desktopEntriesMap) |
MDesktopEntry provides the means to read freedesktop.org desktop entry files.
MDesktopEntry object reads desktop file data from the desktop file given as a construction parameter.
The isValid() method determines whether the input desktop file conforms to the standard defined by freedesktop.org.
For more information see: http://standards.freedesktop.org/desktop-entry-spec/latest/index.html
MDesktopEntry::MDesktopEntry | ( | const QString & | fileName | ) |
Reads input desktop file and constructs new MDesktopEntry object of it.
fileName | the name of the file to read the desktop entry from |
MDesktopEntry::~MDesktopEntry | ( | ) | [virtual] |
Destroys the MDesktopEntry.
QStringList MDesktopEntry::categories | ( | ) | const |
Returns the value of Categories key or an empty string list if it is not defined in the input desktop entry file.
QString MDesktopEntry::comment | ( | ) | const |
Returns the value of Comment key or an empty string if it is not defined in the input desktop entry file.
bool MDesktopEntry::contains | ( | const QString & | key | ) | const |
Indicates whether map contains key or not. Returns false if key is not present.
Indicates whether map contains group/key or not. Returns false if key is not present.
QString MDesktopEntry::exec | ( | ) | const |
Returns the value of Exec key or an empty string if it is not defined in the input desktop entry file.
QString MDesktopEntry::fileName | ( | ) | const |
Returns the name of the file where the information for this desktop entry was read from.
QString MDesktopEntry::genericName | ( | ) | const |
Returns the value of GenericName key or an empty string if it is not defined in the input desktop entry file.
uint MDesktopEntry::hash | ( | ) | const [virtual] |
Calculates a hash value based on the required type and name keys of the desktop definition.
bool MDesktopEntry::hidden | ( | ) | const |
Indicates whether value of Hidden key is true or false. Returns false if Hidden key is undefined.
QString MDesktopEntry::icon | ( | ) | const |
Returns the value of Icon key or an empty string if it is not defined in the input desktop entry file.
bool MDesktopEntry::isValid | ( | ) | const [virtual] |
Indicates whether desktop entry information adheres to the requirements set in the freedesktop.org standard. Freedesktop.org defines required keys that one has to fill to have a valid desktop file. This checks whether those keys are defined.
Reimplemented in MApplicationExtensionMetaData, and MAppletMetaData.
QStringList MDesktopEntry::mimeType | ( | ) | const |
Returns the value of MimeTypes key or an empty string list if it is not defined in the input desktop entry file.
QString MDesktopEntry::name | ( | ) | const |
Returns the localized value of Name key or an empty string if it is not defined in the input desktop entry file. The localization requires either a X-MeeGo-Logical-Id attribute with optional X-MeeGo-Translation-Catalog attribute or freedesktop.org standard style localized name attribute. Returns the name as unlocalized if the logical id cannot be found from the catalog.
QString MDesktopEntry::nameUnlocalized | ( | ) | const |
Returns the unlocalized value of Name key or an empty string if it is not defined in the input desktop entry file.
bool MDesktopEntry::noDisplay | ( | ) | const |
Indicates whether value of NoDisplay key is true or false. Returns false if NoDisplay key is undefined.
QStringList MDesktopEntry::notShowIn | ( | ) | const |
Returns the value of NotShowIn key or an empty string list if it is not defined in the input desktop entry file.
QStringList MDesktopEntry::onlyShowIn | ( | ) | const |
Returns the value of OnlyShowIn key or an empty string list if it is not defined in the input desktop entry file.
QString MDesktopEntry::path | ( | ) | const |
Returns the value of Path key or an empty string if it is not defined in the input desktop entry file.
bool MDesktopEntry::startupNotify | ( | ) | const |
Indicates whether value of StartupNotify key is true or false. Returns false if StartupNotify key is undefined.
QString MDesktopEntry::startupWMClass | ( | ) | const |
Returns the value of StartupWMClass key or an empty string if it is not defined in the input desktop entry file.
bool MDesktopEntry::terminal | ( | ) | const |
Indicates whether value of Terminal key is true or false. Returns false if Terminal key is undefined.
QString MDesktopEntry::tryExec | ( | ) | const |
Returns the value of TryExec key or an empty string if it is not defined in the input desktop entry file.
QString MDesktopEntry::type | ( | ) | const |
Returns the value of Type key or an empty string if it is not defined in the input desktop entry file.
QString MDesktopEntry::url | ( | ) | const |
Returns the value of URL key or an empty string if it is not defined in the input desktop entry file.
Returns the value of the group-key stored as "group/key" key or an empty string if it is not defined in the input desktop entry file.
Returns the value of the key- key or an empty string if it is not defined in the input desktop entry file.
QString MDesktopEntry::version | ( | ) | const |
Returns the value of Version key or an empty string if it is not defined in the input desktop entry file.
QString MDesktopEntry::xMaemoService | ( | ) | const |
Returns the value of X-Osso-Service key or an empty string if it is not defined in the input desktop entry file.
Copyright © 2010 Nokia Corporation | MeeGo Touch |