author | umopapisdn <umopapisdn> | 2003-03-24 21:59:51 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2003-03-24 21:59:51 (UTC) |
commit | c1089dbda9c50a25e5aa6f4be410ed6a83a573c0 (patch) (unidiff) | |
tree | 61641c48bbcf51daab87e02e01020f7c478895b0 | |
parent | 40ea56466fcbc32eec8e48fcf78c5cd396be4f60 (diff) | |
download | opie-c1089dbda9c50a25e5aa6f4be410ed6a83a573c0.zip opie-c1089dbda9c50a25e5aa6f4be410ed6a83a573c0.tar.gz opie-c1089dbda9c50a25e5aa6f4be410ed6a83a573c0.tar.bz2 |
Change the icons for "back" & "forward" in the Weekview header in the
right files this time. :)
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 3 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklstheader.ui | 14 |
2 files changed, 5 insertions, 12 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 5334a16..4ceb360 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp | |||
@@ -1,86 +1,89 @@ | |||
1 | #include "datebookweeklst.h" | 1 | #include "datebookweeklst.h" |
2 | 2 | ||
3 | #include "datebookweekheaderimpl.h" | 3 | #include "datebookweekheaderimpl.h" |
4 | 4 | ||
5 | #include <qpe/calendar.h> | 5 | #include <qpe/calendar.h> |
6 | #include <qpe/datebookdb.h> | 6 | #include <qpe/datebookdb.h> |
7 | #include <qpe/event.h> | 7 | #include <qpe/event.h> |
8 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
9 | #include <qpe/timestring.h> | 9 | #include <qpe/timestring.h> |
10 | #include <qpe/datebookmonth.h> | 10 | #include <qpe/datebookmonth.h> |
11 | #include <qpe/config.h> | 11 | #include <qpe/config.h> |
12 | #include <qpe/resource.h> | ||
12 | 13 | ||
13 | #include <qdatetime.h> | 14 | #include <qdatetime.h> |
14 | #include <qheader.h> | 15 | #include <qheader.h> |
15 | #include <qlabel.h> | 16 | #include <qlabel.h> |
16 | #include <qlayout.h> | 17 | #include <qlayout.h> |
17 | #include <qpainter.h> | 18 | #include <qpainter.h> |
18 | #include <qpopupmenu.h> | 19 | #include <qpopupmenu.h> |
19 | #include <qtimer.h> | 20 | #include <qtimer.h> |
20 | #include <qstyle.h> | 21 | #include <qstyle.h> |
21 | #include <qtoolbutton.h> | 22 | #include <qtoolbutton.h> |
22 | #include <qvbox.h> | 23 | #include <qvbox.h> |
23 | #include <qsizepolicy.h> | 24 | #include <qsizepolicy.h> |
24 | #include <qabstractlayout.h> | 25 | #include <qabstractlayout.h> |
25 | #include <qtl.h> | 26 | #include <qtl.h> |
26 | 27 | ||
27 | bool calcWeek(const QDate &d, int &week, int &year, | 28 | bool calcWeek(const QDate &d, int &week, int &year, |
28 | bool startOnMonday = false); | 29 | bool startOnMonday = false); |
29 | 30 | ||
30 | DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, | 31 | DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, |
31 | const char* name, WFlags fl) | 32 | const char* name, WFlags fl) |
32 | : DateBookWeekLstHeaderBase(parent, name, fl) | 33 | : DateBookWeekLstHeaderBase(parent, name, fl) |
33 | { | 34 | { |
34 | setBackgroundMode( PaletteButton ); | 35 | setBackgroundMode( PaletteButton ); |
35 | labelDate->setBackgroundMode( PaletteButton ); | 36 | labelDate->setBackgroundMode( PaletteButton ); |
36 | labelWeek->setBackgroundMode( PaletteButton ); | 37 | labelWeek->setBackgroundMode( PaletteButton ); |
37 | forward->setBackgroundMode( PaletteButton ); | 38 | forward->setBackgroundMode( PaletteButton ); |
39 | forward->setPixmap( Resource::loadPixmap("forward") ); | ||
38 | back->setBackgroundMode( PaletteButton ); | 40 | back->setBackgroundMode( PaletteButton ); |
41 | back->setPixmap( Resource::loadPixmap("back") ); | ||
39 | DateBookWeekLstHeaderBaseLayout->setSpacing(0); | 42 | DateBookWeekLstHeaderBaseLayout->setSpacing(0); |
40 | DateBookWeekLstHeaderBaseLayout->setMargin(0); | 43 | DateBookWeekLstHeaderBaseLayout->setMargin(0); |
41 | //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); | 44 | //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); |
42 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); | 45 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); |
43 | 46 | ||
44 | connect(back, SIGNAL(clicked()), this, SLOT(prevWeek())); | 47 | connect(back, SIGNAL(clicked()), this, SLOT(prevWeek())); |
45 | connect(forward, SIGNAL(clicked()), this, SLOT(nextWeek())); | 48 | connect(forward, SIGNAL(clicked()), this, SLOT(nextWeek())); |
46 | connect(labelWeek, SIGNAL(clicked()), this, SLOT(pickDate())); | 49 | connect(labelWeek, SIGNAL(clicked()), this, SLOT(pickDate())); |
47 | connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); | 50 | connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); |
48 | onMonday=onM; | 51 | onMonday=onM; |
49 | } | 52 | } |
50 | DateBookWeekLstHeader::~DateBookWeekLstHeader(){} | 53 | DateBookWeekLstHeader::~DateBookWeekLstHeader(){} |
51 | void DateBookWeekLstHeader::setDate(const QDate &d) { | 54 | void DateBookWeekLstHeader::setDate(const QDate &d) { |
52 | date=d; | 55 | date=d; |
53 | 56 | ||
54 | int year,week; | 57 | int year,week; |
55 | calcWeek(d,week,year,onMonday); | 58 | calcWeek(d,week,year,onMonday); |
56 | labelWeek->setText(tr( "W: %1" ).arg( ( QString::number(week)) ) ); | 59 | labelWeek->setText(tr( "W: %1" ).arg( ( QString::number(week)) ) ); |
57 | 60 | ||
58 | QDate start=date; | 61 | QDate start=date; |
59 | QDate stop=start.addDays(6); | 62 | QDate stop=start.addDays(6); |
60 | labelDate->setText( QString::number(start.day()) + " " + | 63 | labelDate->setText( QString::number(start.day()) + " " + |
61 | start.monthName(start.month()) + " - " + | 64 | start.monthName(start.month()) + " - " + |
62 | QString::number(stop.day()) + " " + | 65 | QString::number(stop.day()) + " " + |
63 | start.monthName(stop.month()) ); | 66 | start.monthName(stop.month()) ); |
64 | emit dateChanged(year,week); | 67 | emit dateChanged(year,week); |
65 | } | 68 | } |
66 | void DateBookWeekLstHeader::pickDate() { | 69 | void DateBookWeekLstHeader::pickDate() { |
67 | static QPopupMenu *m1 = 0; | 70 | static QPopupMenu *m1 = 0; |
68 | static DateBookMonth *picker = 0; | 71 | static DateBookMonth *picker = 0; |
69 | if ( !m1 ) { | 72 | if ( !m1 ) { |
70 | m1 = new QPopupMenu( this ); | 73 | m1 = new QPopupMenu( this ); |
71 | picker = new DateBookMonth( m1, 0, TRUE ); | 74 | picker = new DateBookMonth( m1, 0, TRUE ); |
72 | m1->insertItem( picker ); | 75 | m1->insertItem( picker ); |
73 | connect( picker, SIGNAL( dateClicked( int, int, int ) ), | 76 | connect( picker, SIGNAL( dateClicked( int, int, int ) ), |
74 | this, SLOT( setDate( int, int, int ) ) ); | 77 | this, SLOT( setDate( int, int, int ) ) ); |
75 | //connect( m1, SIGNAL( aboutToHide() ), | 78 | //connect( m1, SIGNAL( aboutToHide() ), |
76 | //this, SLOT( gotHide() ) ); | 79 | //this, SLOT( gotHide() ) ); |
77 | } | 80 | } |
78 | picker->setDate( date.year(), date.month(), date.day() ); | 81 | picker->setDate( date.year(), date.month(), date.day() ); |
79 | m1->popup(mapToGlobal(labelWeek->pos()+QPoint(0,labelWeek->height()))); | 82 | m1->popup(mapToGlobal(labelWeek->pos()+QPoint(0,labelWeek->height()))); |
80 | picker->setFocus(); | 83 | picker->setFocus(); |
81 | } | 84 | } |
82 | void DateBookWeekLstHeader::setDate(int y, int m, int d) { | 85 | void DateBookWeekLstHeader::setDate(int y, int m, int d) { |
83 | QDate new_date(y,m,d); | 86 | QDate new_date(y,m,d); |
84 | setDate(new_date); | 87 | setDate(new_date); |
85 | } | 88 | } |
86 | 89 | ||
diff --git a/core/pim/datebook/datebookweeklstheader.ui b/core/pim/datebook/datebookweeklstheader.ui index 96cbfea..c71e046 100644 --- a/core/pim/datebook/datebookweeklstheader.ui +++ b/core/pim/datebook/datebookweeklstheader.ui | |||
@@ -11,97 +11,97 @@ | |||
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>183</y> | 13 | <y>183</y> |
14 | <width>447</width> | 14 | <width>447</width> |
15 | <height>45</height> | 15 | <height>45</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>sizePolicy</name> | 19 | <name>sizePolicy</name> |
20 | <sizepolicy> | 20 | <sizepolicy> |
21 | <hsizetype>7</hsizetype> | 21 | <hsizetype>7</hsizetype> |
22 | <vsizetype>0</vsizetype> | 22 | <vsizetype>0</vsizetype> |
23 | </sizepolicy> | 23 | </sizepolicy> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutMargin</name> | 26 | <name>layoutMargin</name> |
27 | </property> | 27 | </property> |
28 | <property> | 28 | <property> |
29 | <name>layoutSpacing</name> | 29 | <name>layoutSpacing</name> |
30 | </property> | 30 | </property> |
31 | <hbox> | 31 | <hbox> |
32 | <property stdset="1"> | 32 | <property stdset="1"> |
33 | <name>margin</name> | 33 | <name>margin</name> |
34 | <number>11</number> | 34 | <number>11</number> |
35 | </property> | 35 | </property> |
36 | <property stdset="1"> | 36 | <property stdset="1"> |
37 | <name>spacing</name> | 37 | <name>spacing</name> |
38 | <number>6</number> | 38 | <number>6</number> |
39 | </property> | 39 | </property> |
40 | <widget> | 40 | <widget> |
41 | <class>QToolButton</class> | 41 | <class>QToolButton</class> |
42 | <property stdset="1"> | 42 | <property stdset="1"> |
43 | <name>name</name> | 43 | <name>name</name> |
44 | <cstring>back</cstring> | 44 | <cstring>back</cstring> |
45 | </property> | 45 | </property> |
46 | <property stdset="1"> | 46 | <property stdset="1"> |
47 | <name>sizePolicy</name> | 47 | <name>sizePolicy</name> |
48 | <sizepolicy> | 48 | <sizepolicy> |
49 | <hsizetype>7</hsizetype> | 49 | <hsizetype>7</hsizetype> |
50 | <vsizetype>0</vsizetype> | 50 | <vsizetype>0</vsizetype> |
51 | </sizepolicy> | 51 | </sizepolicy> |
52 | </property> | 52 | </property> |
53 | <property stdset="1"> | 53 | <property stdset="1"> |
54 | <name>text</name> | 54 | <name>text</name> |
55 | <string></string> | 55 | <string></string> |
56 | </property> | 56 | </property> |
57 | <property stdset="1"> | 57 | <property stdset="1"> |
58 | <name>pixmap</name> | 58 | <name>pixmap</name> |
59 | <pixmap>image0</pixmap> | 59 | <pixmap></pixmap> |
60 | </property> | 60 | </property> |
61 | <property stdset="1"> | 61 | <property stdset="1"> |
62 | <name>toggleButton</name> | 62 | <name>toggleButton</name> |
63 | <bool>false</bool> | 63 | <bool>false</bool> |
64 | </property> | 64 | </property> |
65 | <property stdset="1"> | 65 | <property stdset="1"> |
66 | <name>autoRepeat</name> | 66 | <name>autoRepeat</name> |
67 | <bool>true</bool> | 67 | <bool>true</bool> |
68 | </property> | 68 | </property> |
69 | <property stdset="1"> | 69 | <property stdset="1"> |
70 | <name>autoRaise</name> | 70 | <name>autoRaise</name> |
71 | <bool>true</bool> | 71 | <bool>true</bool> |
72 | </property> | 72 | </property> |
73 | <property stdset="1"> | 73 | <property stdset="1"> |
74 | <name>toggleButton</name> | 74 | <name>toggleButton</name> |
75 | <bool>false</bool> | 75 | <bool>false</bool> |
76 | </property> | 76 | </property> |
77 | <property> | 77 | <property> |
78 | <name>toolTip</name> | 78 | <name>toolTip</name> |
79 | <string></string> | 79 | <string></string> |
80 | </property> | 80 | </property> |
81 | </widget> | 81 | </widget> |
82 | <spacer> | 82 | <spacer> |
83 | <property> | 83 | <property> |
84 | <name>name</name> | 84 | <name>name</name> |
85 | <cstring>Spacer1_3</cstring> | 85 | <cstring>Spacer1_3</cstring> |
86 | </property> | 86 | </property> |
87 | <property stdset="1"> | 87 | <property stdset="1"> |
88 | <name>orientation</name> | 88 | <name>orientation</name> |
89 | <enum>Horizontal</enum> | 89 | <enum>Horizontal</enum> |
90 | </property> | 90 | </property> |
91 | <property stdset="1"> | 91 | <property stdset="1"> |
92 | <name>sizeType</name> | 92 | <name>sizeType</name> |
93 | <enum>Expanding</enum> | 93 | <enum>Expanding</enum> |
94 | </property> | 94 | </property> |
95 | <property> | 95 | <property> |
96 | <name>sizeHint</name> | 96 | <name>sizeHint</name> |
97 | <size> | 97 | <size> |
98 | <width>20</width> | 98 | <width>20</width> |
99 | <height>20</height> | 99 | <height>20</height> |
100 | </size> | 100 | </size> |
101 | </property> | 101 | </property> |
102 | </spacer> | 102 | </spacer> |
103 | <widget> | 103 | <widget> |
104 | <class>QToolButton</class> | 104 | <class>QToolButton</class> |
105 | <property stdset="1"> | 105 | <property stdset="1"> |
106 | <name>name</name> | 106 | <name>name</name> |
107 | <cstring>labelWeek</cstring> | 107 | <cstring>labelWeek</cstring> |
@@ -244,72 +244,62 @@ | |||
244 | <property stdset="1"> | 244 | <property stdset="1"> |
245 | <name>text</name> | 245 | <name>text</name> |
246 | <string>00 Jan-00 Jan</string> | 246 | <string>00 Jan-00 Jan</string> |
247 | </property> | 247 | </property> |
248 | <property> | 248 | <property> |
249 | <name>hAlign</name> | 249 | <name>hAlign</name> |
250 | </property> | 250 | </property> |
251 | </widget> | 251 | </widget> |
252 | <spacer> | 252 | <spacer> |
253 | <property> | 253 | <property> |
254 | <name>name</name> | 254 | <name>name</name> |
255 | <cstring>Spacer1_2</cstring> | 255 | <cstring>Spacer1_2</cstring> |
256 | </property> | 256 | </property> |
257 | <property stdset="1"> | 257 | <property stdset="1"> |
258 | <name>orientation</name> | 258 | <name>orientation</name> |
259 | <enum>Horizontal</enum> | 259 | <enum>Horizontal</enum> |
260 | </property> | 260 | </property> |
261 | <property stdset="1"> | 261 | <property stdset="1"> |
262 | <name>sizeType</name> | 262 | <name>sizeType</name> |
263 | <enum>Expanding</enum> | 263 | <enum>Expanding</enum> |
264 | </property> | 264 | </property> |
265 | <property> | 265 | <property> |
266 | <name>sizeHint</name> | 266 | <name>sizeHint</name> |
267 | <size> | 267 | <size> |
268 | <width>20</width> | 268 | <width>20</width> |
269 | <height>20</height> | 269 | <height>20</height> |
270 | </size> | 270 | </size> |
271 | </property> | 271 | </property> |
272 | </spacer> | 272 | </spacer> |
273 | <widget> | 273 | <widget> |
274 | <class>QToolButton</class> | 274 | <class>QToolButton</class> |
275 | <property stdset="1"> | 275 | <property stdset="1"> |
276 | <name>name</name> | 276 | <name>name</name> |
277 | <cstring>forward</cstring> | 277 | <cstring>forward</cstring> |
278 | </property> | 278 | </property> |
279 | <property stdset="1"> | 279 | <property stdset="1"> |
280 | <name>sizePolicy</name> | 280 | <name>sizePolicy</name> |
281 | <sizepolicy> | 281 | <sizepolicy> |
282 | <hsizetype>1</hsizetype> | 282 | <hsizetype>1</hsizetype> |
283 | <vsizetype>0</vsizetype> | 283 | <vsizetype>0</vsizetype> |
284 | </sizepolicy> | 284 | </sizepolicy> |
285 | </property> | 285 | </property> |
286 | <property stdset="1"> | 286 | <property stdset="1"> |
287 | <name>text</name> | 287 | <name>text</name> |
288 | <string></string> | 288 | <string></string> |
289 | </property> | 289 | </property> |
290 | <property stdset="1"> | 290 | <property stdset="1"> |
291 | <name>pixmap</name> | 291 | <name>pixmap</name> |
292 | <pixmap>image1</pixmap> | 292 | <pixmap></pixmap> |
293 | </property> | 293 | </property> |
294 | <property stdset="1"> | 294 | <property stdset="1"> |
295 | <name>autoRepeat</name> | 295 | <name>autoRepeat</name> |
296 | <bool>true</bool> | 296 | <bool>true</bool> |
297 | </property> | 297 | </property> |
298 | <property stdset="1"> | 298 | <property stdset="1"> |
299 | <name>autoRaise</name> | 299 | <name>autoRaise</name> |
300 | <bool>true</bool> | 300 | <bool>true</bool> |
301 | </property> | 301 | </property> |
302 | </widget> | 302 | </widget> |
303 | </hbox> | 303 | </hbox> |
304 | </widget> | 304 | </widget> |
305 | <images> | ||
306 | <image> | ||
307 | <name>image0</name> | ||
308 | <data format="XPM.GZ" length="582">789c6dcfcd4e843010c0f13b4fd1d01b31bb6cb325211b1f41e3d1c4789876a60bcbd7aeae07637c773b6d5985d870e0f7ef50605b88e7a707516cb3f72b5c5b2b6c036fa2c08f61f87c79bdffcaf2dd5ef0558b5d7e97e51b61c5e33412df4b7f2fcbb09896a94ab557817063cd744cad74a915734aac35308740d018d9332d5ab0c8ec1229f2c2448d156a661b489ee1ab4e4cf2a08a790e24020abb0dd355442eec8e914e45526215790c749e8e89891069125de466b1fe14295705ccaa5863e2d05cc01894925b2a7e8217dd8a631eb169fd509af10fd1a9ebfbdf32008d9d0c07cd274f70ee162773ba2cdfee935c977ffe6b2edf87ec07796f81cd</data> | ||
309 | </image> | ||
310 | <image> | ||
311 | <name>image1</name> | ||
312 | <data format="XPM.GZ" length="627">789c7dcfc94ec3301006e07b9ec28a6f114a13cbb1a8108f00e28884387819676993340b07847877329ea8697a60ec83bfdf232f8784bdbfbdb0e4104db39e6bcb6ca54796b8afb6fdfef87cfe89e25cb2650ac1f2f8218a5366d96bdf01aef9b2e65928a4458a0c07b25c29890352e63293e19c53a0968f52230159e8c22981744495133552097554a1f982b4ce6aeb9013d215165c81ec894e109b4070ca85378f2b35f18c04050214b20d04d010762ba457003eecd6442f88f34a45f4817ea147762b35d1acf4c47457d784737d9f18ebee1363614bf852c6f812b6c460f90abb6e93ba694ed7c49fdbaeee2f76b83da71ba772e0db5d9ccf4b07dfdd5e858edd9b2948fff9d796fc3e457f660e8d47</data> | ||
313 | </image> | ||
314 | </images> | ||
315 | </UI> | 305 | </UI> |