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-2005 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 QString name();
00043         virtual QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name, 
00044             KFormDesigner::Container *container, int options = DefaultOptions );
00045 
00046         virtual void createCustomActions(KActionCollection* col);
00047         virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
00048            KFormDesigner::Container *container);
00049         virtual bool startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container);
00050         virtual bool previewWidget(const QCString &, QWidget *, KFormDesigner::Container *);
00051         virtual bool clearWidgetContent(const QCString &classname, QWidget *w);
00052 
00053         //virtual void      saveSpecialProperty(const QString &classname, const QString &name, const QVariant &value, QWidget *w,
00054                  //QDomElement &parentNode, QDomDocument &parent) {}
00055         //virtual void            readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item) {}
00056         virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
00057 
00058     protected slots:
00059         void slotImageBoxIdChanged(long id); /*KexiBLOBBuffer::Id_t*/
00060 
00061     protected:
00062         virtual bool changeText(const QString &newText);
00063         virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
00064 
00065         virtual bool isPropertyVisibleInternal(const QCString &, QWidget *, const QCString &, bool isTopLevel);
00066 //      QWidget *m_widget;
00067 //      KFormDesigner::Container *m_container;
00068 
00069         KAction* m_assignAction;
00070 };
00071 
00072 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys