Kexi API Documentation (2.0 alpha)

kexidatetimeformatter.cpp File Reference

#include "kexidatetimeformatter.h"
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
#include <klineedit.h>
#include <kpopupmenu.h>
#include <kdatewidget.h>

Go to the source code of this file.

Functions

QString dateTimeInputMask (const KexiDateFormatter &dateFormatter, const KexiTimeFormatter &timeFormatter)
QDateTime stringToDateTime (const KexiDateFormatter &dateFormatter, const KexiTimeFormatter &timeFormatter, const QString &str)
bool dateTimeIsEmpty (const KexiDateFormatter &dateFormatter, const KexiTimeFormatter &timeFormatter, const QString &str)
bool dateTimeIsValid (const KexiDateFormatter &dateFormatter, const KexiTimeFormatter &timeFormatter, const QString &str)


Function Documentation

QString dateTimeInputMask const KexiDateFormatter dateFormatter,
const KexiTimeFormatter timeFormatter
 

Returns:
a date/time input mask using date and time formatter. Date is separated from time by one space character.

Definition at line 318 of file kexidatetimeformatter.cpp.

References KexiDateFormatter::inputMask(), and KexiTimeFormatter::inputMask().

Referenced by KexiQueryParameters::getParameters(), KexiTextFormatter::inputMask(), KexiDateTimeTableEdit::KexiDateTimeTableEdit(), and KexiDBLineEdit::setColumnInfo().

bool dateTimeIsEmpty const KexiDateFormatter dateFormatter,
const KexiTimeFormatter timeFormatter,
const QString str
 

Returns:
true if str contains only spaces and separators according to formats provided by dateFormatter and timeFormatter.

Definition at line 347 of file kexidatetimeformatter.cpp.

References KexiTimeFormatter::isEmpty(), and KexiDateFormatter::isEmpty().

Referenced by KexiDateTimeTableEdit::textIsEmpty(), KexiTextFormatter::valueIsEmpty(), and KexiDBLineEdit::valueIsEmpty().

bool dateTimeIsValid const KexiDateFormatter dateFormatter,
const KexiTimeFormatter timeFormatter,
const QString str
 

Returns:
true if str gives valid date/time value according to formats provided by dateFormatter and timeFormatter.

Definition at line 356 of file kexidatetimeformatter.cpp.

References KexiTimeFormatter::isEmpty(), and KexiTimeFormatter::stringToTime().

Referenced by KexiTextFormatter::valueIsValid(), KexiDBLineEdit::valueIsValid(), and KexiDateTimeTableEdit::valueIsValid().

QDateTime stringToDateTime const KexiDateFormatter dateFormatter,
const KexiTimeFormatter timeFormatter,
const QString str
 

Returns:
a QDateTime value converted from string using dateFormatter and timeFormatter. A single space between date and time is assumed. Invalid value is returned when str contains no valid date or str contains invalid time. Value with time equal 00:00:00 is returned if str contains empty time part.

Definition at line 325 of file kexidatetimeformatter.cpp.

References KexiTimeFormatter::isEmpty(), KexiDateFormatter::stringToDate(), and KexiTimeFormatter::stringToTime().

Referenced by KexiQueryParameters::getParameters(), KexiDateTimeTableEdit::handleAction(), KexiTextFormatter::textToValue(), KexiDBLineEdit::value(), KexiDateTimeTableEdit::value(), and KexiDateTimeTableEdit::valueIsNull().

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