Kexi API Documentation (2.0 alpha)

KexiDBFactory Class Reference

#include <kexidbfactory.h>

Inheritance diagram for KexiDBFactory:

KFormDesigner::WidgetFactory List of all members.

Detailed Description

Kexi Factory (DB widgets + subform).

Definition at line 34 of file kexidbfactory.h.

Public Member Functions

 KexiDBFactory (QObject *parent, const char *name, const QStringList &args)
virtual ~KexiDBFactory ()
virtual QWidgetcreateWidget (const QCString &classname, QWidget *parent, const char *name, KFormDesigner::Container *container, int options=DefaultOptions)
 Creates a widget (and if needed a KFormDesigner::Container).
virtual void createCustomActions (KActionCollection *col)
virtual bool createMenuActions (const QCString &classname, QWidget *w, QPopupMenu *menu, KFormDesigner::Container *container)
virtual bool startEditing (const QCString &classname, QWidget *w, KFormDesigner::Container *container)
virtual bool previewWidget (const QCString &, QWidget *, KFormDesigner::Container *)
virtual bool clearWidgetContent (const QCString &classname, QWidget *w)
virtual QValueList< QCString > autoSaveProperties (const QCString &classname)

Protected Slots

void slotImageBoxIdChanged (long id)

Protected Member Functions

virtual bool changeText (const QString &newText)
virtual void resizeEditor (QWidget *editor, QWidget *widget, const QCString &classname)
virtual bool isPropertyVisibleInternal (const QCString &classname, QWidget *w, const QCString &property, bool isTopLevel)
virtual bool propertySetShouldBeReloadedAfterPropertyChange (const QCString &classname, QWidget *w, const QCString &property)
 Sometimes property sets should be reloaded when a given property value changed.

Protected Attributes

KActionm_assignAction


Constructor & Destructor Documentation

KexiDBFactory::KexiDBFactory QObject *  parent,
const char *  name,
const QStringList &  args
 

Definition at line 71 of file kexidbfactory.cpp.

References KFormDesigner::WidgetInfo::addAlternateClassName(), KFormDesigner::WidgetFactory::addClass(), KexiDB::Field::Boolean, KexiDB::Field::Date, KexiDB::Field::DateTime, KexiDB::Field::Double, KFormDesigner::WidgetFactory::hideClass(), KexiDB::Field::Integer, KFormDesigner::WidgetFactory::m_propDesc, KFormDesigner::WidgetFactory::m_propValDesc, KexiCustomPropertyFactory::PixmapId, KFormDesigner::WidgetInfo::setAutoSyncForProperty(), KFormDesigner::WidgetInfo::setClassName(), KFormDesigner::WidgetInfo::setDescription(), KFormDesigner::WidgetFactory::setInternalProperty(), KFormDesigner::WidgetInfo::setName(), KFormDesigner::WidgetInfo::setNamePrefix(), KFormDesigner::WidgetInfo::setPixmap(), KexiDB::Field::Text, KexiDB::Field::Time, and KexiDB::Field::typeName().

KexiDBFactory::~KexiDBFactory  )  [virtual]
 

Definition at line 348 of file kexidbfactory.cpp.


Member Function Documentation

QValueList< QCString > KexiDBFactory::autoSaveProperties const QCString &  classname  )  [virtual]
 

You need to return here a list of the properties that should automatically be saved for a widget belonging to classname, and your custom properties (eg "text" for label or button, "contents" for combobox...).

Implements KFormDesigner::WidgetFactory.

Definition at line 567 of file kexidbfactory.cpp.

bool KexiDBFactory::changeText const QString text  )  [protected, virtual]
 

Todo:
check field's geometry

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 668 of file kexidbfactory.cpp.

References KFormDesigner::WidgetFactory::changeProperty(), KFormDesigner::WidgetFactory::m_container, and KFormDesigner::Form::selectedWidget().

bool KexiDBFactory::clearWidgetContent const QCString &  classname,
QWidget w
[virtual]
 

Todo:
this code should not be copied here but just inherited StdWidgetFactory::clearWidgetContent() should be called

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 556 of file kexidbfactory.cpp.

References KexiDataItemInterface::clear().

void KexiDBFactory::createCustomActions KActionCollection *  col  )  [virtual]
 

Creates custom actions. Reimplement this if you need to add some actions coming from the factory.

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 447 of file kexidbfactory.cpp.

References m_assignAction.

bool KexiDBFactory::createMenuActions const QCString &  classname,
QWidget w,
QPopupMenu *  menu,
KFormDesigner::Container container
[virtual]
 

Todo:
also call createMenuActions() for inherited factory!
Todo:
make these actions undoable/redoable

Implements KFormDesigner::WidgetFactory.

Definition at line 414 of file kexidbfactory.cpp.

References KexiDBImageBox::contextMenu(), and m_assignAction.

QWidget * KexiDBFactory::createWidget const QCString &  classname,
QWidget parent,
const char *  name,
KFormDesigner::Container container,
int  options = DefaultOptions
[virtual]
 

Creates a widget (and if needed a KFormDesigner::Container).

Returns:
the created widget
Parameters:
classname the classname of the widget, which should get created
parent the parent for the created widget
name the name of the created widget
container the toplevel Container (if a container should get created)
options options for the created widget: orientation and view mode (see CreateWidgetOptions)

Implements KFormDesigner::WidgetFactory.

Definition at line 353 of file kexidbfactory.cpp.

References KFormDesigner::WidgetFactory::DesignViewMode, KFormDesigner::Container::form(), kexipluginsdbg, and slotImageBoxIdChanged().

bool KexiDBFactory::isPropertyVisibleInternal const QCString &  classname,
QWidget w,
const QCString &  property,
bool  isTopLevel
[protected, virtual]
 

Todo:
unhide in 2.0

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 580 of file kexidbfactory.cpp.

bool KexiDBFactory::previewWidget const QCString &  ,
QWidget ,
KFormDesigner::Container
[virtual]
 

Definition at line 550 of file kexidbfactory.cpp.

bool KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange const QCString &  classname,
QWidget w,
const QCString &  property
[protected, virtual]
 

Sometimes property sets should be reloaded when a given property value changed.

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 657 of file kexidbfactory.cpp.

void KexiDBFactory::resizeEditor QWidget editor,
QWidget widget,
const QCString &  classname
[protected, virtual]
 

This function is called when the widget is resized, and the editor size needs to be updated.

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 686 of file kexidbfactory.cpp.

void KexiDBFactory::slotImageBoxIdChanged long  id  )  [protected, slot]
 

Referenced by createWidget().

bool KexiDBFactory::startEditing const QCString &  classname,
QWidget w,
KFormDesigner::Container container
[virtual]
 

Todo:
this code should not be copied here but just inherited StdWidgetFactory::clearWidgetContent() should be called
Todo:
this code should not be copied here but just inherited StdWidgetFactory::clearWidgetContent() should be called

Definition at line 455 of file kexidbfactory.cpp.

References KFormDesigner::WidgetFactory::changeProperty(), KFormDesigner::WidgetFactory::createEditor(), Kexi::DesignViewMode, KFormDesigner::WidgetFactory::disableFilter(), KFormDesigner::WidgetFactory::editor(), KFormDesigner::WidgetFactory::editRichText(), KFormDesigner::Container::form(), KexiDBSubForm::formName, KexiDBImageBox::insertFromFile(), KFormDesigner::WidgetFactory::m_container, KFormDesigner::WidgetFactory::m_widget, and KexiMainWindow::openObject().


Member Data Documentation

KAction* KexiDBFactory::m_assignAction [protected]
 

Definition at line 71 of file kexidbfactory.h.

Referenced by createCustomActions(), and createMenuActions().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:59 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003