kexi

kexiformpart.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Lucijan Busch <lucijan@kde.org>
3 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
4 Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KEXIFORMPART_H
23#define KEXIFORMPART_H
24
25#include <tqdom.h>
26#include <tqcstring.h>
27
28#include <kexi.h>
29#include <kexipart.h>
30#include <kexidialogbase.h>
31#include <kexiblobbuffer.h>
32
33namespace KFormDesigner
34{
35 class WidgetLibrary;
36 class FormManager;
37 class Form;
38}
39
40namespace KexiDB
41{
42 class FieldList;
43}
44
46
48
49class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
50{
51 TQ_OBJECT
52
53
54 public:
55 KexiFormPart(TQObject *parent, const char *name, const TQStringList &);
56 virtual ~KexiFormPart();
57
60
61 KexiDataSourcePage* dataSourcePage() const;
62
63 void generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc);
64
65 class TempData : public KexiDialogTempData
66 {
67 public:
68 TempData(TQObject* parent);
69 ~TempData();
70 TQGuardedPtr<KFormDesigner::Form> form;
71 TQGuardedPtr<KFormDesigner::Form> previewForm;
72 TQString tempForm;
73 TQPoint scrollViewContentsPos;
74 int resizeMode;
76 TQMap<TQWidget*, KexiBLOBBuffer::Id_t> unsavedLocalBLOBs;
79 TQMap<TQCString, KexiBLOBBuffer::Id_t> unsavedLocalBLOBsByName;
80 };
81
82 virtual TQString i18nMessage(const TQCString& englishMessage,
83 KexiDialogBase* dlg) const;
84
85 protected:
87
88 virtual KexiViewBase* createView(TQWidget *parent, KexiDialogBase* dialog,
89 KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
90
91 virtual void initPartActions();
92 virtual void initInstanceActions();
93 virtual void setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow* mainWin);
94
96
97 protected slots:
98 void slotAutoTabStopsSet(KFormDesigner::Form *form, bool set);
99 void slotAssignAction();
100 void slotPropertyChanged(TQWidget *widget, const TQCString &name, const TQVariant &value);
101 void slotWidgetCreatedByFormsLibrary(TQWidget* widget);
102
103 private:
104 class Private;
105 Private* d;
106};
107
108#endif
109
A class to manage (create/load/save) Forms.
Definition formmanager.h:73
A simple class representing a form.
Definition form.h:136
This class searches for factories and provides TDEActions for widget creation.
A page within form designer's property tabbed pane, providing data source editor.
Base class for child window of Kexi's main application window.
Privides temporary data shared between KexiDialogBase's views (KexiView's).
static KFormDesigner::WidgetLibrary * static_formsLibrary
static KFormDesigner::WidgetLibrary * library()
void generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc)
Information about a single object that can be instantiated using Kexi Part.
The main class for kexi frontend parts like tables, queries, forms and reports.
Definition kexipart.h:66
virtual void setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow *mainWin)
Definition kexipart.cpp:404
virtual KexiDialogTempData * createTempData(KexiDialogBase *dialog)
Definition kexipart.cpp:393
virtual KexiViewBase * createView(TQWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode=Kexi::DataViewMode, TQMap< TQString, TQString > *staticObjectArgs=0)=0
virtual TQString i18nMessage(const TQCString &englishMessage, KexiDialogBase *dlg) const
Definition kexipart.cpp:398
Base class for single view embeddable of in KexiDialogBase.
High-level database connectivity library with database backend drivers.