Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TimeString Class Reference

A frontend to DateFormat. More...

#include </home/clem/local/src/opie/library/timestring.h>

List of all members.

Static Public Member Functions

static QString dateString (const QDateTime &dt, bool ampm, bool seconds)
static QString numberDateString (const QDate &d, DateFormat)
static QString numberDateString (const QDate &d)
static QString longNumberDateString (const QDate &d, DateFormat)
static QString longNumberDateString (const QDate &d)
static QString shortDate (const QDate &, DateFormat)
static QString dateString (const QDate &, DateFormat)
static QString longDateString (const QDate &, DateFormat)
static DateFormat currentDateFormat ()
Convience functions which use currentDateFormat
static QString shortDate (const QDate &d)
static QString dateString (const QDate &d)
static QString longDateString (const QDate &d)
Do not use as they don't honor system settings for AMPM
static QString dateString (const QDateTime &t, bool ampm=false)
static QString timeString (const QTime &t, bool ampm, bool seconds)
static QString timeString (const QTime &t, bool ampm=false)
static QString shortTime (bool ampm, bool seconds)
static QString shortTime (bool ampm=false)

Static Private Member Functions

static QString dateString (const QDateTime &t, bool ampm, bool seconds, DateFormat)


Detailed Description

A frontend to DateFormat.

A utility class to use DateFormat more easily

Todo:
For ODP add QDateTime and QTime operations honoring system settings

Definition at line 98 of file timestring.h.


Member Function Documentation

DateFormat TimeString::currentDateFormat  )  [static]
 

Definition at line 264 of file timestring.cpp.

References TimeStringFormatKeeper::currentFormat().

Referenced by Clock::Clock(), dateString(), longDateString(), longNumberDateString(), numberDateString(), shortDate(), and Clock::updateClock().

QString TimeString::dateString const QDateTime t,
bool  ampm,
bool  seconds,
DateFormat 
[static, private]
 

Definition at line 270 of file timestring.cpp.

References buf, d, QDateTime::date(), longDateString(), t, QDateTime::time(), and timeString().

QString TimeString::dateString const QDate d,
DateFormat  dtf
[static]
 

Calls and translates DateFormat::wordDate with d and DateFormat::longNumber|DateFormat::longWord This means we will translate the month name and have a 4 digit year (2004)

Example: '20 Feb 2004'

Parameters:
d The QDate.
f The DateFormat which will be called

Definition at line 252 of file timestring.cpp.

References DateFormat::longNumber, DateFormat::longWord, tr, and DateFormat::wordDate().

QString TimeString::dateString const QDateTime t,
bool  ampm = false
[static]
 

Do not use they do not honor system wide AMPM settings. Also

See also:
numberDateString

longNumberDateString

Definition at line 341 of file timestring.cpp.

References dateString(), and FALSE.

QString TimeString::dateString const QDateTime dt,
bool  ampm,
bool  seconds
[inline, static]
 

For internal use only.

Definition at line 116 of file timestring.h.

References currentDateFormat(), and dateString().

QString TimeString::dateString const QDate d  )  [inline, static]
 

This function calls the overloaded function with currentDateFormat()

Parameters:
d The QDate to be used
See also:
TimeString::dateString(const QDate& d,DateFormat);

Definition at line 111 of file timestring.h.

References currentDateFormat().

Referenced by DateBook::appMessage(), Clock::Clock(), dateString(), JpegSlave::fullImageInfo(), JpegSlave::iconViewName(), initApplication(), AlarmItem::setAlarm(), VMemo::startRecording(), and Clock::updateClock().

QString TimeString::longDateString const QDate d,
DateFormat  dtf
[static]
 

Calls and translates DateFormat::wordDate with DateFormat::showWeekDay|DateFormat::longNumber|DateFormat::longWord. This means you will have a string with the week day name, monthname and a four digit year.

Example: 'Fr, 20 Feb 2004'

Parameters:
d The QDate

Definition at line 258 of file timestring.cpp.

References DateFormat::longNumber, DateFormat::longWord, DateFormat::showWeekDay, tr, and DateFormat::wordDate().

QString TimeString::longDateString const QDate d  )  [inline, static]
 

This functions calls the olverloaded function with currentDateFormat()

Parameters:
d The QDate to be used
See also:
TimeString::longDateString(const QDate& d,DateFormat);

Definition at line 113 of file timestring.h.

References currentDateFormat().

Referenced by dateString(), DateBookWeek::generateNormalTooltext(), TaskEditorStatus::load(), Today::loadShellContent(), PIMListView::makeString(), Today::refresh(), DateButton::setDate(), DateBookDayWidget::setEventText(), TaskEditorStatus::slotCompChanged(), TaskEditorStatus::slotDueChanged(), DateEntry::slotEditNote(), DateBookWeek::slotShowEvent(), TaskEditorStatus::slotStartChanged(), and TaskEditorStatus::TaskEditorStatus().

QString TimeString::longNumberDateString const QDate d  )  [inline, static]
 

This is an overloaded function and uses the currentDateFormat() of the system.

See also:
currentDateFormat()

longNumberDateString(const QDate&,DateFormat)

Parameters:
d The QDate to be used

Definition at line 135 of file timestring.h.

References currentDateFormat(), and longNumberDateString().

QString TimeString::longNumberDateString const QDate d,
DateFormat  dtf
[static]
 

Return the date as String in number coding (DD/MM/YYYY) depending on the date format. This uses the DateFormat::longNumber verbosity on the DateFormat::numberDate method

Parameters:
d The QDate to be used
f The DateFormat to be used

Definition at line 360 of file timestring.cpp.

References DateFormat::longNumber, and DateFormat::numberDate().

Referenced by longNumberDateString().

QString TimeString::numberDateString const QDate d  )  [inline, static]
 

This is an overloaded function and uses the currentDateFormat() of the system

See also:
currentDateFormat()
Parameters:
d The QDate to be used

Definition at line 132 of file timestring.h.

References currentDateFormat(), and numberDateString().

QString TimeString::numberDateString const QDate d,
DateFormat  dtf
[static]
 

Return the date as String in number coding (DD/MM/YY) depending on the date format

Parameters:
d The QDate to be used
f The DateFormat to be used

Definition at line 356 of file timestring.cpp.

References DateFormat::numberDate().

Referenced by TranInfo::datestr(), AbTable::findContactContact(), numberDateString(), RecMail::setDate(), ContactEditor::slotAnniversaryDateChanged(), ContactEditor::slotBirthdayDateChanged(), OContact::toRichText(), Opie::OPimContact::toRichText(), and ContactEditor::updateDatePicker().

QString TimeString::shortDate const QDate d,
DateFormat  dtf
[static]
 

Calls DateFormat::wordDate with d

Example: '20 Feb 04'

Parameters:
d The QDate used
f DateFormat which will be used for composing
Todo:
Make naming consistent with the two other functions calling wordDate

Definition at line 247 of file timestring.cpp.

References DateFormat::wordDate().

QString TimeString::shortDate const QDate d  )  [inline, static]
 

Call the overloaded function with currentDateFormat()

Parameters:
d The QDate to be transformed
See also:
TimeString::shortDate(const QDate& d,DateFormat)

Definition at line 109 of file timestring.h.

References currentDateFormat().

Referenced by ORecurranceWidget::endDateChanged(), OPimRecurrenceWidget::endDateChanged(), RepeatEntry::endDateChanged(), DateEntry::endDateChanged(), FindWidget::FindWidget(), RepeatEntry::RepeatEntry(), DateButton::setDate(), DateBookDayHeader::setDate(), ORecurranceWidget::setRecurrence(), OPimRecurrenceWidget::setRecurrence(), Transaction::slotDateChanged(), FindWidget::slotDateChanged(), ORecurranceWidget::slotNoEnd(), OPimRecurrenceWidget::slotNoEnd(), RepeatEntry::slotNoEnd(), FindWidget::slotWrapAround(), DateEntry::startDateChanged(), and Transaction::Transaction().

QString TimeString::shortTime bool  ampm = false  )  [static]
 

Definition at line 351 of file timestring.cpp.

References FALSE, and shortTime().

QString TimeString::shortTime bool  ampm,
bool  seconds
[static]
 

Definition at line 322 of file timestring.cpp.

References QDateTime::currentDateTime(), QDateTime::date(), QT_TRANSLATE_NOOP, QDateTime::time(), timeString(), and tr.

Referenced by shortTime(), ZoneMap::showCity(), and CityTime::showTime().

QString TimeString::timeString const QTime t,
bool  ampm = false
[static]
 

Definition at line 346 of file timestring.cpp.

References FALSE, and timeString().

QString TimeString::timeString const QTime t,
bool  ampm,
bool  seconds
[static]
 

Definition at line 283 of file timestring.cpp.

References QString::append(), QString::arg(), QTime::hour(), QTime::minute(), QString::number(), QString::prepend(), QTime::second(), QTime::toString(), and tr.

Referenced by DateBookEvent::DateBookEvent(), dateString(), DateBookWeek::generateNormalTooltext(), PIMListView::makeString(), AlarmItem::setAlarm(), RecMail::setDate(), DateBookDayWidget::setEventText(), shortTime(), and timeString().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:53:58 2005 for OPIE by  doxygen 1.4.2