|
|
KDE Desktop File Management.
See also: KConfigBase, KConfig
KDesktopFile ( const QString &pFileName, bool bReadOnly = false, const QString &resType = QString::fromLatin1("apps")) |
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 () |
Destructor.
Write back any dirty configuration entries.
bool isDesktopFile (const QString& path) |
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".
@eturn true
if the file appears to be a desktop file.
QString readType () |
Retrieve the value of the "Type=" entry.
QString readIcon () |
Retrieve the value of the "Icon=" entry.
QString readName () |
Retrieve the value of the "Name=" entry.
QString readComment () |
Retrieve the value of the "Comment=" entry.
QString readPath () |
Retrieve the value of the "Path=" entry.
QString readURL () |
Retrieve the value of the "URL=" entry.
QStringList readActions () |
Returns a list of the "Actions=" entries.
void setActionGroup (const QString &group) |
Sets the desktop action group.
bool hasActionGroup (const QString &group) |
Returns if
the action group exists.
bool hasLinkType () |
Check to see if there is a "Type=Link" entry.
The link points to the "URL=" entry.
bool hasApplicationType () |
Check to see if there is an entry "Type=Application".
bool hasMimeTypeType () |
Check to see if there is an entry "Type=MimeType".
bool hasDeviceType () |
Check to see if there is an entry "Type=FSDev".
bool tryExec () |
Check to see if the TryExec field contains a binary which is found on the local system.
QString filename () |
Returns: The filename as passed to the constructor.
QString resource () |
Returns: The resource type as passed to the constructor.