Kexi API Documentation (2.0 alpha)

KexiDBAutoField Class Reference

#include <kexidbautofield.h>

Inheritance diagram for KexiDBAutoField:

QWidget KexiFormDataItemInterface KFormDesigner::DesignTimeDynamicChildWidgetHandler KFormDesigner::WidgetWithSubpropertiesInterface KexiDataItemInterface KexiDBComboBox List of all members.

Detailed Description

Universal "Auto Field" widget for Kexi forms.

It acts as a container for most data-aware widgets.

Definition at line 36 of file kexidbautofield.h.

Public Types

enum  WidgetType {
  Auto = 100, Text, Integer, Double,
  Boolean, Date, Time, DateTime,
  MultiLineText, ComboBox, Image
}
enum  LabelPosition { Left = 300, Top, NoLabel }

Public Slots

virtual void unsetPalette ()

Public Member Functions

 KexiDBAutoField (const QString &text, WidgetType type, LabelPosition pos, QWidget *parent=0, const char *name=0, bool designMode=true)
 KexiDBAutoField (QWidget *parent=0, const char *name=0, bool designMode=true, LabelPosition pos=Left)
virtual ~KexiDBAutoField ()
QString dataSource () const
QCString dataSourceMimeType () const
virtual void setDataSource (const QString &ds)
 Sets the name of the data source for this widget.
virtual void setDataSourceMimeType (const QCString &ds)
virtual void setColumnInfo (KexiDB::QueryColumnInfo *cinfo)
virtual void setInvalidState (const QString &text)
virtual bool isReadOnly () const
virtual void setReadOnly (bool readOnly)
virtual QVariant value ()
virtual bool valueIsNull ()
virtual bool valueIsEmpty ()
virtual bool valueIsValid ()
virtual bool valueChanged ()
virtual void clear ()
 clears item's data, so the data will contain NULL data
virtual void installListener (KexiDataItemChangesListener *listener)
 Reimpelmented to also install listenter for internal editor.
WidgetType widgetType () const
void setWidgetType (WidgetType type)
LabelPosition labelPosition () const
virtual void setLabelPosition (LabelPosition position)
QString caption () const
void setCaption (const QString &caption)
bool hasAutoCaption () const
void setAutoCaption (bool autoCaption)
virtual void setDisplayDefaultValue (QWidget *widget, bool displayDefaultValue)
QWidgeteditor () const
QLabellabel () const
virtual bool cursorAtStart ()
virtual bool cursorAtEnd ()
void setFieldTypeInternal (int kexiDBFieldType)
void setFieldCaptionInternal (const QString &text)
int fieldTypeInternal () const
QString fieldCaptionInternal () const
virtual QSize sizeHint () const
virtual void setFocusPolicy (FocusPolicy policy)
const QColor & paletteForegroundColor () const
 Reimplemented to return internal editor's color.
void setPaletteForegroundColor (const QColor &color)
 Reimplemented to set internal editor's color.
const QColor & paletteBackgroundColor () const
 Reimplemented to return internal editor's color.
virtual void setPaletteBackgroundColor (const QColor &color)
 Reimplemented to set internal editor's color.
const QColor & foregroundLabelColor () const
virtual void setForegroundLabelColor (const QColor &color)
 Sets label's foreground color.
const QColor & backgroundLabelColor () const
virtual void setBackgroundLabelColor (const QColor &color)
 Sets label's background color.
virtual QVariant property (const char *name) const
 Reimplemented to accept subproperties.
virtual bool setProperty (const char *name, const QVariant &value)
 Reimplemented to accept subproperties.
virtual bool keyPressed (QKeyEvent *ke)

Static Public Member Functions

static WidgetType widgetTypeForFieldType (KexiDB::Field::Type type)

Protected Slots

virtual void paletteChange (const QPalette &oldPal)
virtual void moveCursorToEnd ()
 Implemented for KexiDataItemInterface.
virtual void moveCursorToStart ()
 Implemented for KexiDataItemInterface.
virtual void selectAll ()
 Implemented for KexiDataItemInterface.

Protected Member Functions

virtual void setValueInternal (const QVariant &add, bool removeOld)
void init (const QString &text, WidgetType type, LabelPosition pos)
virtual void createEditor ()
void changeText (const QString &text, bool beautify=true)
void updateInformationAboutUnboundField ()
void copyPropertiesToEditor ()
 internal editor can be created too late, so certain properties should be copied
virtual bool eventFilter (QObject *o, QEvent *e)
void setLabelPositionInternal (LabelPosition position, bool noLabel)
 Used by setLabelPositionInternal(LabelPosition).
void setColumnInfoInternal (KexiDB::QueryColumnInfo *cinfo, KexiDB::QueryColumnInfo *visibleColumnInfo)
 Used by KexiDBAutoField::setColumnInfo() and KexiDBComboBox::setColumnInfo().

Properties

QColor foregroundLabelColor
QColor backgroundLabelColor
bool autoCaption
QString dataSource
QCString dataSourceMimeType
bool readOnly
LabelPosition labelPosition
WidgetType widgetType
int fieldTypeInternal
QString fieldCaptionInternal


Member Enumeration Documentation

enum KexiDBAutoField::LabelPosition
 

Enumeration values:
Left 
Top 
NoLabel 

Definition at line 63 of file kexidbautofield.h.

enum KexiDBAutoField::WidgetType
 

Enumeration values:
Auto 
Text 
Integer 
Double 
Boolean 
Date 
Time 
DateTime 
MultiLineText 
ComboBox 
Image 

Definition at line 61 of file kexidbautofield.h.


Constructor & Destructor Documentation

KexiDBAutoField::KexiDBAutoField const QString text,
WidgetType  type,
LabelPosition  pos,
QWidget parent = 0,
const char *  name = 0,
bool  designMode = true
 

Definition at line 74 of file kexidbautofield.cpp.

References init().

KexiDBAutoField::KexiDBAutoField QWidget parent = 0,
const char *  name = 0,
bool  designMode = true,
LabelPosition  pos = Left
 

Definition at line 85 of file kexidbautofield.cpp.

References Auto, and init().

KexiDBAutoField::~KexiDBAutoField  )  [virtual]
 

Definition at line 95 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.


Member Function Documentation

const QColor& KexiDBAutoField::backgroundLabelColor  )  const
 

Returns:
label's background color

QString KexiDBAutoField::caption  )  const
 

Definition at line 402 of file kexidbautofield.cpp.

void KexiDBAutoField::changeText const QString text,
bool  beautify = true
[protected]
 

Todo:
look at appendColonToAutoLabels setting [bool]

look at makeFirstCharacterUpperCaseInCaptions setting [bool] (see doc/dev/settings.txt)

support right-to-left layout where position of ":" is inverted

Todo:
":" suffix looks weird for checkbox; remove this condition when [x] is displayed _after_ label

Definition at line 567 of file kexidbautofield.cpp.

References Auto, Boolean, dataSource(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

Referenced by createEditor(), setAutoCaption(), setCaption(), setColumnInfoInternal(), and setFieldCaptionInternal().

void KexiDBAutoField::clear  )  [virtual]
 

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

Implements KexiDataItemInterface.

Definition at line 451 of file kexidbautofield.cpp.

References KexiDataItemInterface::clear(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

void KexiDBAutoField::copyPropertiesToEditor  )  [protected]
 

internal editor can be created too late, so certain properties should be copied

Definition at line 205 of file kexidbautofield.cpp.

References Boolean, and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

Referenced by createEditor(), setPaletteBackgroundColor(), and setPaletteForegroundColor().

void KexiDBAutoField::createEditor  )  [protected, virtual]
 

Todo:
setup validator
Todo:
setup validator

Reimplemented in KexiDBComboBox.

Definition at line 142 of file kexidbautofield.cpp.

References Boolean, changeText(), KFormDesigner::DesignTimeDynamicChildWidgetHandler::childWidgetAdded(), KexiFormDataItemInterface::columnInfo(), ComboBox, copyPropertiesToEditor(), dataSource(), Date, DateTime, Double, Image, Integer, labelPosition(), KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, MultiLineText, setLabelPosition(), KFormDesigner::WidgetWithSubpropertiesInterface::setSubwidget(), Text, Time, and KexiFormDataItemInterface::visibleColumnInfo().

Referenced by KexiDBComboBox::createEditor(), setColumnInfoInternal(), setFieldTypeInternal(), setInvalidState(), and setWidgetType().

bool KexiDBAutoField::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 442 of file kexidbautofield.cpp.

References KexiDataItemInterface::cursorAtEnd(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

bool KexiDBAutoField::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 433 of file kexidbautofield.cpp.

References KexiDataItemInterface::cursorAtStart(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

QString KexiDBAutoField::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 72 of file kexidbautofield.h.

References KexiFormDataItemInterface::dataSource().

Referenced by changeText(), createEditor(), setColumnInfoInternal(), and updateInformationAboutUnboundField().

QCString KexiDBAutoField::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 73 of file kexidbautofield.h.

References KexiFormDataItemInterface::dataSourceMimeType().

Referenced by updateInformationAboutUnboundField().

QWidget * KexiDBAutoField::editor  )  const
 

Definition at line 412 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

bool KexiDBAutoField::eventFilter QObject *  o,
QEvent *  e
[protected, virtual]
 

Reimplemented in KexiDBComboBox.

Definition at line 801 of file kexidbautofield.cpp.

Referenced by KexiDBComboBox::eventFilter().

QString KexiDBAutoField::fieldCaptionInternal  )  const
 

int KexiDBAutoField::fieldTypeInternal  )  const
 

Referenced by setLabelPosition().

const QColor& KexiDBAutoField::foregroundLabelColor  )  const
 

Returns:
label's foreground color

bool KexiDBAutoField::hasAutoCaption  )  const
 

Definition at line 407 of file kexidbautofield.cpp.

void KexiDBAutoField::init const QString text,
WidgetType  type,
LabelPosition  pos
[protected]
 

Definition at line 104 of file kexidbautofield.cpp.

References Auto, KexiDB::Field::InvalidType, KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, setLabelPosition(), setWidgetType(), and Text.

Referenced by KexiDBAutoField().

void KexiDBAutoField::installListener KexiDataItemChangesListener listener  )  [virtual]
 

Reimpelmented to also install listenter for internal editor.

Reimplemented from KexiDataItemInterface.

Definition at line 384 of file kexidbautofield.cpp.

References KexiDataItemInterface::installListener(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

bool KexiDBAutoField::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 311 of file kexidbautofield.cpp.

References KexiDataItemInterface::isReadOnly(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

bool KexiDBAutoField::keyPressed QKeyEvent *  ke  )  [virtual]
 

Called by the top-level form on key press event to consume widget-specific shortcuts.

Reimplemented from KexiFormDataItemInterface.

Reimplemented in KexiDBComboBox.

Definition at line 838 of file kexidbautofield.cpp.

References KexiFormDataItemInterface::keyPressed(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

Referenced by KexiDBComboBox::keyPressed().

QLabel * KexiDBAutoField::label  )  const
 

Definition at line 417 of file kexidbautofield.cpp.

LabelPosition KexiDBAutoField::labelPosition  )  const
 

Referenced by createEditor().

void KexiDBAutoField::moveCursorToEnd  )  [protected, virtual, slot]
 

Implemented for KexiDataItemInterface.

Reimplemented from KexiDataItemInterface.

Definition at line 817 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::moveCursorToEnd().

Referenced by KexiDBComboBox::moveCursorToEndInInternalEditor().

void KexiDBAutoField::moveCursorToStart  )  [protected, virtual, slot]
 

Implemented for KexiDataItemInterface.

Reimplemented from KexiDataItemInterface.

Definition at line 824 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::moveCursorToStart().

const QColor & KexiDBAutoField::paletteBackgroundColor  )  const
 

Reimplemented to return internal editor's color.

Reimplemented in KexiDBComboBox.

Definition at line 734 of file kexidbautofield.cpp.

Referenced by KexiDBComboBox::paletteBackgroundColor().

void KexiDBAutoField::paletteChange const QPalette &  oldPal  )  [protected, virtual, slot]
 

Definition at line 709 of file kexidbautofield.cpp.

const QColor & KexiDBAutoField::paletteForegroundColor  )  const
 

Reimplemented to return internal editor's color.

Definition at line 723 of file kexidbautofield.cpp.

QVariant KexiDBAutoField::property const char *  name  )  const [virtual]
 

Reimplemented to accept subproperties.

See also:
KFormDesigner::WidgetWithSubpropertiesInterface

Definition at line 784 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::subproperty().

void KexiDBAutoField::selectAll  )  [protected, virtual, slot]
 

Implemented for KexiDataItemInterface.

Reimplemented from KexiDataItemInterface.

Definition at line 831 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::selectAll().

Referenced by KexiDBComboBox::selectAllInInternalEditor().

void KexiDBAutoField::setAutoCaption bool  autoCaption  ) 
 

Definition at line 628 of file kexidbautofield.cpp.

References changeText(), and KexiFormDataItemInterface::columnInfo().

void KexiDBAutoField::setBackgroundLabelColor const QColor &  color  )  [virtual]
 

Sets label's background color.

Definition at line 771 of file kexidbautofield.cpp.

References Boolean, and setPaletteBackgroundColor().

void KexiDBAutoField::setCaption const QString caption  ) 
 

Definition at line 620 of file kexidbautofield.cpp.

References changeText().

void KexiDBAutoField::setColumnInfo KexiDB::QueryColumnInfo cinfo  )  [virtual]
 

Used internally to set database column information. Reimplement if you need to do additional actions, e.g. set data validator based on field type. Don't forget about calling superclass implementation.

Reimplemented from KexiFormDataItemInterface.

Reimplemented in KexiDBComboBox.

Definition at line 494 of file kexidbautofield.cpp.

References KexiFormDataItemInterface::setColumnInfo(), and setColumnInfoInternal().

Referenced by setDataSource(), and KexiFormView::updateAutoFieldsDataSource().

void KexiDBAutoField::setColumnInfoInternal KexiDB::QueryColumnInfo cinfo,
KexiDB::QueryColumnInfo visibleColumnInfo
[protected]
 

Used by KexiDBAutoField::setColumnInfo() and KexiDBComboBox::setColumnInfo().

Definition at line 501 of file kexidbautofield.cpp.

References Auto, KexiDB::QueryColumnInfo::captionOrAliasOrName(), changeText(), createEditor(), dataSource(), KexiDB::QueryColumnInfo::field, KexiDB::Field::InvalidType, KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, KexiFormDataItemInterface::setColumnInfo(), KexiDB::Field::Text, and widgetTypeForFieldType().

Referenced by setColumnInfo(), and KexiDBComboBox::setVisibleColumnInfo().

void KexiDBAutoField::setDataSource const QString ds  )  [virtual]
 

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 645 of file kexidbautofield.cpp.

References setColumnInfo(), and KexiFormDataItemInterface::setDataSource().

virtual void KexiDBAutoField::setDataSourceMimeType const QCString &  ds  )  [inline, virtual]
 

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 75 of file kexidbautofield.h.

References KexiFormDataItemInterface::setDataSourceMimeType().

void KexiDBAutoField::setDisplayDefaultValue QWidget widget,
bool  displayDefaultValue
[virtual]
 

If displayDefaultValue is true, the value set by KexiDataItemInterface::setValue() is displayed in a special way. Used by KexiFormDataProvider::fillDataItems(). widget is equal to 'this'. Reimplemented after KexiFormDataItemInterface.

Reimplemented from KexiFormDataItemInterface.

Definition at line 810 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiFormDataItemInterface::setDisplayDefaultValue().

void KexiDBAutoField::setFieldCaptionInternal const QString text  ) 
 

On design time it is not possible to pass a reference to KexiDB::Field object so we're just providing field caption. Only used when widget type is Auto.

Definition at line 483 of file kexidbautofield.cpp.

References changeText(), KexiFormDataItemInterface::columnInfo(), and KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

Referenced by setFieldTypeInternal().

void KexiDBAutoField::setFieldTypeInternal int  kexiDBFieldType  ) 
 

On design time it is not possible to pass a reference to KexiDB::Field object so we're just providing field type. Only used when widget type is Auto.

Definition at line 459 of file kexidbautofield.cpp.

References createEditor(), KexiDB::Field::InvalidType, setFieldCaptionInternal(), KexiDB::Field::Text, KexiFormDataItemInterface::visibleColumnInfo(), and widgetTypeForFieldType().

void KexiDBAutoField::setFocusPolicy FocusPolicy  policy  )  [virtual]
 

Definition at line 670 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget.

Referenced by KexiDBComboBox::KexiDBComboBox(), and setInvalidState().

void KexiDBAutoField::setForegroundLabelColor const QColor &  color  )  [virtual]
 

Sets label's foreground color.

Definition at line 753 of file kexidbautofield.cpp.

References Boolean, and setPaletteForegroundColor().

void KexiDBAutoField::setInvalidState const QString text  )  [virtual]
 

Todo:
or set this to editor's text?

Implements KexiFormDataItemInterface.

Definition at line 296 of file kexidbautofield.cpp.

References Auto, createEditor(), KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and setFocusPolicy().

void KexiDBAutoField::setLabelPosition LabelPosition  position  )  [virtual]
 

Todo:
support right-to-left layout where positions are inverted

Reimplemented in KexiDBComboBox.

Definition at line 222 of file kexidbautofield.cpp.

References KexiSubwidgetInterface::appendStretchRequired(), Auto, Boolean, fieldTypeInternal(), KexiDB::Field::InvalidType, KexiDBAutoField_SPACING, Left, KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, size, KexiSubwidgetInterface::subwidgetStretchRequired(), and Top.

Referenced by createEditor(), and init().

void KexiDBAutoField::setLabelPositionInternal LabelPosition  position,
bool  noLabel
[protected]
 

Used by setLabelPositionInternal(LabelPosition).

void KexiDBAutoField::setPaletteBackgroundColor const QColor &  color  )  [virtual]
 

Reimplemented to set internal editor's color.

Reimplemented in KexiDBComboBox.

Definition at line 739 of file kexidbautofield.cpp.

References copyPropertiesToEditor().

Referenced by setBackgroundLabelColor(), and KexiDBComboBox::setPaletteBackgroundColor().

void KexiDBAutoField::setPaletteForegroundColor const QColor &  color  ) 
 

Reimplemented to set internal editor's color.

Definition at line 728 of file kexidbautofield.cpp.

References copyPropertiesToEditor().

Referenced by setForegroundLabelColor().

bool KexiDBAutoField::setProperty const char *  name,
const QVariant &  value
[virtual]
 

Reimplemented to accept subproperties.

See also:
KFormDesigner::WidgetWithSubpropertiesInterface

Definition at line 793 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::setSubproperty().

void KexiDBAutoField::setReadOnly bool  readOnly  )  [virtual]
 

Changes 'read only' flag, for this widget. Typically this flag can be passed to a widget itself, e.g. KLineEdit::setReadOnly(bool).

Implements KexiFormDataItemInterface.

Definition at line 321 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiFormDataItemInterface::setReadOnly().

void KexiDBAutoField::setValueInternal const QVariant &  add,
bool  removeOld
[protected, virtual]
 

Initializes this editor with add value, which should be somewhat added to the current value (already storted in m_origValue). If removeOld is true, a value should be set to add, otherwise -it should be set to current m_origValue + add, if possible. Implement this.

Implements KexiDataItemInterface.

Reimplemented in KexiDBComboBox.

Definition at line 329 of file kexidbautofield.cpp.

References KexiDataItemInterface::m_origValue, KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::setValue().

void KexiDBAutoField::setWidgetType WidgetType  type  ) 
 

Definition at line 124 of file kexidbautofield.cpp.

References Auto, createEditor(), KexiFormDataItemInterface::field(), KexiDB::Field::type(), KexiFormDataItemInterface::visibleColumnInfo(), and widgetTypeForFieldType().

Referenced by init().

QSize KexiDBAutoField::sizeHint  )  const [virtual]
 

Reimplemented in KexiDBComboBox.

Definition at line 653 of file kexidbautofield.cpp.

References KexiDBAutoField_SPACING, KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, NoLabel, and Top.

void KexiDBAutoField::unsetPalette  )  [virtual, slot]
 

Definition at line 715 of file kexidbautofield.cpp.

void KexiDBAutoField::updateInformationAboutUnboundField  )  [protected]
 

Definition at line 680 of file kexidbautofield.cpp.

References dataSource(), and dataSourceMimeType().

QVariant KexiDBAutoField::value  )  [virtual]
 

Returns:
value currently represented by this item.

Implements KexiDataItemInterface.

Reimplemented in KexiDBComboBox.

Definition at line 338 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::value().

Referenced by KexiDBComboBox::valueFromInternalEditor().

bool KexiDBAutoField::valueChanged  )  [virtual]
 

Returns:
true if editor's value is changed (compared to original value)

Reimplemented from KexiDataItemInterface.

Reimplemented in KexiDBComboBox.

Definition at line 374 of file kexidbautofield.cpp.

References kexipluginsdbg, KexiDataItemInterface::m_origValue, KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::valueChanged().

bool KexiDBAutoField::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 356 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::valueIsEmpty().

bool KexiDBAutoField::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 347 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::valueIsNull().

bool KexiDBAutoField::valueIsValid  )  [virtual]
 

Returns:
true if editor's value is valid for a given type Used for checking if an entered value is valid, E.g. a part of time value can be entered: "12:8" and this is invalid, not only null. Null time or date is valid in Kexi, so it is not enough to test value().isValid(). Default implementation just returns true.

Reimplemented from KexiDataItemInterface.

Definition at line 365 of file kexidbautofield.cpp.

References KFormDesigner::WidgetWithSubpropertiesInterface::m_subwidget, and KexiDataItemInterface::valueIsValid().

WidgetType KexiDBAutoField::widgetType  )  const
 

KexiDBAutoField::WidgetType KexiDBAutoField::widgetTypeForFieldType KexiDB::Field::Type  type  )  [static]
 

Definition at line 532 of file kexidbautofield.cpp.

References Auto, KexiDB::Field::BigInteger, KexiDB::Field::BLOB, Boolean, KexiDB::Field::Boolean, ComboBox, Date, KexiDB::Field::Date, DateTime, KexiDB::Field::DateTime, Double, KexiDB::Field::Double, KexiDB::Field::Enum, KexiDB::Field::Float, Image, Integer, KexiDB::Field::Integer, KexiDB::Field::InvalidType, KexiDB::Field::LongText, MultiLineText, KexiDB::Field::ShortInteger, Text, KexiDB::Field::Text, Time, and KexiDB::Field::Time.

Referenced by setColumnInfoInternal(), setFieldTypeInternal(), and setWidgetType().


Property Documentation

bool KexiDBAutoField::autoCaption [read, write]
 

Definition at line 49 of file kexidbautofield.h.

const QColor & KexiDBAutoField::backgroundLabelColor [read, write]
 

Definition at line 48 of file kexidbautofield.h.

QString KexiDBAutoField::dataSource [read, write]
 

Definition at line 50 of file kexidbautofield.h.

Referenced by KexiFormView::updateAutoFieldsDataSource().

QCString KexiDBAutoField::dataSourceMimeType [read, write]
 

Definition at line 51 of file kexidbautofield.h.

QString KexiDBAutoField::fieldCaptionInternal [read, write]
 

Definition at line 57 of file kexidbautofield.h.