lib Library API Documentation

koPictureKey.h

00001 /* This file is part of the KDE project
00002    Copyright (c) 2001 Simon Hausmann <hausmann@kde.org>
00003    Copyright (C) 2002 Nicolas GOUTTE <goutte@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 #ifndef __koPictureKey_h__
00021 #define __koPictureKey_h__
00022 
00023 #include <qstring.h>
00024 #include <qdatetime.h>
00025 
00026 class QDomElement;
00027 
00028 namespace KoPictureType
00029 {
00030     // 3 = Qt 2.1.x and later
00031     // 4 = Qt 3.0
00032     // 5 = Qt 3.1 and later
00033     // -1 = current QT
00034     const int formatVersionQPicture=-1;
00035 
00036     enum Type
00037     {
00038         TypeUnknown = 0,
00039         TypeImage,          
00040         TypeEps,            
00041         TypeClipart,        
00042         TypeWmf             
00043     };
00044 }
00045 
00046 // TODO: correct documentation
00047 
00055 class KoPictureKey
00056 {
00057 public:
00061     KoPictureKey();
00062 
00069     KoPictureKey( const QString &fn, const QDateTime &mod );
00070 
00074     KoPictureKey( const QString &fn );
00075 
00079     KoPictureKey( const KoPictureKey &key );
00080 
00084     KoPictureKey &operator=( const KoPictureKey &key );
00085 
00089     bool operator==( const KoPictureKey &key ) const;
00090 
00094     bool operator<( const KoPictureKey &key ) const;
00095 
00099     QString toString() const;
00100 
00104     void saveAttributes( QDomElement &elem ) const;
00105 
00109     void loadAttributes( const QDomElement &elem );
00110 
00114     QString filename() const { return m_filename; }
00115 
00119     QDateTime lastModified() const { return m_lastModified; }
00120 
00124     void setKeyFromFile (const QString& filename);
00125 
00126 protected:
00127     QString m_filename;
00128     QDateTime m_lastModified;
00129 };
00130 
00131 #endif /* __koPictureKey_h__ */
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 13:19:24 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2003