fileprops.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KFILEPROPS_H
00020 #define KFILEPROPS_H
00021
00022 #include <qstring.h>
00023
00024 #include <kfilemetainfo.h>
00025
00026 class FileProps
00027 {
00028 public:
00029 FileProps( const char *argument, const QString& path );
00030 virtual ~FileProps();
00031
00032 bool isValid() const;
00033
00034 QStringList supportedGroups() const;
00035 QStringList availableGroups() const;
00036 QStringList translatedGroups();
00037
00038 QStringList supportedKeys( const QString& group ) const;
00039 QStringList availableKeys( const QString& group ) const;
00040 QStringList preferredKeys( const QString& group ) const;
00041
00042 QStringList supportedKeys() const { return m_info->supportedKeys(); }
00043 QStringList preferredKeys() const { return m_info->preferredKeys(); }
00044
00045 QString getValue( const QString& group, const QString& key ) const;
00046 bool setValue( const QString& group,
00047 const QString& key, const QString &value );
00048
00049 QStringList allValues( const QString& group ) const;
00050 QStringList preferredValues( const QString& group ) const;
00051
00052 const char *argument() const { return m_argument; }
00053
00054 bool isReadOnly( const QString& group, const QString& key );
00055
00056 private:
00057 static QStringList createKeyValueList( const KFileMetaInfoGroup&,
00058 const QStringList& );
00059 bool sync();
00060
00061 KFileMetaInfo *m_info;
00062 const char *m_argument;
00063 bool m_dirty;
00064
00065 };
00066
00067 #endif // KFILEPROPS_H
This file is part of the documentation for kdelibs Version 3.1.0.