KDECore
kservicetype.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
00020
00021 #ifndef __kservicetype_h__
00022 #define __kservicetype_h__
00023
00024 #include <ksycocaentry.h>
00025
00026 #include <QtCore/QString>
00027 #include <QtCore/QStringList>
00028 #include <QtCore/QMap>
00029 #include <QtCore/QVariant>
00030
00031 #include <kconfig.h>
00032
00033 class KDesktopFile;
00034 class KServiceTypePrivate;
00035
00043 class KDECORE_EXPORT KServiceType : public KSycocaEntry
00044 {
00045 public:
00046 typedef KSharedPtr<KServiceType> Ptr;
00047 typedef QList<Ptr> List;
00048
00053 explicit KServiceType( KDesktopFile *config );
00054
00059 KServiceType( QDataStream& _str, int offset );
00060
00061 virtual ~KServiceType();
00062
00067 QString comment() const;
00068
00075 KDE_DEPRECATED QString desktopEntryPath() const;
00076
00082 bool isDerived() const;
00083
00090 QString parentServiceType() const;
00091
00096 bool inherits( const QString& servTypeName ) const;
00097
00105 QVariant::Type propertyDef( const QString& _name ) const;
00106
00120 QStringList propertyDefNames() const;
00121
00123 QMap<QString,QVariant::Type> propertyDefs() const;
00124
00129 Ptr parentType();
00134 void setServiceOffersOffset( int offset );
00138 int serviceOffersOffset() const;
00139
00147 static Ptr serviceType( const QString& _name );
00148
00157 static List allServiceTypes();
00158
00159 protected:
00160
00166 KServiceType( KServiceTypePrivate &dd);
00167
00177 KServiceType( KServiceTypePrivate &dd, const QString& _name,
00178 const QString& _comment );
00179
00180 private:
00181 Q_DECLARE_PRIVATE(KServiceType)
00182 };
00183
00184
00185
00186
00187 #endif