diff options
Diffstat (limited to 'kexi/widget/utils/kexidatetimeformatter.h')
-rw-r--r-- | kexi/widget/utils/kexidatetimeformatter.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kexi/widget/utils/kexidatetimeformatter.h b/kexi/widget/utils/kexidatetimeformatter.h index 252bc535..1340320b 100644 --- a/kexi/widget/utils/kexidatetimeformatter.h +++ b/kexi/widget/utils/kexidatetimeformatter.h @@ -20,8 +20,8 @@ #ifndef KEXIDATETIMEFORMATTER_H #define KEXIDATETIMEFORMATTER_H -#include <qdatetimeedit.h> -#include <qregexp.h> +#include <tqdatetimeedit.h> +#include <tqregexp.h> //! @short Date formatter used by KexiDateTableEdit and KexiDateTimeTableEdit class KEXIGUIUTILS_EXPORT KexiDateFormatter @@ -37,36 +37,36 @@ class KEXIGUIUTILS_EXPORT KexiDateFormatter //! Converts string \a str to date using predefined settings. //! \return invalid date if the conversion is impossible - QDate stringToDate( const QString& str ) const; + TQDate stringToDate( const TQString& str ) const; /*! Converts string \a str to date using predefined settings - and returns QVariant containing the date value. + and returns TQVariant containing the date value. This method does the same as stringToDate() but if \a string contains invalid date representation, e.g. contains only spaces - and separators, null QVariant() is returned. */ - QVariant stringToVariant( const QString& str ) const; + and separators, null TQVariant() is returned. */ + TQVariant stringToVariant( const TQString& str ) const; //! Converts \a date to string using predefined settings. //! \return null string if \a date is invalid - QString dateToString( const QDate& date ) const; + TQString dateToString( const TQDate& date ) const; - //! \return Input mask generated using the formatter settings. - //! Can be used in QLineEdit::setInputMask(). - QString inputMask() const { return m_inputMask; } + //! \return Input tqmask generated using the formatter settings. + //! Can be used in TQLineEdit::setInputMask(). + TQString inputMask() const { return m_inputMask; } //! \return separator for this date format, a single character like "-" or "/" - QString separator() const { return m_separator; } + TQString separator() const { return m_separator; } //! \return true if \a str contains only spaces //! and separators according to the date format. - bool isEmpty( const QString& str ) const; + bool isEmpty( const TQString& str ) const; protected: - //! Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask(). - QString m_inputMask; + //! Input tqmask generated using the formatter settings. Can be used in TQLineEdit::setInputMask(). + TQString m_inputMask; //! Order of date sections - QDateEdit::Order m_order; + TQDateEdit::Order m_order; //! 4 or 2 digits bool m_longYear; @@ -74,12 +74,12 @@ class KEXIGUIUTILS_EXPORT KexiDateFormatter bool m_monthWithLeadingZero, m_dayWithLeadingZero; //! Date format used in dateToString() - QString m_qtFormat; + TQString m_qtFormat; - //! Used in stringToDate() to convert string back to QDate + //! Used in stringToDate() to convert string back to TQDate int m_yearpos, m_monthpos, m_daypos; - QString m_separator; + TQString m_separator; }; /*! @short Time formatter used by KexiTimeTableEdit and KexiDateTimeTableEdit @@ -98,33 +98,33 @@ class KEXIGUIUTILS_EXPORT KexiTimeFormatter //! converts string \a str to time using predefined settings //! \return invalid time if the conversion is impossible - QTime stringToTime( const QString& str ) const; + TQTime stringToTime( const TQString& str ) const; /*! Converts string \a str to time using predefined settings - and returns QVariant containing the time value. + and returns TQVariant containing the time value. This method does the same as stringToTime() but if \a string contains invalid time representation, e.g. contains only spaces - and separators, null QVariant() is returned. */ - QVariant stringToVariant( const QString& str ); + and separators, null TQVariant() is returned. */ + TQVariant stringToVariant( const TQString& str ); //! converts \a time to string using predefined settings //! \return null string if \a time is invalid - QString timeToString( const QTime& time ) const; + TQString timeToString( const TQTime& time ) const; - //! \return Input mask generated using the formatter settings. - //! Can be used in QLineEdit::setInputMask(). - QString inputMask() const { return m_inputMask; } + //! \return Input tqmask generated using the formatter settings. + //! Can be used in TQLineEdit::setInputMask(). + TQString inputMask() const { return m_inputMask; } //! \return true if \a str contains only spaces //! and separators according to the time format. - bool isEmpty( const QString& str ) const; + bool isEmpty( const TQString& str ) const; protected: - //! Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask(). - QString m_inputMask; + //! Input tqmask generated using the formatter settings. Can be used in TQLineEdit::setInputMask(). + TQString m_inputMask; // //! Order of date sections -// QDateEdit::Order m_order; +// TQDateEdit::Order m_order; //! 12 or 12h bool m_24h; @@ -132,34 +132,34 @@ class KEXIGUIUTILS_EXPORT KexiTimeFormatter bool m_hoursWithLeadingZero; //! Time format used in timeToString(). Notation from KLocale::setTimeFormat() is used. - QString m_outputFormat; + TQString m_outputFormat; - //! Used in stringToTime() to convert string back to QTime + //! Used in stringToTime() to convert string back to TQTime int m_hourpos, m_minpos, m_secpos, m_ampmpos; - QRegExp *m_hmsRegExp, *m_hmRegExp; + TQRegExp *m_hmsRegExp, *m_hmRegExp; }; -//! \return a date/time input mask using date and time formatter. +//! \return a date/time input tqmask using date and time formatter. //! Date is separated from time by one space character. -KEXIGUIUTILS_EXPORT QString dateTimeInputMask( +KEXIGUIUTILS_EXPORT TQString dateTimeInputMask( const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter); -/*! \return a QDateTime value converted from string using \a dateFormatter and \a timeFormatter. +/*! \return a TQDateTime value converted from string using \a dateFormatter and \a timeFormatter. A single space between date and time is assumed. Invalid value is returned when \a str contains no valid date or \a str contains invalid time. Value with time equal 00:00:00 is returned if \a str contains empty time part. */ -KEXIGUIUTILS_EXPORT QDateTime stringToDateTime( - const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const QString& str); +KEXIGUIUTILS_EXPORT TQDateTime stringToDateTime( + const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const TQString& str); /*! \return true if \a str contains only spaces and separators according to formats provided by \a dateFormatter and \a timeFormatter. */ KEXIGUIUTILS_EXPORT bool dateTimeIsEmpty( const KexiDateFormatter& dateFormatter, - const KexiTimeFormatter& timeFormatter, const QString& str ); + const KexiTimeFormatter& timeFormatter, const TQString& str ); /*! \return true if \a str gives valid date/time value according to formats provided by \a dateFormatter and \a timeFormatter. */ KEXIGUIUTILS_EXPORT bool dateTimeIsValid( const KexiDateFormatter& dateFormatter, - const KexiTimeFormatter& timeFormatter, const QString& str ); + const KexiTimeFormatter& timeFormatter, const TQString& str ); #endif |