KexiDateFormatter Class Reference
#include <kexidatetimeformatter.h>
Detailed Description
Date formatter used by KexiDateTableEdit and KexiDateTimeTableEdit.
Definition at line 27 of file kexidatetimeformatter.h.
Public Member Functions | |
| KexiDateFormatter () | |
| Creates new formatter with KDE setting for "short date". | |
| ~KexiDateFormatter () | |
| QDate | stringToDate (const QString &str) const |
| Converts string str to date using predefined settings. | |
| QVariant | stringToVariant (const QString &str) const |
| QString | dateToString (const QDate &date) const |
| Converts date to string using predefined settings. | |
| QString | inputMask () const |
| QString | separator () const |
| bool | isEmpty (const QString &str) const |
Protected Attributes | |
| QString | m_inputMask |
| Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask(). | |
| QDateEdit::Order | m_order |
| Order of date sections. | |
| bool | m_longYear |
| 4 or 2 digits | |
| bool | m_monthWithLeadingZero |
| bool | m_dayWithLeadingZero |
| QString | m_qtFormat |
| Date format used in dateToString(). | |
| int | m_yearpos |
| Used in stringToDate() to convert string back to QDate. | |
| int | m_monthpos |
| Used in stringToDate() to convert string back to QDate. | |
| int | m_daypos |
| Used in stringToDate() to convert string back to QDate. | |
| QString | m_separator |
Constructor & Destructor Documentation
|
|
Creates new formatter with KDE setting for "short date".
Definition at line 31 of file kexidatetimeformatter.cpp. References m_daypos, m_dayWithLeadingZero, m_inputMask, m_longYear, m_monthpos, m_monthWithLeadingZero, m_order, m_qtFormat, m_separator, and m_yearpos. |
|
|
Definition at line 116 of file kexidatetimeformatter.cpp. |
Member Function Documentation
|
|
Converts date to string using predefined settings.
Definition at line 163 of file kexidatetimeformatter.cpp. References m_qtFormat. Referenced by KexiDateTimeTableEdit::handleCopyAction(), KexiDateTableEdit::handleCopyAction(), KexiDateTimeTableEdit::setupContents(), KexiDateTableEdit::setupContents(), KexiDateTimeTableEdit::setValueInInternalEditor(), and KexiDateTableEdit::setValueInInternalEditor(). |
|
|
Definition at line 55 of file kexidatetimeformatter.h. Referenced by dateTimeInputMask(), KexiQueryParameters::getParameters(), and KexiDateTableEdit::KexiDateTableEdit(). |
|
|
Definition at line 157 of file kexidatetimeformatter.cpp. References m_separator. Referenced by dateTimeIsEmpty(), stringToVariant(), KexiDateTableEdit::valueIsNull(), and KexiDateTableEdit::valueIsValid(). |
|
|
Definition at line 58 of file kexidatetimeformatter.h. |
|
|
Converts string str to date using predefined settings.
Definition at line 120 of file kexidatetimeformatter.cpp. References m_daypos, m_longYear, m_monthpos, and m_yearpos. Referenced by KexiDateTableEdit::dateValue(), KexiQueryParameters::getParameters(), KexiDateTableEdit::handleAction(), stringToDateTime(), stringToVariant(), and KexiDateTableEdit::valueIsValid(). |
|
|
Converts string str to date using predefined settings and returns QVariant containing the date value. This method does the same as stringToDate() but if string contains invalid date representation, e.g. contains only spaces and separators, null QVariant() is returned. Definition at line 147 of file kexidatetimeformatter.cpp. References isEmpty(), and stringToDate(). Referenced by KexiDateTableEdit::value(). |
Member Data Documentation
|
|
Used in stringToDate() to convert string back to QDate.
Definition at line 80 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(), and stringToDate(). |
|
|
Definition at line 74 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(). |
|
|
Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask().
Definition at line 66 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(). |
|
|
4 or 2 digits
Definition at line 72 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(), and stringToDate(). |
|
|
Used in stringToDate() to convert string back to QDate.
Definition at line 80 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(), and stringToDate(). |
|
|
Definition at line 74 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(). |
|
|
Order of date sections.
Definition at line 69 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(). |
|
|
Date format used in dateToString().
Definition at line 77 of file kexidatetimeformatter.h. Referenced by dateToString(), and KexiDateFormatter(). |
|
|
Definition at line 82 of file kexidatetimeformatter.h. Referenced by isEmpty(), and KexiDateFormatter(). |
|
|
Used in stringToDate() to convert string back to QDate.
Definition at line 80 of file kexidatetimeformatter.h. Referenced by KexiDateFormatter(), and stringToDate(). |
The documentation for this class was generated from the following files:
