kdesktopfile.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#ifndef _KDESKTOPFILE_H
00020
#define _KDESKTOPFILE_H
00021
00022
#include "kconfig.h"
00023
#include "kdelibs_export.h"
00024
00025
class KDesktopFilePrivate;
00026
00034 class KDECORE_EXPORT KDesktopFile :
public KConfig
00035 {
00036 Q_OBJECT
00037
00038
public:
00051 KDesktopFile(
const QString &fileName,
bool readOnly =
false,
00052
const char * resType =
"apps");
00053
00059
virtual ~KDesktopFile();
00060
00070
static bool isDesktopFile(
const QString& path);
00071
00081
static bool isAuthorizedDesktopFile(
const QString& path);
00082
00088
static QString locateLocal(
const QString &path);
00089
00094
QString readType()
const;
00095
00100
QString readIcon()
const;
00101
00106
QString readName()
const;
00107
00112
QString readComment()
const;
00113
00118
QString readGenericName()
const;
00119
00124
QString readPath()
const;
00125
00130
QString readDevice()
const;
00131
00136
QString readURL()
const;
00137
00142
QStringList readActions()
const;
00143
00148
void setActionGroup(
const QString &group);
00149
00155
bool hasActionGroup(
const QString &group)
const;
00156
00163
bool hasLinkType()
const;
00164
00169
bool hasApplicationType()
const;
00170
00175
bool hasMimeTypeType()
const;
00176
00181
bool hasDeviceType()
const;
00182
00188
bool tryExec()
const;
00189
00194
QString fileName()
const;
00195
00200
QString resource()
const;
00201
00209
QString readDocPath()
const;
00210
00215
QStringList sortOrder()
const;
00216
00227 KDesktopFile* copyTo(
const QString &file)
const;
00228
00229
#ifdef KDE_NO_COMPAT
00230
private:
00231
#endif
00232
00235 KDE_DEPRECATED
QString filename()
const {
return fileName(); };
00236
00237
private:
00238
00239
00240 KDesktopFile(
const KDesktopFile& );
00241 KDesktopFile& operator= (
const KDesktopFile& );
00242
00243
protected:
00244
virtual void virtual_hook(
int id,
void* data );
00245
private:
00246 KDesktopFilePrivate *d;
00247 };
00248
00249
00250
#endif
00251
This file is part of the documentation for kdecore Library Version 3.4.0.