kexi

KexiDBForm Class Reference

#include <kexidbform.h>

Inheritance diagram for KexiDBForm:

KFormDesigner::FormWidget KexiFormDataItemInterface KexiDataItemInterface List of all members.

Detailed Description

A DB-aware form widget, acting as form's toplevel widget.

Definition at line 46 of file kexidbform.h.


Public Slots

void setAutoTabStops (bool set)
void setDataSource (const QString &ds)
void setDataSourceMimeType (const QCString &ds)
QSize sizeInternal () const
void resizeInternal (const QSize &s)

Signals

void handleDragMoveEvent (QDragMoveEvent *e)
void handleDropEvent (QDropEvent *e)

Public Member Functions

 KexiDBForm (QWidget *parent, KexiDataAwareObjectInterface *dataAwareObject, const char *name="kexi_dbform")
virtual ~KexiDBForm ()
KexiDataAwareObjectInterfacedataAwareObject () const
QString dataSource () const
QCString dataSourceMimeType () const
QVariant value ()
virtual void setInvalidState (const QString &displayText)
virtual void drawRect (const QRect &r, int type)
virtual void drawRects (const QValueList< QRect > &list, int type)
virtual void initBuffer ()
virtual void clearForm ()
virtual void highlightWidgets (QWidget *from, QWidget *to)
virtual QSize sizeHint () const
bool autoTabStops () const
QPtrList< QWidget > * orderedFocusWidgets () const
QPtrList< QWidget > * orderedDataAwareWidgets () const
int indexForDataItem (KexiDataItemInterface *item) const
void updateTabStopsOrder (KFormDesigner::Form *form)
void updateTabStopsOrder ()
virtual bool eventFilter (QObject *watched, QEvent *e)
virtual bool valueIsNull ()
virtual bool valueIsEmpty ()
virtual bool isReadOnly () const
virtual QWidget * widget ()
virtual bool cursorAtStart ()
virtual bool cursorAtEnd ()
virtual void clear ()
bool preview () const
virtual void setCursor (const QCursor &cursor)

Protected Member Functions

virtual void setValueInternal (const QVariant &, bool)
virtual void dragMoveEvent (QDragMoveEvent *e)
virtual void dropEvent (QDropEvent *e)

Protected Attributes

KexiFormDataItemInterfaceeditedItem
Private * d

Properties

QString dataSource []
QCString dataSourceMimeType []
bool autoTabStops []
QSize sizeInternal []

Friends

class KexiFormScrollView

Member Function Documentation

void KexiDBForm::clear (  )  [virtual]

clears item's data, so the data will contain NULL data

Implements KexiDataItemInterface.

Definition at line 503 of file kexidbform.cpp.

void KexiDBForm::clearForm (  )  [virtual]

Clears the form, ie pastes the whole buffer to repaint the Form.

Implements KFormDesigner::FormWidget.

Definition at line 154 of file kexidbform.cpp.

bool KexiDBForm::cursorAtEnd (  )  [virtual]

Returns:
true if the item widget's cursor (whatever that means, eg. line edit cursor) is at the end of editor's contents. This can inform table/form view that after pressing "right arrow" key should stop editing and move to a field on the right hand.

Implements KexiDataItemInterface.

Definition at line 498 of file kexidbform.cpp.

bool KexiDBForm::cursorAtStart (  )  [virtual]

Returns:
true if the item widget's cursor (whatever that means, eg. line edit cursor) is at the beginning of editor's contents. This can inform table/form view that after pressing "left arrow" key should stop editing and move to a field on the left hand.

Implements KexiDataItemInterface.

Definition at line 493 of file kexidbform.cpp.

QString KexiDBForm::dataSource (  )  const [inline]

Returns:
the name of the data source for this widget. Data source usually means here a table or query, a field name or an expression.

Reimplemented from KexiFormDataItemInterface.

Definition at line 63 of file kexidbform.h.

QCString KexiDBForm::dataSourceMimeType (  )  const [inline]

Returns:
the mime type of the data source for this widget. Data source mime type means here types like "kexi/table" or "kexi/query" in.the data source is set to object (as within form or subform) or is empty if the data source is set to table field or query column.

Reimplemented from KexiFormDataItemInterface.

Definition at line 64 of file kexidbform.h.

void KexiDBForm::drawRects ( const QValueList< QRect > &  list,
int  type 
) [virtual]

This function draws the rects in the list in the Form, above of all widgets, using double-buffering. type can be 1 (selection rect) or 2 (insert rect, dotted).

Implements KFormDesigner::FormWidget.

Definition at line 110 of file kexidbform.cpp.

void KexiDBForm::highlightWidgets ( QWidget *  from,
QWidget *  to 
) [virtual]

This function highlights two widgets (to is optional), which are sender and receiver, and draws a link between them.

Implements KFormDesigner::FormWidget.

Definition at line 172 of file kexidbform.cpp.

void KexiDBForm::initBuffer (  )  [virtual]

This function inits the buffer used for double-buffering. Called before drawing rect.

Implements KFormDesigner::FormWidget.

Definition at line 145 of file kexidbform.cpp.

bool KexiDBForm::isReadOnly (  )  const [virtual]

Returns:
'readOnly' flag for this item. The flag is usually taken from the item's widget, e.g. KLineEdit::isReadOnly(). By default, always returns false.

Reimplemented from KexiDataItemInterface.

Definition at line 480 of file kexidbform.cpp.

void KexiDBForm::setCursor ( const QCursor &  cursor  )  [virtual]

Definition at line 533 of file kexidbform.cpp.

void KexiDBForm::setDataSource ( const QString &  ds  )  [inline, slot]

Sets the name of the data source for this widget.

Data source usually means here a table or query or field name name.

Reimplemented from KexiFormDataItemInterface.

Definition at line 107 of file kexidbform.h.

void KexiDBForm::setDataSourceMimeType ( const QCString &  ds  )  [inline, slot]

Sets the mime type of the data source for this widget. Data source usually means here a "kexi/table" or "kexi/query".

See also:
dataSourceMimeType()

Reimplemented from KexiFormDataItemInterface.

Definition at line 108 of file kexidbform.h.

void KexiDBForm::setInvalidState ( const QString &  displayText  )  [virtual]

Sets 'invalid' state, e.g. a text editor widget should display text displayText and become read only to prevent entering data, because updating at the database backend is not available. displayText is usually set to something i18n'd like "#NAME?". Note: that even widgets that usualy do not display texts (e.g. pixmaps) should display displayText too.

Implements KexiFormDataItemInterface.

Definition at line 239 of file kexidbform.cpp.

virtual void KexiDBForm::setValueInternal ( const QVariant &  ,
bool   
) [inline, protected, virtual]

no effect

Implements KexiDataItemInterface.

Definition at line 122 of file kexidbform.h.

void KexiDBForm::updateTabStopsOrder ( KFormDesigner::Form form  ) 

Definition at line 266 of file kexidbform.cpp.

QVariant KexiDBForm::value (  )  [inline, virtual]

no effect

Implements KexiDataItemInterface.

Definition at line 67 of file kexidbform.h.

bool KexiDBForm::valueIsEmpty (  )  [virtual]

Returns:
true if editor's value is empty (not necessary null). Only few data types can accept "EMPTY" property (use KexiDB::Field::hasEmptyProperty() to check this). Used for checking if a given constraint within table of form is met.

Implements KexiDataItemInterface.

Definition at line 475 of file kexidbform.cpp.

bool KexiDBForm::valueIsNull (  )  [virtual]

Returns:
true if editor's value is null (not empty) Used for checking if a given constraint within table or form is met.

Implements KexiDataItemInterface.

Definition at line 470 of file kexidbform.cpp.

QWidget * KexiDBForm::widget (  )  [virtual]

Convenience function: casts this item to a QWidget. Can return 0 if the item is not a QWidget-derived object.

Reimplemented from KexiFormDataItemInterface.

Definition at line 488 of file kexidbform.cpp.


Member Data Documentation

Points to a currently edited data item.

It is cleared when the focus is moved to other

Definition at line 131 of file kexidbform.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys