kdecore Library API Documentation

kdesktopfile.h

00001 /* This file is part of the KDE libraries 00002 Copyright (c) 1999 Pietro Iglio <iglio@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 // $Id: kdesktopfile.h,v 1.36 2003/09/19 22:51:47 hausmann Exp $ 00020 00021 #ifndef _KDESKTOPFILE_H 00022 #define _KDESKTOPFILE_H 00023 00024 #include "kconfig.h" 00025 #include "kdemacros.h" 00026 00027 class KDesktopFilePrivate; 00028 00037 class KDesktopFile : public KConfig 00038 { 00039 Q_OBJECT 00040 00041 public: 00054 KDesktopFile( const QString &fileName, bool readOnly = false, 00055 const char * resType = "apps"); 00056 00062 virtual ~KDesktopFile(); 00063 00073 static bool isDesktopFile(const QString& path); 00074 00084 static bool isAuthorizedDesktopFile(const QString& path); 00085 00091 static QString locateLocal(const QString &path); 00092 00097 QString readType() const; 00098 00103 QString readIcon() const; 00104 00109 QString readName() const; 00110 00115 QString readComment() const; 00116 00121 QString readGenericName() const; 00122 00127 QString readPath() const; 00128 00133 QString readDevice() const; 00134 00139 QString readURL() const; 00140 00145 QStringList readActions() const; 00146 00151 void setActionGroup(const QString &group); 00152 00158 bool hasActionGroup(const QString &group) const; 00159 00166 bool hasLinkType() const; 00167 00172 bool hasApplicationType() const; 00173 00178 bool hasMimeTypeType() const; // funny name :) 00179 00184 bool hasDeviceType() const; 00185 00191 bool tryExec() const; 00192 00197 QString fileName() const; 00198 00203 QString resource() const; 00204 00210 QString readDocPath() const; 00211 00216 QStringList sortOrder() const; 00217 00228 KDesktopFile* copyTo(const QString &file) const; 00229 00230 #ifdef KDE_NO_COMPAT 00231 private: 00232 #endif 00233 00236 KDE_DEPRECATED QString filename() const { return fileName(); }; 00237 00238 private: 00239 00240 // copy-construction and assignment are not allowed 00241 KDesktopFile( const KDesktopFile& ); 00242 KDesktopFile& operator= ( const KDesktopFile& ); 00243 00244 protected: 00245 virtual void virtual_hook( int id, void* data ); 00246 private: 00247 KDesktopFilePrivate *d; 00248 }; 00249 00250 00251 #endif 00252
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 10 18:54:55 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003