00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __koPictureKey_h__
00021 #define __koPictureKey_h__
00022
00023 #include <QString>
00024 #include <QDateTime>
00025 #include <koffice_export.h>
00031 class QDomElement;
00032
00033 namespace KoPictureType
00034 {
00044 const int formatVersionQPicture=-1;
00045
00046 enum Type
00047 {
00048 TypeUnknown = 0,
00049 TypeImage,
00050 TypeEps,
00051 TypeClipart,
00052 TypeWmf
00053 };
00054 }
00055
00075 class KOFFICECORE_EXPORT KoPictureKey
00076 {
00077 public:
00081 KoPictureKey();
00082
00090 KoPictureKey( const QString &fn, const QDateTime &mod );
00091
00096 KoPictureKey( const QString &fn );
00097
00101 KoPictureKey( const KoPictureKey &key );
00102
00106 KoPictureKey &operator=( const KoPictureKey &key );
00107
00111 bool operator==( const KoPictureKey &key ) const;
00112
00117 bool operator<( const KoPictureKey &key ) const;
00118
00122 QString toString() const;
00123
00127 void saveAttributes( QDomElement &elem ) const;
00128
00132 void loadAttributes( const QDomElement &elem );
00133
00137 QString filename() const { return m_filename; }
00138
00142 QDateTime lastModified() const { return m_lastModified; }
00143
00147 void setKeyFromFile (const QString& filename);
00148
00149 protected:
00150 QString m_filename;
00151 QDateTime m_lastModified;
00152 };
00153
00154 #endif