author | waspe <waspe> | 2003-11-03 18:28:50 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-03 18:28:50 (UTC) |
commit | 87a9d6badcf518ffd14559ef886ff7729b63b73b (patch) (unidiff) | |
tree | 05af57bcebb8a124c2561336e4ff3dfdd52aeccb /core/pim/datebook/datebookweekheaderimpl.cpp | |
parent | 9ce566fd5b280622670cf7b0e158f9d9c54e6e9a (diff) | |
download | opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.zip opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.gz opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.bz2 |
resolved merge conflict
Diffstat (limited to 'core/pim/datebook/datebookweekheaderimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweekheaderimpl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp index 770410e..84b4f1b 100644 --- a/core/pim/datebook/datebookweekheaderimpl.cpp +++ b/core/pim/datebook/datebookweekheaderimpl.cpp | |||
@@ -93,31 +93,32 @@ void DateBookWeekHeader::setDate( int y, int m, int d ) | |||
93 | { | 93 | { |
94 | setDate(QDate(y,m,d)); | 94 | setDate(QDate(y,m,d)); |
95 | } | 95 | } |
96 | 96 | ||
97 | void DateBookWeekHeader::setDate(const QDate &d) { | 97 | void DateBookWeekHeader::setDate(const QDate &d) { |
98 | int year,week,dayofweek; | 98 | int year,week,dayofweek; |
99 | date=d; | 99 | date=d; |
100 | dayofweek=d.dayOfWeek(); | 100 | dayofweek=d.dayOfWeek(); |
101 | if(bStartOnMonday) | 101 | if(bStartOnMonday) |
102 | dayofweek--; | 102 | dayofweek--; |
103 | else if( dayofweek == 7 ) | 103 | else if( dayofweek == 7 ) |
104 | /* we already have the right day -7 would lead to the current week..*/ | 104 | // we already have the right day -7 would lead to the current week.. |
105 | dayofweek = 0; | 105 | dayofweek = 0; |
106 | 106 | ||
107 | date=date.addDays(-dayofweek); | 107 | date=date.addDays(-dayofweek); |
108 | calcWeek(date,week,year,bStartOnMonday); | 108 | calcWeek(date,week,year,bStartOnMonday); |
109 | QDate start=date; | 109 | QDate start=date; |
110 | QDate stop=start.addDays(6); | 110 | QDate stop=start.addDays(6); |
111 | labelDate->setText( QString::number(start.day()) + "." + | 111 | labelDate->setText( QString::number(start.day()) + "." + |
112 | start.monthName(start.month()) + "-" + | 112 | Calendar::nameOfMonth( start.month()) + "-" + |
113 | QString::number(stop.day()) + "." + | 113 | QString::number(stop.day()) + "." + |
114 | start.monthName(stop.month()) +" ("+ | 114 | Calendar::nameOfMonth( stop.month()) +" ("+ |
115 | tr("w")+":"+QString::number( week ) +")"); | 115 | tr("w")+":"+QString::number( week ) +")"); |
116 | date = d; // bugfix: 0001126 - date has to be the selected date, not monday! | ||
116 | emit dateChanged(date); | 117 | emit dateChanged(date); |
117 | } | 118 | } |
118 | 119 | ||
119 | void DateBookWeekHeader::setStartOfWeek( bool onMonday ) | 120 | void DateBookWeekHeader::setStartOfWeek( bool onMonday ) |
120 | { | 121 | { |
121 | bStartOnMonday = onMonday; | 122 | bStartOnMonday = onMonday; |
122 | setDate( date ); | 123 | setDate( date ); |
123 | } | 124 | } |