Kexi API Documentation (2.0 alpha)

KexiDBDateEdit Class Reference

#include <kexidbdateedit.h>

Inheritance diagram for KexiDBDateEdit:

QWidget KexiFormDataItemInterface KexiDataItemInterface List of all members.

Detailed Description

A db-aware date editor.

Definition at line 32 of file kexidbdateedit.h.

Public Types

enum  Order { DMY = QDateEdit::DMY, MDY = QDateEdit::MDY, YMD = QDateEdit::YMD, YDM = QDateEdit::YDM }

Public Slots

void setDataSource (const QString &ds)
 Sets the name of the data source for this widget.
void setDataSourceMimeType (const QCString &ds)
void setDate (const QDate &date)
virtual void setReadOnly (bool set)

Signals

void dateChanged (const QDate &date)

Public Member Functions

 KexiDBDateEdit (const QDate &date, QWidget *parent, const char *name=0)
virtual ~KexiDBDateEdit ()
QString dataSource () const
QCString dataSourceMimeType () const
virtual QVariant value ()
virtual void setInvalidState (const QString &displayText)
virtual bool valueIsNull ()
virtual bool valueIsEmpty ()
virtual bool isReadOnly () const
virtual QWidgetwidget ()
virtual bool cursorAtStart ()
virtual bool cursorAtEnd ()
virtual void clear ()
 clears item's data, so the data will contain NULL data
virtual void setEnabled (bool enabled)
QDate date () const
void setOrder (Order order)
Order order () const
void setAutoAdvance (bool advance)
bool autoAdvance () const
void setMinValue (const QDate &d)
QDate minValue () const
void setMaxValue (const QDate &d)
QDate maxValue () const

Protected Slots

void slotValueChanged (const QDate &)
void slotShowDatePicker ()
void acceptDate ()

Protected Member Functions

virtual void setValueInternal (const QVariant &add, bool removeOld)
virtual bool eventFilter (QObject *o, QEvent *e)

Properties

QString dataSource
QCString dataSourceMimeType
Order order
QDate date
bool autoAdvance
QDate maxValue
QDate minValue
bool readOnly


Member Enumeration Documentation

enum KexiDBDateEdit::Order
 

Enumeration values:
DMY 
MDY 
YMD 
YDM 

Definition at line 47 of file kexidbdateedit.h.


Constructor & Destructor Documentation

KexiDBDateEdit::KexiDBDateEdit const QDate &  date,
QWidget parent,
const char *  name = 0
 

Definition at line 31 of file kexidbdateedit.cpp.

References acceptDate(), dateChanged(), slotShowDatePicker(), slotValueChanged(), and KexiDataItemInterface::valueChanged().

KexiDBDateEdit::~KexiDBDateEdit  )  [virtual]
 

Definition at line 74 of file kexidbdateedit.cpp.


Member Function Documentation

void KexiDBDateEdit::acceptDate  )  [protected, slot]
 

Definition at line 191 of file kexidbdateedit.cpp.

Referenced by eventFilter(), and KexiDBDateEdit().

bool KexiDBDateEdit::autoAdvance  )  const [inline]
 

Definition at line 84 of file kexidbdateedit.h.

void KexiDBDateEdit::clear  )  [virtual]
 

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

Implements KexiDataItemInterface.

Definition at line 167 of file kexidbdateedit.cpp.

bool KexiDBDateEdit::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 157 of file kexidbdateedit.cpp.

bool KexiDBDateEdit::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 148 of file kexidbdateedit.cpp.

QString KexiDBDateEdit::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 52 of file kexidbdateedit.h.

References KexiFormDataItemInterface::dataSource().

QCString KexiDBDateEdit::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 53 of file kexidbdateedit.h.

References KexiFormDataItemInterface::dataSourceMimeType().

QDate KexiDBDateEdit::date  )  const [inline]
 

Definition at line 80 of file kexidbdateedit.h.

Referenced by slotShowDatePicker().

void KexiDBDateEdit::dateChanged const QDate &  date  )  [signal]
 

Referenced by KexiDBDateEdit().

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

Definition at line 198 of file kexidbdateedit.cpp.

References acceptDate().

bool KexiDBDateEdit::isReadOnly  )  const [virtual]
 

Returns:
'readOnly' flag for this widget.

Reimplemented from KexiDataItemInterface.

Definition at line 130 of file kexidbdateedit.cpp.

QDate KexiDBDateEdit::maxValue  )  const [inline]
 

Definition at line 88 of file kexidbdateedit.h.

QDate KexiDBDateEdit::minValue  )  const [inline]
 

Definition at line 86 of file kexidbdateedit.h.

Order KexiDBDateEdit::order  )  const [inline]
 

Definition at line 82 of file kexidbdateedit.h.

void KexiDBDateEdit::setAutoAdvance bool  advance  )  [inline]
 

Definition at line 83 of file kexidbdateedit.h.

void KexiDBDateEdit::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 94 of file kexidbdateedit.h.

References KexiFormDataItemInterface::setDataSource().

void KexiDBDateEdit::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 95 of file kexidbdateedit.h.

References KexiFormDataItemInterface::setDataSourceMimeType().

void KexiDBDateEdit::setDate const QDate &  date  )  [inline, slot]
 

Definition at line 96 of file kexidbdateedit.h.

void KexiDBDateEdit::setEnabled bool  enabled  )  [virtual]
 

Definition at line 89 of file kexidbdateedit.cpp.

Referenced by setInvalidState().

void KexiDBDateEdit::setInvalidState const QString displayText  )  [virtual]
 

Todo:
move this to KexiDataItemInterface::setInvalidStateInternal() ?

Implements KexiFormDataItemInterface.

Definition at line 78 of file kexidbdateedit.cpp.

References setEnabled(), and setReadOnly().

void KexiDBDateEdit::setMaxValue const QDate &  d  )  [inline]
 

Definition at line 87 of file kexidbdateedit.h.

void KexiDBDateEdit::setMinValue const QDate &  d  )  [inline]
 

Definition at line 85 of file kexidbdateedit.h.

void KexiDBDateEdit::setOrder Order  order  )  [inline]
 

Definition at line 81 of file kexidbdateedit.h.

void KexiDBDateEdit::setReadOnly bool  set  )  [virtual, slot]
 

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 137 of file kexidbdateedit.cpp.

Referenced by setInvalidState().

void KexiDBDateEdit::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.

Definition at line 97 of file kexidbdateedit.cpp.

References KexiDataItemInterface::m_origValue.

void KexiDBDateEdit::slotShowDatePicker  )  [protected, slot]
 

Definition at line 180 of file kexidbdateedit.cpp.

References date().

Referenced by KexiDBDateEdit().

void KexiDBDateEdit::slotValueChanged const QDate &   )  [protected, slot]
 

Definition at line 174 of file kexidbdateedit.cpp.

Referenced by KexiDBDateEdit().

QVariant KexiDBDateEdit::value  )  [virtual]
 

Returns:
value currently represented by this item.

Implements KexiDataItemInterface.

Definition at line 115 of file kexidbdateedit.cpp.

bool KexiDBDateEdit::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 or form is met.

Implements KexiDataItemInterface.

Definition at line 125 of file kexidbdateedit.cpp.

bool KexiDBDateEdit::valueIsNull  )  [virtual]
 

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

Implements KexiDataItemInterface.

Definition at line 120 of file kexidbdateedit.cpp.

QWidget * KexiDBDateEdit::widget  )  [virtual]
 

Returns:
the view widget of this item, e.g. line edit widget.

Reimplemented from KexiFormDataItemInterface.

Definition at line 143 of file kexidbdateedit.cpp.


Property Documentation

bool KexiDBDateEdit::autoAdvance [read, write]
 

Definition at line 41 of file kexidbdateedit.h.

QString KexiDBDateEdit::dataSource [read, write]
 

Definition at line 35 of file kexidbdateedit.h.

QCString KexiDBDateEdit::dataSourceMimeType [read, write]
 

Definition at line 36 of file kexidbdateedit.h.

QDate KexiDBDateEdit::date [read, write]
 

Definition at line 40 of file kexidbdateedit.h.

QDate KexiDBDateEdit::maxValue [read, write]
 

Definition at line 42 of file kexidbdateedit.h.

QDate KexiDBDateEdit::minValue [read, write]
 

Definition at line 43 of file kexidbdateedit.h.

Order KexiDBDateEdit::order [read, write]
 

Definition at line 39 of file kexidbdateedit.h.

bool KexiDBDateEdit::readOnly [read, write]
 

Definition at line 44 of file kexidbdateedit.h.


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:56 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003