Diffstat (limited to 'core/pim/datebook/repeatentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/repeatentry.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/pim/datebook/repeatentry.cpp b/core/pim/datebook/repeatentry.cpp index b1a162d..7cf36da 100644 --- a/core/pim/datebook/repeatentry.cpp +++ b/core/pim/datebook/repeatentry.cpp | |||
@@ -1,79 +1,75 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "repeatentry.h" | 21 | #include "repeatentry.h" |
22 | 22 | ||
23 | #include <qpe/datebookmonth.h> | 23 | #include <qpe/datebookmonth.h> |
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/timestring.h> | ||
26 | 25 | ||
27 | #include <qbuttongroup.h> | ||
28 | #include <qlabel.h> | 26 | #include <qlabel.h> |
29 | #include <qpopupmenu.h> | ||
30 | #include <qspinbox.h> | 27 | #include <qspinbox.h> |
31 | #include <qtoolbutton.h> | ||
32 | 28 | ||
33 | #include <time.h> | 29 | #include <time.h> |
34 | 30 | ||
35 | // Global Templates for use in setting up the repeat label... | 31 | // Global Templates for use in setting up the repeat label... |
36 | // the problem is these strings get initialized before QPEApplication can install the translator -zecke | 32 | // the problem is these strings get initialized before QPEApplication can install the translator -zecke |
37 | namespace { | 33 | namespace { |
38 | QString strDayTemplate; | 34 | QString strDayTemplate; |
39 | QString strYearTemplate; | 35 | QString strYearTemplate; |
40 | QString strMonthDateTemplate; | 36 | QString strMonthDateTemplate; |
41 | QString strMonthDayTemplate; | 37 | QString strMonthDayTemplate; |
42 | QString strWeekTemplate; | 38 | QString strWeekTemplate; |
43 | QString dayLabel[7]; | 39 | QString dayLabel[7]; |
44 | } | 40 | } |
45 | 41 | ||
46 | /* | 42 | /* |
47 | * static linkage to not polute the symbol table... | 43 | * static linkage to not polute the symbol table... |
48 | * The problem is that const and static linkage are resolved prior to installing a translator | 44 | * The problem is that const and static linkage are resolved prior to installing a translator |
49 | * leading to that the above strings are translted but to the original we delay the init of these strings... | 45 | * leading to that the above strings are translted but to the original we delay the init of these strings... |
50 | * -zecke | 46 | * -zecke |
51 | */ | 47 | */ |
52 | static void fillStrings() { | 48 | static void fillStrings() { |
53 | strDayTemplate = QObject::tr("Every"); | 49 | strDayTemplate = QObject::tr("Every"); |
54 | strYearTemplate = QObject::tr("%1 %2 every "); | 50 | strYearTemplate = QObject::tr("%1 %2 every "); |
55 | strMonthDateTemplate = QObject::tr("The %1 every "); | 51 | strMonthDateTemplate = QObject::tr("The %1 every "); |
56 | strMonthDayTemplate = QObject::tr("The %1 %1 of every"); | 52 | strMonthDayTemplate = QObject::tr("The %1 %1 of every"); |
57 | strWeekTemplate = QObject::tr("Every "); | 53 | strWeekTemplate = QObject::tr("Every "); |
58 | dayLabel[0] = QObject::tr("Monday"); | 54 | dayLabel[0] = QObject::tr("Monday"); |
59 | dayLabel[1] = QObject::tr("Tuesday"); | 55 | dayLabel[1] = QObject::tr("Tuesday"); |
60 | dayLabel[2] = QObject::tr("Wednesday"); | 56 | dayLabel[2] = QObject::tr("Wednesday"); |
61 | dayLabel[3] = QObject::tr("Thursday"); | 57 | dayLabel[3] = QObject::tr("Thursday"); |
62 | dayLabel[4] = QObject::tr("Friday"); | 58 | dayLabel[4] = QObject::tr("Friday"); |
63 | dayLabel[5] = QObject::tr("Saturday"); | 59 | dayLabel[5] = QObject::tr("Saturday"); |
64 | dayLabel[6] = QObject::tr("Sunday"); | 60 | dayLabel[6] = QObject::tr("Sunday"); |
65 | } | 61 | } |
66 | 62 | ||
67 | static QString numberPlacing( int x );// return the proper word format for | 63 | static QString numberPlacing( int x );// return the proper word format for |
68 | // x (1st, 2nd, etc) | 64 | // x (1st, 2nd, etc) |
69 | static int week( const QDate &dt ); // what week in the month is dt? | 65 | static int week( const QDate &dt ); // what week in the month is dt? |
70 | 66 | ||
71 | RepeatEntry::RepeatEntry( bool startOnMonday, | 67 | RepeatEntry::RepeatEntry( bool startOnMonday, |
72 | const QDate &newStart, QWidget *parent, | 68 | const QDate &newStart, QWidget *parent, |
73 | const char *name, bool modal, WFlags fl ) | 69 | const char *name, bool modal, WFlags fl ) |
74 | : RepeatEntryBase( parent, name, modal, fl ), | 70 | : RepeatEntryBase( parent, name, modal, fl ), |
75 | start( newStart ), | 71 | start( newStart ), |
76 | currInterval( NONE ), | 72 | currInterval( NONE ), |
77 | startWeekOnMonday( startOnMonday ) | 73 | startWeekOnMonday( startOnMonday ) |
78 | { | 74 | { |
79 | if (strDayTemplate.isEmpty() ) | 75 | if (strDayTemplate.isEmpty() ) |