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
00091 bool isValid() const;
00092
00096 bool isDeleted() const;
00097
00106 QVariant property(const QString &name) const;
00107
00113 QStringList propertyNames() const;
00114
00118 void setDeleted( bool deleted );
00119
00120
00121
00122
00123
00124 bool isSeparator() const;
00125
00130 int offset() const;
00131
00137 void save(QDataStream &s);
00138
00139
00140
00141 protected:
00142 KSycocaEntry(KSycocaEntryPrivate &d);
00143 KSycocaEntryPrivate *d_ptr;
00144
00145 private:
00146 Q_DISABLE_COPY(KSycocaEntry)
00147
00148 Q_DECLARE_PRIVATE(KSycocaEntry)
00149 };
00150
00151 #endif