kexidbfactory.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
3 Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KEXIDBFACTORY_H
22#define KEXIDBFACTORY_H
23
24#include <formeditor/widgetfactory.h>
25
26class TDEAction;
27
28namespace KFormDesigner {
29 class Form;
30 class FormManager;
31}
32
35{
36 TQ_OBJECT
37
38
39 public:
40 KexiDBFactory(TQObject *parent, const char *name, const TQStringList &args);
41 virtual ~KexiDBFactory();
42
43 virtual TQWidget *createWidget(const TQCString &classname, TQWidget *parent, const char *name,
44 KFormDesigner::Container *container, int options = DefaultOptions );
45
46 virtual void createCustomActions(TDEActionCollection* col);
47 virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
48 KFormDesigner::Container *container);
49 virtual bool startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container);
50 virtual bool previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *);
51 virtual bool clearWidgetContent(const TQCString &classname, TQWidget *w);
52
53 //virtual void saveSpecialProperty(const TQString &classname, const TQString &name, const TQVariant &value, TQWidget *w,
54 //TQDomElement &parentNode, TQDomDocument &parent) {}
55 //virtual void readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) {}
56 virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
57
58 protected slots:
59 void slotImageBoxIdChanged(long id); /*KexiBLOBBuffer::Id_t*/
60
61 protected:
62 virtual bool changeText(const TQString &newText);
63 virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname);
64
65 virtual bool isPropertyVisibleInternal(const TQCString& classname, TQWidget *w,
66 const TQCString& property, bool isTopLevel);
67
69 virtual bool propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
70 const TQCString& property);
71
72 TDEAction* m_assignAction;
73};
74
75#endif
This class makes a container out of any TQWidget.
Definition container.h:74
The base class for all widget Factories.
Kexi Factory (DB widgets + subform)
virtual TQValueList< TQCString > autoSaveProperties(const TQCString &classname)
virtual TQWidget * createWidget(const TQCString &classname, TQWidget *parent, const char *name, KFormDesigner::Container *container, int options=DefaultOptions)
Creates a widget (and if needed a KFormDesigner::Container)
virtual bool startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container)
virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname)
virtual bool previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *)
virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu, KFormDesigner::Container *container)
virtual void createCustomActions(TDEActionCollection *col)
virtual bool changeText(const TQString &newText)
virtual bool isPropertyVisibleInternal(const TQCString &classname, TQWidget *w, const TQCString &property, bool isTopLevel)
virtual bool propertySetShouldBeReloadedAfterPropertyChange(const TQCString &classname, TQWidget *w, const TQCString &property)
Sometimes property sets should be reloaded when a given property value changed.
void slotImageBoxIdChanged(long id)
virtual bool clearWidgetContent(const TQCString &classname, TQWidget *w)