kexi

kexireportpart.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Lucijan Busch <lucijan@kde.org>
00003    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
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., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KEXIREPORTPART_H
00022 #define KEXIREPORTPART_H
00023 
00024 #include <kexi.h>
00025 #include <kexipart.h>
00026 #include <kexidialogbase.h>
00027 
00028 namespace KFormDesigner
00029 {
00030     class FormManager;
00031     class WidgetLibrary;
00032     class Form;
00033 }
00034 
00035 namespace KexiDB
00036 {
00037     class FieldList;
00038 }
00039 
00042 class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
00043 {
00044     Q_OBJECT
00045 
00046     public:
00047         KexiReportPart(QObject *parent, const char *name, const QStringList &);
00048         virtual ~KexiReportPart();
00049 
00051         static KFormDesigner::WidgetLibrary* library();
00052 
00053 //      KFormDesigner::FormManager *manager() { return m_manager; }
00054 
00055         void generateForm(KexiDB::FieldList *list, QDomDocument &domDoc);
00056 
00057         class TempData : public KexiDialogTempData
00058         {
00059             public:
00060                 TempData(QObject* parent);
00061                 ~TempData();
00062                 QGuardedPtr<KFormDesigner::Form> form;
00063                 QGuardedPtr<KFormDesigner::Form> previewForm;
00064                 QString tempForm;
00065                 QPoint scrollViewContentsPos; 
00066                 int resizeMode; 
00067         };
00068 
00069         virtual QString i18nMessage(const QCString& englishMessage, 
00070             KexiDialogBase* dlg) const;
00071 
00072     protected:
00073         virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
00074 
00075         virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
00076             KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
00077 
00078         virtual void initPartActions();
00079         virtual void initInstanceActions();
00080 
00081         static KFormDesigner::WidgetLibrary* static_reportsLibrary;
00082 
00083     private:
00084 //      QGuardedPtr<KFormDesigner::FormManager> m_manager;
00085 };
00086 
00087 #endif
00088 
KDE Home | KDE Accessibility Home | Description of Access Keys