kexi
KexiTimeFormatter Class Reference
#include <kexitimetableedit.h>
Detailed Description
Time formatter used by KexiTimeTableEdit and KexiDateTimeTableEdit Following time formats are allowed: HH:MM:SS (24h), HH:MM (24h), HH:MM AM/PM (12h) Separator MUST be ":".
Definition at line 30 of file kexitimetableedit.h.
Public Member Functions | |
KexiTimeFormatter () | |
~KexiTimeFormatter () | |
QTime | stringToTime (const QString &str) |
QString | timeToString (const QTime &time) const |
QString | inputMask () const |
Protected Attributes | |
QString | m_inputMask |
bool | m_24h |
bool | m_hoursWithLeadingZero |
QString | m_outputFormat |
int | m_hourpos |
int | m_minpos |
int | m_secpos |
int | m_ampmpos |
QRegExp | m_hmsRegExp |
QRegExp | m_hmRegExp |
Constructor & Destructor Documentation
KexiTimeFormatter::KexiTimeFormatter | ( | ) |
Creates new formatter with KDE setting for time.
CS
Definition at line 47 of file kexitimetableedit.cpp.
KexiTimeFormatter::~KexiTimeFormatter | ( | ) |
Member Function Documentation
QString KexiTimeFormatter::inputMask | ( | ) | const [inline] |
- Returns:
- Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask().
Definition at line 51 of file kexitimetableedit.h.
QTime KexiTimeFormatter::stringToTime | ( | const QString & | str | ) |
converts string str to time using predefined settings
- Returns:
- invalid time if the conversion is impossible
Definition at line 144 of file kexitimetableedit.cpp.
QString KexiTimeFormatter::timeToString | ( | const QTime & | time | ) | const |
converts time to string using predefined settings
- Returns:
- null string if time is invalid
Definition at line 117 of file kexitimetableedit.cpp.
Member Data Documentation
bool KexiTimeFormatter::m_24h [protected] |
int KexiTimeFormatter::m_hourpos [protected] |
Used in stringToTime() to convert string back to QTime.
Definition at line 69 of file kexitimetableedit.h.
QString KexiTimeFormatter::m_inputMask [protected] |
Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask().
Definition at line 55 of file kexitimetableedit.h.
QString KexiTimeFormatter::m_outputFormat [protected] |
Time format used in timeToString(). Notation from KLocale::setTimeFormat() is used.
Definition at line 66 of file kexitimetableedit.h.
The documentation for this class was generated from the following files: