KDECore
ksycocaentry.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
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
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
00130
00131 bool isSeparator() const;
00132
00137 int offset() const;
00138
00144 void save(QDataStream &s);
00145
00146
00147
00148 protected:
00149 KSycocaEntry(KSycocaEntryPrivate &d);
00150 KSycocaEntryPrivate *d_ptr;
00151
00152 private:
00153 Q_DISABLE_COPY(KSycocaEntry)
00154
00155 Q_DECLARE_PRIVATE(KSycocaEntry)
00156 };
00157
00158 #endif