.TH "KDesktopFile" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDesktopFile \- \fBKDE\fP Desktop File Management. \fBKDE\fP Desktop File Management class.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdesktopfile.h>\fP
.PP
Inherits \fBKConfig\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDesktopFile\fP (const  \fBQString\fP &fileName, bool readOnly=false, const  char *resType='apps')"
.br
.RI "\fIConstructs a KDesktopFile object and make it either read-write or read-only. \fP"
.ti -1c
.RI "virtual \fB~KDesktopFile\fP ()"
.br
.RI "\fIDestructs the KDesktopFile object. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadType\fP () const "
.br
.RI "\fIReturns the value of the 'Type=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadIcon\fP () const "
.br
.RI "\fIReturns the value of the 'Icon=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadName\fP () const "
.br
.RI "\fIReturns the value of the 'Name=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadComment\fP () const "
.br
.RI "\fIReturns the value of the 'Comment=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadGenericName\fP () const "
.br
.RI "\fIReturns the value of the 'GenericName=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadPath\fP () const "
.br
.RI "\fIReturns the value of the 'Path=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadDevice\fP () const "
.br
.RI "\fIReturns the value of the 'Dev=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadURL\fP () const "
.br
.RI "\fIReturns the value of the 'URL=' entry. \fP"
.ti -1c
.RI "\fBQStringList\fP \fBreadActions\fP () const "
.br
.RI "\fIReturns a list of the 'Actions=' entries. \fP"
.ti -1c
.RI "void \fBsetActionGroup\fP (const  \fBQString\fP &group)"
.br
.RI "\fISets the desktop action group. \fP"
.ti -1c
.RI "bool \fBhasActionGroup\fP (const  \fBQString\fP &group) const "
.br
.RI "\fIReturns true if the action group exists, false otherwise. \fP"
.ti -1c
.RI "bool \fBhasLinkType\fP () const "
.br
.RI "\fIChecks whether there is a 'Type=Link' entry. \fP"
.ti -1c
.RI "bool \fBhasApplicationType\fP () const "
.br
.RI "\fIChecks whether there is an entry 'Type=Application'. \fP"
.ti -1c
.RI "bool \fBhasMimeTypeType\fP () const "
.br
.RI "\fIChecks whether there is an entry 'Type=MimeType'. \fP"
.ti -1c
.RI "bool \fBhasDeviceType\fP () const "
.br
.RI "\fIChecks whether there is an entry 'Type=FSDev'. \fP"
.ti -1c
.RI "bool \fBtryExec\fP () const "
.br
.RI "\fIChecks whether the TryExec field contains a binary which is found on the local system. \fP"
.ti -1c
.RI "\fBQString\fP \fBfileName\fP () const "
.br
.RI "\fIReturns the file name. \fP"
.ti -1c
.RI "\fBQString\fP \fBresource\fP () const "
.br
.RI "\fIReturns the resource. \fP"
.ti -1c
.RI "\fBQString\fP \fBreadDocPath\fP () const "
.br
.RI "\fIReturns the value of the 'DocPath=' entry. \fP"
.ti -1c
.RI "\fBQStringList\fP \fBsortOrder\fP () const "
.br
.RI "\fIReturns the entry of the 'SortOrder=' entry. \fP"
.ti -1c
.RI "\fBQString\fP \fBfilename\fP () const "
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP Use \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "bool \fBisDesktopFile\fP (const  \fBQString\fP &path)"
.br
.RI "\fIChecks whether this is really a desktop file. \fP"
.ti -1c
.RI "bool \fBisAuthorizedDesktopFile\fP (const  \fBQString\fP &path)"
.br
.RI "\fIChecks whether the user is authorized to run this desktop file. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
\fBKDE\fP Desktop File Management. \fBKDE\fP Desktop File Management class. 

\fBAuthor:\fP
.RS 4
Pietro Iglio <iglio@kde.org> 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkdesktopfile.h\fP,v 1.30 2002/09/28 12:28:47 tjansen Exp 
.RE
.PP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKConfigBase\fP \fBKConfig\fP 
.RE
.PP

.PP
Definition at line 36 of file kdesktopfile.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDesktopFile::KDesktopFile (const \fBQString\fP & fileName, bool readOnly = false, const char * resType = 'apps')"
.PP
Constructs a KDesktopFile object and make it either read-write or read-only. \fBParameters:\fP
.RS 4
\fIfileName\fP The name or path of the desktop file. If it is not absolute, it will be located using the resource type \fCresType\fP. 
.br
\fIreadOnly\fP Whether the object should be read-only. 
.br
\fIresType\fP Allows you to change what sort of resource to search for if \fCfileName\fP is not absolute. For instance, you might want to specify 'config'. 
.RE
.PP
Definition at line 38 of file kdesktopfile.cpp.
.PP
References KConfigBase::backEnd, KConfigBackEnd::changeFileName(), KConfig::reparseConfiguration(), KConfigBase::setDesktopGroup(), and KConfigBase::setReadOnly().
.SS "KDesktopFile::~\fBKDesktopFile\fP ()\fC [virtual]\fP"
.PP
Destructs the KDesktopFile object. Writes back any dirty configuration entries. Definition at line 51 of file kdesktopfile.cpp.
.SH "Member Function Documentation"
.PP 
.SS "bool KDesktopFile::isDesktopFile (const \fBQString\fP & path)\fC [static]\fP"
.PP
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'. 
.PP
\fBParameters:\fP
.RS 4
\fIpath\fP the path of the file to check 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the file appears to be a desktop file. 
.RE
.PP
Definition at line 56 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), QString::length(), and QString::right().
.SS "bool KDesktopFile::isAuthorizedDesktopFile (const \fBQString\fP & path)\fC [static]\fP"
.PP
Checks whether the user is authorized to run this desktop file. By default users are authorized to run all desktop files but the KIOSK framework can be used to activate certain restrictions. See README.kiosk for more information. 
.PP
\fBParameters:\fP
.RS 4
\fIpath\fP the file to check 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the user is authorized to run the file 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 68 of file kdesktopfile.cpp.
.PP
References KGlobal::dirs(), QString::isEmpty(), KStandardDirs::relativeLocation(), and QString::startsWith().
.SS "\fBQString\fP KDesktopFile::readType () const"
.PP
Returns the value of the 'Type=' entry. \fBReturns:\fP
.RS 4
the type or QString::null if not specified 
.RE
.PP
Definition at line 91 of file kdesktopfile.cpp.
.PP
References KConfigBase::readEntry().
.SS "\fBQString\fP KDesktopFile::readIcon () const"
.PP
Returns the value of the 'Icon=' entry. \fBReturns:\fP
.RS 4
the icon or QString::null if not specified 
.RE
.PP
Definition at line 96 of file kdesktopfile.cpp.
.PP
References KConfigBase::readEntry().
.SS "\fBQString\fP KDesktopFile::readName () const"
.PP
Returns the value of the 'Name=' entry. \fBReturns:\fP
.RS 4
the name or QString::null if not specified 
.RE
.PP
Definition at line 101 of file kdesktopfile.cpp.
.PP
References KConfigBase::readEntry().
.SS "\fBQString\fP KDesktopFile::readComment () const"
.PP
Returns the value of the 'Comment=' entry. \fBReturns:\fP
.RS 4
the comment or QString::null if not specified 
.RE
.PP
Definition at line 106 of file kdesktopfile.cpp.
.PP
References KConfigBase::readEntry().
.SS "\fBQString\fP KDesktopFile::readGenericName () const"
.PP
Returns the value of the 'GenericName=' entry. \fBReturns:\fP
.RS 4
the generic name or QString::null if not specified 
.RE
.PP
Definition at line 111 of file kdesktopfile.cpp.
.PP
References KConfigBase::readEntry().
.SS "\fBQString\fP KDesktopFile::readPath () const"
.PP
Returns the value of the 'Path=' entry. \fBReturns:\fP
.RS 4
the path or QString::null if not specified \fBThis class or method is obsolete, it is provided for compatibility only.\fP 
.RE
.PP
Definition at line 116 of file kdesktopfile.cpp.
.PP
References KConfigBase::readPathEntry().
.SS "\fBQString\fP KDesktopFile::readDevice () const"
.PP
Returns the value of the 'Dev=' entry. \fBReturns:\fP
.RS 4
the device or QString::null if not specified 
.RE
.PP
Definition at line 121 of file kdesktopfile.cpp.
.PP
References KConfigBase::readEntry().
.PP
Referenced by readURL().
.SS "\fBQString\fP KDesktopFile::readURL () const"
.PP
Returns the value of the 'URL=' entry. \fBReturns:\fP
.RS 4
the URL or QString::null if not specified 
.RE
.PP
Definition at line 126 of file kdesktopfile.cpp.
.PP
References QFile::close(), QFile::exists(), QString::fromLatin1(), hasDeviceType(), QString::isEmpty(), QCString::isEmpty(), QFile::open(), readDevice(), QTextStream::readLine(), KConfigBase::readPathEntry(), QTextStream::setEncoding(), KURL::setPath(), QString::simplifyWhiteSpace(), QStringList::split(), and KURL::url().
.SS "\fBQStringList\fP KDesktopFile::readActions () const"
.PP
Returns a list of the 'Actions=' entries. \fBReturns:\fP
.RS 4
the list of actions 
.RE
.PP
Definition at line 176 of file kdesktopfile.cpp.
.PP
References KConfigBase::readListEntry().
.SS "void KDesktopFile::setActionGroup (const \fBQString\fP & group)"
.PP
Sets the desktop action group. \fBParameters:\fP
.RS 4
\fIthe\fP new action group 
.RE
.PP
Definition at line 181 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), and KConfigBase::setGroup().
.SS "bool KDesktopFile::hasActionGroup (const \fBQString\fP & group) const"
.PP
Returns true if the action group exists, false otherwise. \fBParameters:\fP
.RS 4
\fIthe\fP action group to test 
.RE
.PP
\fBReturns:\fP
.RS 4
true if the action group exists 
.RE
.PP
Definition at line 186 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), and KConfigBase::hasGroup().
.SS "bool KDesktopFile::hasLinkType () const"
.PP
Checks whether there is a 'Type=Link' entry. The link points to the 'URL=' entry. 
.PP
\fBReturns:\fP
.RS 4
true if there is a 'Type=Link' entry 
.RE
.PP
Definition at line 191 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), and KConfigBase::readEntry().
.SS "bool KDesktopFile::hasApplicationType () const"
.PP
Checks whether there is an entry 'Type=Application'. \fBReturns:\fP
.RS 4
true if there is a 'Type=Application' entry 
.RE
.PP
Definition at line 196 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), and KConfigBase::readEntry().
.SS "bool KDesktopFile::hasMimeTypeType () const"
.PP
Checks whether there is an entry 'Type=MimeType'. \fBReturns:\fP
.RS 4
true if there is a 'Type=MimeType' entry 
.RE
.PP
Definition at line 201 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), and KConfigBase::readEntry().
.SS "bool KDesktopFile::hasDeviceType () const"
.PP
Checks whether there is an entry 'Type=FSDev'. \fBReturns:\fP
.RS 4
true if there is a 'Type=FSDev' entry 
.RE
.PP
Definition at line 206 of file kdesktopfile.cpp.
.PP
References QString::fromLatin1(), and KConfigBase::readEntry().
.PP
Referenced by readURL().
.SS "bool KDesktopFile::tryExec () const"
.PP
Checks whether the TryExec field contains a binary which is found on the local system. \fBReturns:\fP
.RS 4
true if TryExec contains an existing binary 
.RE
.PP
Definition at line 212 of file kdesktopfile.cpp.
.PP
References QFile::decodeName(), QFile::encodeName(), QString::isEmpty(), KConfigBase::readBoolEntry(), KConfigBase::readEntry(), KConfigBase::readListEntry(), KConfigBase::readPathEntry(), and QStringList::split().
.SS "\fBQString\fP KDesktopFile::fileName () const"
.PP
Returns the file name. \fBReturns:\fP
.RS 4
The filename as passed to the constructor. 
.RE
.PP
Definition at line 273 of file kdesktopfile.cpp.
.PP
References KConfigBase::backEnd, and KConfigBackEnd::fileName().
.PP
Referenced by filename().
.SS "\fBQString\fP KDesktopFile::resource () const"
.PP
Returns the resource. \fBReturns:\fP
.RS 4
The resource type as passed to the constructor. 
.RE
.PP
Definition at line 279 of file kdesktopfile.cpp.
.PP
References KConfigBase::backEnd, and KConfigBackEnd::resource().
.SS "\fBQString\fP KDesktopFile::readDocPath () const"
.PP
Returns the value of the 'DocPath=' entry. \fBReturns:\fP
.RS 4
The value of the 'DocPath=' entry. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP
Definition at line 290 of file kdesktopfile.cpp.
.PP
References KConfigBase::readPathEntry().
.SS "\fBQStringList\fP KDesktopFile::sortOrder () const"
.PP
Returns the entry of the 'SortOrder=' entry. \fBReturns:\fP
.RS 4
the value of the 'SortOrder=' entry. 
.RE
.PP
Definition at line 282 of file kdesktopfile.cpp.
.PP
References KConfigBase::readListEntry().
.SS "\fBQString\fP KDesktopFile::filename () const\fC [inline]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP Use \fBSee also:\fP
.RS 4
\fBfileName()\fP instead. 
.RE
.PP
Definition at line 218 of file kdesktopfile.h.
.PP
References fileName().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
