• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • config
kdesktopfile.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (c) 1999 Pietro Iglio <iglio@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19#ifndef KDESKTOPFILE_H
20#define KDESKTOPFILE_H
21
22#include <kconfig.h>
23
24class KConfigGroup;
25class KDesktopFilePrivate;
26
38class KDECORE_EXPORT KDesktopFile : public KConfig
39{
40public:
53 explicit KDesktopFile(const char *resourceType, const QString &fileName);
54
64 explicit KDesktopFile(const QString &fileName);
65
71 virtual ~KDesktopFile();
72
82 static bool isDesktopFile(const QString& path);
83
99 static bool isAuthorizedDesktopFile(const QString& path);
100
105 static QString locateLocal(const QString &path);
106
107 KConfigGroup desktopGroup() const;
108
113 QString readType() const;
114
119 QString readIcon() const;
120
125 QString readName() const;
126
131 QString readComment() const;
132
137 QString readGenericName() const;
138
143 QString readPath() const;
144
149 QString readDevice() const;
150
155 QString readUrl() const;
156
161 QStringList readActions() const;
162
167 KConfigGroup actionGroup(const QString &group);
168
169 const KConfigGroup actionGroup(const QString &group) const;
170
176 bool hasActionGroup(const QString &group) const;
177
184 bool hasLinkType() const;
185
190 bool hasApplicationType() const;
191
196 bool hasMimeTypeType() const; // funny name :)
197
202 bool hasDeviceType() const;
203
209 bool tryExec() const;
210
215 QString readDocPath() const;
216
221 QStringList sortOrder() const;
222
229 bool noDisplay() const;
230
240 KDesktopFile* copyTo(const QString &file) const;
241
242 QString fileName() const;
243
244 const char *resource() const;
245
246protected:
250// virtual void virtual_hook( int id, void* data );
251private:
252
253 Q_DISABLE_COPY(KDesktopFile)
254
255 Q_DECLARE_PRIVATE(KDesktopFile)
256};
257
258#endif
KConfigGroup
A class for one specific group in a KConfig object.
Definition: kconfiggroup.h:54
KConfig
The central class of the KDE configuration data system.
Definition: kconfig.h:71
KDesktopFile
KDE Desktop File Management.
Definition: kdesktopfile.h:39
QStringList
QString
kconfig.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal