class KDesktopFile

KDE Desktop File Management class. More...

Definition#include <kdesktopfile.h>
InheritsKConfig [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Protected Methods


Detailed Description

KDE Desktop File Management.

See also: KConfigBase, KConfig

 KDesktopFile ( const QString &fileName, bool readOnly = false, const char * resType = "apps")

KDesktopFile

Constructs a KDesktopFile object and make it either read-write or read-only.

Parameters:
fileNameThe name or path of the desktop file. If it is not absolute, it will be located using the resource type resType.
readOnlyWhether the object should be read-only.
resTypeAllows you to change what sort of resource to search for if fileName is not absolute. For instance, you might want to specify "config".

 ~KDesktopFile ()

~KDesktopFile

[virtual]

Destructs the KDesktopFile object.

Writes back any dirty configuration entries.

bool  isDesktopFile (const QString& path)

isDesktopFile

[static]

Checks whether this is really a desktop file.

The check is performed looking at the file extension (the file is not opened). Currently, valid extensions are ".kdelnk" and ".desktop".

Returns: true if the file appears to be a desktop file.

QString  readType ()

readType

[const]

Returns the value of the "Type=" entry.

QString  readIcon ()

readIcon

[const]

Returns the value of the "Icon=" entry.

QString  readName ()

readName

[const]

Returns the value of the "Name=" entry.

QString  readComment ()

readComment

[const]

Returns the value of the "Comment=" entry.

QString  readGenericName ()

readGenericName

[const]

Returns the value of the "GenericName=" entry.

QString  readPath ()

readPath

[const]

Returns the value of the "Path=" entry.

QString  readDevice ()

readDevice

[const]

Returns the value of the "Dev=" entry.

QString  readURL ()

readURL

[const]

Returns the value of the "URL=" entry.

QStringList  readActions ()

readActions

[const]

Returns a list of the "Actions=" entries.

void  setActionGroup (const QString &group)

setActionGroup

Sets the desktop action group.

bool  hasActionGroup (const QString &group)

hasActionGroup

[const]

Returns true if the action group exists, false otherwise

bool  hasLinkType ()

hasLinkType

[const]

Checks whether there is a "Type=Link" entry.

The link points to the "URL=" entry.

bool  hasApplicationType ()

hasApplicationType

[const]

Checks whether there is an entry "Type=Application".

bool  hasMimeTypeType ()

hasMimeTypeType

[const]

Checks whether there is an entry "Type=MimeType".

bool  hasDeviceType ()

hasDeviceType

[const]

Checks whether there is an entry "Type=FSDev".

bool  tryExec ()

tryExec

[const]

Checks whether the TryExec field contains a binary which is found on the local system.

QString  fileName ()

fileName

[const]

Returns: The filename as passed to the constructor.

QString  resource ()

resource

[const]

Returns: The resource type as passed to the constructor.

QStringList  sortOrder ()

sortOrder

[const]

void  virtual_hook ( int id, void* data )

virtual_hook

[protected virtual]

Reimplemented from KConfig.