KDECore
ksycocaentry.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 * Copyright (C) 1999 Waldo Bastian <bastian@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 version 2 as published by the Free Software Foundation; 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Library General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Library General Public License 00014 * along with this library; see the file COPYING.LIB. If not, write to 00015 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 * Boston, MA 02110-1301, USA. 00017 **/ 00018 00019 #ifndef KSYCOCAENTRY_H 00020 #define KSYCOCAENTRY_H 00021 00022 #include <kglobal.h> 00023 #include <ksycocatype.h> 00024 #include <ksharedptr.h> 00025 00026 #include <QtCore/QDataStream> 00027 #include <QtCore/QStringList> 00028 #include <QtCore/QVariant> 00029 00030 class KSycocaEntryPrivate; 00031 00041 class KDECORE_EXPORT KSycocaEntry : public KShared 00042 { 00043 00044 public: 00045 /* 00046 * constructs a invalid KSycocaEntry object 00047 */ 00048 KSycocaEntry(); 00049 00050 virtual ~KSycocaEntry(); 00051 00055 bool isType(KSycocaType t) const; 00059 KSycocaType sycocaType() const; 00060 00061 typedef KSharedPtr<KSycocaEntry> Ptr; 00062 typedef QList<Ptr> List; 00063 00067 // explicit KSycocaEntry(const QString &path); 00068 00072 static void read( QDataStream &s, QString &str ); 00073 static void read( QDataStream &s, QStringList &list ); 00074 00075 00079 QString name() const; 00080 00086 QString entryPath() const; 00087 00093 QString storageId() const; 00094 00098 bool isValid() const; 00099 00103 bool isDeleted() const; 00104 00113 QVariant property(const QString &name) const; 00114 00120 QStringList propertyNames() const; 00121 00125 void setDeleted( bool deleted ); 00126 00127 00128 /* 00129 * @returns true, if this is a separator 00130 */ 00131 bool isSeparator() const; 00132 00137 int offset() const; 00138 00143 void save(QDataStream &s); 00144 00145 // KSycocaEntry(const KSycocaEntry ©); 00146 // KSycocaEntry &operator=(const KSycocaEntry &right); 00147 protected: 00148 KSycocaEntry(KSycocaEntryPrivate &d); 00149 KSycocaEntryPrivate *d_ptr; 00150 00151 private: 00152 Q_DISABLE_COPY(KSycocaEntry) 00153 00154 Q_DECLARE_PRIVATE(KSycocaEntry) 00155 }; 00156 00157 #endif
KDE 4.6 API Reference