lib

KoDocumentInfoDlg.h

00001 /* This file is part of the KDE project
00002    Copyright (c) 2000 Simon Hausmann <hausmann@kde.org>
00003 
00004    $Id: KoDocumentInfoDlg.h 508787 2006-02-12 18:28:12Z ingwa $
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef __koDocumentInfoDlg_h__
00023 #define __koDocumentInfoDlg_h__
00024 
00025 #include <kpropertiesdialog.h>
00026 #include <koffice_export.h>
00027 
00028 class KDialogBase;
00029 class KoDocumentInfo;
00030 class KoDocumentInfoAuthor;
00031 class KoDocumentInfoAbout;
00032 class KoDocumentInfoUserMetadata;
00033 class KArchiveEntry;
00034 
00035 class KOFFICECORE_EXPORT KoDocumentInfoDlg : public QObject
00036 {
00037   Q_OBJECT
00038 public:
00039   KoDocumentInfoDlg( KoDocumentInfo *docInfo, QWidget *parent = 0, const char *name = 0,
00040              KDialogBase *dialog = 0 );
00041   virtual ~KoDocumentInfoDlg();
00042 
00043   int exec();
00044   KDialogBase *dialog() const;
00045 
00046   void save();
00047 
00048 signals:
00049   void changed();
00050 
00051 private slots:
00052   void loadFromKABC();
00053   void deleteInfo();
00054   void resetMetaData();
00055 
00056 private:
00057   void addAuthorPage( KoDocumentInfoAuthor *authorInfo );
00058   void addAboutPage( KoDocumentInfoAbout *aboutInfo );
00059   void addUserMetadataPage( KoDocumentInfoUserMetadata *userMetadataInfo );
00060 
00061   void save( KoDocumentInfoAuthor *authorInfo );
00062   void save( KoDocumentInfoAbout *aboutInfo );
00063   void save( KoDocumentInfoUserMetadata *userMetadataInfo );
00064 
00065   class KoDocumentInfoDlgPrivate;
00066   KoDocumentInfoDlgPrivate *d;
00067 };
00068 
00069 class KOFFICECORE_EXPORT KoDocumentInfoPropsPage : public KPropsDlgPlugin
00070 {
00071   Q_OBJECT
00072 public:
00073   KoDocumentInfoPropsPage( KPropertiesDialog *props, const char *name = 0,
00074                            const QStringList & = QStringList() );
00075   virtual ~KoDocumentInfoPropsPage();
00076 
00077   virtual void applyChanges();
00078 
00079 private:
00080   void copy( const QString &path, const KArchiveEntry *entry );
00081   class KoDocumentInfoPropsPagePrivate;
00082   KoDocumentInfoPropsPagePrivate *d;
00083 };
00084 
00085 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys