kdesktopfile.h
/* This file is part of the KDE libraries
Copyright (c) 1999 Pietro Iglio <iglio@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KDESKTOPFILE_H
#define _KDESKTOPFILE_H
#include "kconfig.h"
#include "kdelibs_export.h"
class KDesktopFilePrivate;
class KDECORE_EXPORT KDesktopFile : public KConfig
{
Q_OBJECT
public:
KDesktopFile( const QString &fileName, bool readOnly = false,
const char * resType = "apps");
virtual ~KDesktopFile();
static bool isDesktopFile(const QString& path);
static bool isAuthorizedDesktopFile(const QString& path);
static QString locateLocal(const QString &path);
QString readType() const;
QString readIcon() const;
QString readName() const;
QString readComment() const;
QString readGenericName() 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; // funny name :)
bool hasDeviceType() const;
bool tryExec() const;
QString fileName() const;
QString resource() const;
QString readDocPath() const;
QStringList sortOrder() const;
KDesktopFile* copyTo(const QString &file) const;
#ifdef KDE_NO_COMPAT
private:
#endif
KDE_DEPRECATED QString filename() const { return fileName(); };
private:
// copy-construction and assignment are not allowed
KDesktopFile( const KDesktopFile& );
KDesktopFile& operator= ( const KDesktopFile& );
protected:
virtual void virtual_hook( int id, void* data );
private:
KDesktopFilePrivate *d;
};
#endif
KConfig::copyTo
KConfig * copyTo(const QString &file, KConfig *config=0) const
Copies all entries from this config object to a new config object that will save itself to file...
Definition: kconfig.cpp:303
KDesktopFile::filename
KDE_DEPRECATED QString filename() const
Definition: kdesktopfile.h:235
KDesktopFile
KDE Desktop File Management.
Definition: kdesktopfile.h:34
KConfig
Access KDE Configuration entries.
Definition: kconfig.h:43

KDE Home | KDE Accessibility Home | Description of Access Keys