lib Library API Documentation

koDocumentInfo.h

00001 /* This file is part of the KDE project 00002 Copyright (C) 1998, 1999, 2000 Torben Weis <weis@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef KO_DOCUMENT_INFO_H 00021 #define KO_DOCUMENT_INFO_H 00022 00023 #include <qobject.h> 00024 00025 class QString; 00026 class QStringList; 00027 class QDomDocument; 00028 class QDomElement; 00029 00030 class KoDocumentInfoPage; 00031 00032 class KoDocumentInfo : public QObject 00033 { 00034 Q_OBJECT 00035 public: 00036 KoDocumentInfo( QObject* parent = 0, const char* name = 0 ); 00037 virtual ~KoDocumentInfo(); 00038 00039 bool load( const QDomDocument& doc ); 00040 QDomDocument save(); 00041 00046 QString title() const; 00047 00048 KoDocumentInfoPage* page( const QString& name ) const; 00049 QStringList pages() const; 00050 void documentInfochanged() { emit sigDocumentInfoModifed();} 00051 signals: 00052 void sigDocumentInfoModifed(); 00053 }; 00054 00055 class KoDocumentInfoPage : public QObject 00056 { 00057 public: 00058 KoDocumentInfoPage( QObject *parent, const char* name ); 00059 00060 virtual bool load( const QDomElement& e ) = 0; 00061 virtual QDomElement save( QDomDocument& doc ) = 0; 00062 }; 00063 00064 class KoDocumentInfoLog : public KoDocumentInfoPage 00065 { 00066 Q_OBJECT 00067 public: 00068 KoDocumentInfoLog( KoDocumentInfo* info ); 00069 00070 virtual bool load( const QDomElement& e ); 00071 virtual QDomElement save( QDomDocument& doc ); 00072 00073 void setNewLog( const QString& log ); 00074 void setOldLog( const QString& log ); 00075 00076 QString oldLog() const; 00077 QString newLog() const; 00078 00079 private: 00080 QString m_oldLog; 00081 QString m_newLog; 00082 }; 00083 00084 class KoDocumentInfoAuthor : public KoDocumentInfoPage 00085 { 00086 Q_OBJECT 00087 public: 00088 KoDocumentInfoAuthor( KoDocumentInfo* info ); 00089 00090 virtual bool load( const QDomElement& e ); 00091 virtual QDomElement save( QDomDocument& doc ); 00092 00093 QString fullName() const; 00094 QString initial() const; 00095 QString title() const; 00096 QString company() const; 00097 QString email() const; 00098 QString telephone() const; 00099 QString fax() const; 00100 QString country() const; 00101 QString postalCode() const; 00102 QString city() const; 00103 QString street() const; 00104 00105 void setFullName( const QString& n ); 00106 void setTitle( const QString& n ); 00107 void setCompany( const QString& n ); 00108 void setEmail( const QString& n ); 00109 void setTelephone( const QString& n ); 00110 void setFax( const QString& n ); 00111 void setCountry( const QString& n ); 00112 void setPostalCode( const QString& n ); 00113 void setCity( const QString& n ); 00114 void setStreet( const QString& n ); 00115 void setInitial( const QString& n ); 00116 void initParameters(); 00117 00118 private: 00119 QString m_fullName; 00120 QString m_title; 00121 QString m_company; 00122 QString m_email; 00123 QString m_telephone; 00124 QString m_fax; 00125 QString m_country; 00126 QString m_postalCode; 00127 QString m_city; 00128 QString m_street; 00129 QString m_initial; 00130 }; 00131 00132 class KoDocumentInfoAbout : public KoDocumentInfoPage 00133 { 00134 Q_OBJECT 00135 public: 00136 KoDocumentInfoAbout( KoDocumentInfo* info ); 00137 00138 virtual bool load( const QDomElement& e ); 00139 virtual QDomElement save( QDomDocument& doc ); 00140 00141 QString title() const; 00142 QString abstract() const; 00143 00144 void setTitle( const QString& n ); 00145 void setAbstract( const QString& n ); 00146 00147 private: 00148 QString m_title; 00149 QString m_abstract; 00150 }; 00151 00152 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:23 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003