# class KDesktopFile | KDE Desktop File Management class. More...
Definition | `#include <kdesktopfile.h>`
Inherits | KConfig [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KDesktopFile ( const QString &pFileName, bool bReadOnly = false, const char * resType = "apps")
- virtual ~KDesktopFile ()
- QString readType () const
- QString readIcon () const
- QString readName () const
- QString readComment () const
- QString readPath () const
- QString readDevice () const
- QString readURL () const
- QStringList readActions () const
- void setActionGroup (const QString &group)
- bool hasActionGroup (const QString &group) const
- bool hasLinkType () const
- bool hasApplicationType () const
- bool hasMimeTypeType () const
- bool hasDeviceType () const
- bool tryExec () const
- QString filename () const
- QString resource () const
- QStringList sortOrder () const

#### Public Static Methods

- static bool isDesktopFile (const QString& path)

## Detailed Description

KDE Desktop File Management.

See also: KConfigBase, KConfig

KDesktopFile ( const QString &pFileName, bool bReadOnly = false, const char * resType = "apps") | ### KDesktopFile

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

Parameters:

pFileName | The file used for saving the data. The full path must be specified.
bReadOnly | Whether the object should be read-only.
resType | Allows you to change what sort of resource to search for if `pFileName` is not absolute. For instance, you might want to specify "config".

~KDesktopFile () | ### ~KDesktopFile

[virtual]

Destructor.

Write back any dirty configuration entries.

bool isDesktopFile (const QString& path) | ### isDesktopFile

[static]

Check to see whether this is 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]

Retrieve the value of the "Type=" entry.

QString readIcon () | ### readIcon

[const]

Retrieve the value of the "Icon=" entry.

QString readName () | ### readName

[const]

Retrieve the value of the "Name=" entry.

QString readComment () | ### readComment

[const]

Retrieve the value of the "Comment=" entry.

QString readPath () | ### readPath

[const]

Retrieve the value of the "Path=" entry.

QString readDevice () | ### readDevice

[const]

Retrieve the value of the "Dev=" entry.

QString readURL () | ### readURL

[const]

Retrieve 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 `if` the action group exists.

bool hasLinkType () | ### hasLinkType

[const]

Check to see if there is a "Type=Link" entry.

The link points to the "URL=" entry.

bool hasApplicationType () | ### hasApplicationType

[const]

Check to see if there is an entry "Type=Application".

bool hasMimeTypeType () | ### hasMimeTypeType

[const]

Check to see if there is an entry "Type=MimeType".

bool hasDeviceType () | ### hasDeviceType

[const]

Check to see if there is an entry "Type=FSDev".

bool tryExec () | ### tryExec

[const]

Check to see if 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]

- Version: $Id: kdesktopfile.h,v 1.19 2000/08/13 22:27:33 faure Exp $
- Author: Pietro Iglio <iglio@kde.org>
- Generated: root@sparc.ports.openbsd.org on Wed May 2 09:34:58 2001, using kdoc 2.0a53.