author | eilers <eilers> | 2003-08-08 14:45:49 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-08 14:45:49 (UTC) |
commit | 14d394e6c107b037a09a31a92605034fe50f7813 (patch) (unidiff) | |
tree | 800699cf4dc9681c3eb023340634dd6a15fd04c8 /library/calendar.cpp | |
parent | dbc6ea35f5535a1f69deb7ebbafc0f721721dbf2 (diff) | |
download | opie-14d394e6c107b037a09a31a92605034fe50f7813.zip opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.gz opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.bz2 |
Merged branches from BRANCH_1_0
-rw-r--r-- | library/calendar.cpp | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/library/calendar.cpp b/library/calendar.cpp index b9ef585..c7536c3 100644 --- a/library/calendar.cpp +++ b/library/calendar.cpp | |||
@@ -17,25 +17,71 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "calendar.h" | 20 | #include "calendar.h" |
21 | 21 | ||
22 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
23 | #include <qobject.h> | ||
24 | |||
25 | /*! \class Calendar calendar.html | ||
26 | |||
27 | \brief The Calendar class provides programmers with an easy to calculate | ||
28 | and get information about dates, months and years. | ||
29 | |||
30 | \ingroup qtopiaemb | ||
31 | */ | ||
32 | |||
33 | |||
34 | |||
35 | static void never_called_tr_function_um_libqpe_ts_etwas_unter_zu_jubeln() { | ||
36 | (void)QObject::tr("Jan"); | ||
37 | (void)QObject::tr("Feb"); | ||
38 | (void)QObject::tr("Mar"); | ||
39 | (void)QObject::tr("Apr"); | ||
40 | (void)QObject::tr("May"); | ||
41 | (void)QObject::tr("Jun"); | ||
42 | (void)QObject::tr("Jul"); | ||
43 | (void)QObject::tr("Aug"); | ||
44 | (void)QObject::tr("Sep"); | ||
45 | (void)QObject::tr("Oct"); | ||
46 | (void)QObject::tr("Nov"); | ||
47 | (void)QObject::tr("Dec"); | ||
48 | (void)QObject::tr("Mon"); | ||
49 | (void)QObject::tr("Tue"); | ||
50 | (void)QObject::tr("Wed"); | ||
51 | (void)QObject::tr("Thu"); | ||
52 | (void)QObject::tr("Fri"); | ||
53 | (void)QObject::tr("Sat"); | ||
54 | (void)QObject::tr("Sun"); | ||
55 | } | ||
56 | |||
57 | |||
58 | |||
59 | /*! | ||
60 | Returns the name of the month for \a m. | ||
61 | Equivalent to QDate::monthName(). | ||
62 | */ | ||
23 | 63 | ||
24 | QString Calendar::nameOfMonth( int m ) | 64 | QString Calendar::nameOfMonth( int m ) |
25 | { | 65 | { |
26 | QDate d; | 66 | QDate d; |
27 | return d.monthName( m ); | 67 | qDebug( d.monthName( m ) ); |
68 | return QObject::tr( d.monthName( m ) ); | ||
28 | } | 69 | } |
29 | 70 | ||
71 | /*! | ||
72 | Returns the name of the day for \a d. | ||
73 | Equivalent to QDate::dayName(). | ||
74 | */ | ||
30 | QString Calendar::nameOfDay( int d ) | 75 | QString Calendar::nameOfDay( int d ) |
31 | { | 76 | { |
32 | QDate dt; | 77 | QDate dt; |
33 | return dt.dayName( d ); | 78 | return QObject::tr( dt.dayName( d ) ); |
34 | } | 79 | } |
35 | 80 | ||
81 | /*! \obsolete */ | ||
36 | QValueList<Calendar::Day> Calendar::daysOfMonth( int year, int month, | 82 | QValueList<Calendar::Day> Calendar::daysOfMonth( int year, int month, |
37 | bool startWithMonday ) | 83 | bool startWithMonday ) |
38 | { | 84 | { |
39 | QDate temp; | 85 | QDate temp; |
40 | temp.setYMD( year, month, 1 ); | 86 | temp.setYMD( year, month, 1 ); |
41 | int firstDay = temp.dayOfWeek(); | 87 | int firstDay = temp.dayOfWeek(); |