kexi

kexidbfactory.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
00003    Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
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 KEXIDBFACTORY_H
00022 #define KEXIDBFACTORY_H
00023 
00024 #include <formeditor/widgetfactory.h>
00025 
00026 class KAction;
00027 
00028 namespace KFormDesigner {
00029     class Form;
00030     class FormManager;
00031 }
00032 
00034 class KexiDBFactory : public KFormDesigner::WidgetFactory
00035 {
00036     Q_OBJECT
00037 
00038     public:
00039         KexiDBFactory(QObject *parent, const char *name, const QStringList &args);
00040         virtual ~KexiDBFactory();
00041 
00042         virtual QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name, 
00043             KFormDesigner::Container *container, int options = DefaultOptions );
00044 
00045         virtual void createCustomActions(KActionCollection* col);
00046         virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
00047            KFormDesigner::Container *container);
00048         virtual bool startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container);
00049         virtual bool previewWidget(const QCString &, QWidget *, KFormDesigner::Container *);
00050         virtual bool clearWidgetContent(const QCString &classname, QWidget *w);
00051 
00052         //virtual void      saveSpecialProperty(const QString &classname, const QString &name, const QVariant &value, QWidget *w,
00053                  //QDomElement &parentNode, QDomDocument &parent) {}
00054         //virtual void            readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item) {}
00055         virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
00056 
00057     protected slots:
00058         void slotImageBoxIdChanged(long id); /*KexiBLOBBuffer::Id_t*/
00059 
00060     protected:
00061         virtual bool changeText(const QString &newText);
00062         virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
00063 
00064         virtual bool isPropertyVisibleInternal(const QCString& classname, QWidget *w,
00065             const QCString& property, bool isTopLevel);
00066 
00068         virtual bool propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w, 
00069             const QCString& property);
00070 
00071         KAction* m_assignAction;
00072 };
00073 
00074 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys