Diffstat (limited to 'core/pim/datebook/datebookdayheaderimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookdayheaderimpl.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/pim/datebook/datebookdayheaderimpl.cpp b/core/pim/datebook/datebookdayheaderimpl.cpp index 3e965f5..213c843 100644 --- a/core/pim/datebook/datebookdayheaderimpl.cpp +++ b/core/pim/datebook/datebookdayheaderimpl.cpp | |||
@@ -1,77 +1,73 @@ | |||
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 | #include "datebookdayheaderimpl.h" | 20 | #include "datebookdayheaderimpl.h" |
21 | 21 | ||
22 | #include <qpe/datebookmonth.h> | 22 | #include <qpe/datebookmonth.h> |
23 | #include <qpe/resource.h> | 23 | #include <qpe/resource.h> |
24 | #include <qpe/timestring.h> | ||
25 | 24 | ||
26 | #include <qbuttongroup.h> | 25 | #include <qbuttongroup.h> |
27 | #include <qpopupmenu.h> | ||
28 | #include <qstringlist.h> | ||
29 | #include <qtimer.h> | ||
30 | #include <qtoolbutton.h> | 26 | #include <qtoolbutton.h> |
31 | 27 | ||
32 | 28 | ||
33 | /* | 29 | /* |
34 | * Constructs a DateBookDayHeader which is a child of 'parent', with the | 30 | * Constructs a DateBookDayHeader which is a child of 'parent', with the |
35 | * name 'name' and widget flags set to 'f' | 31 | * name 'name' and widget flags set to 'f' |
36 | * | 32 | * |
37 | * The dialog will by default be modeless, unless you set 'modal' to | 33 | * The dialog will by default be modeless, unless you set 'modal' to |
38 | * TRUE to construct a modal dialog. | 34 | * TRUE to construct a modal dialog. |
39 | */ | 35 | */ |
40 | DateBookDayHeader::DateBookDayHeader( bool useMonday, | 36 | DateBookDayHeader::DateBookDayHeader( bool useMonday, |
41 | QWidget* parent, const char* name ) | 37 | QWidget* parent, const char* name ) |
42 | : DateBookDayHeaderBase( parent, name ), | 38 | : DateBookDayHeaderBase( parent, name ), |
43 | bUseMonday( useMonday ) | 39 | bUseMonday( useMonday ) |
44 | { | 40 | { |
45 | connect(date,SIGNAL(pressed()),this,SLOT(pickDate())); | 41 | connect(date,SIGNAL(pressed()),this,SLOT(pickDate())); |
46 | 42 | ||
47 | setupNames(); | 43 | setupNames(); |
48 | 44 | ||
49 | forward->setPixmap( Resource::loadPixmap( "forward" ) ); | 45 | forward->setPixmap( Resource::loadPixmap( "forward" ) ); |
50 | back->setPixmap( Resource::loadPixmap( "back" ) ); | 46 | back->setPixmap( Resource::loadPixmap( "back" ) ); |
51 | forwardweek->setPixmap( Resource::loadPixmap( "fastforward" ) ); | 47 | forwardweek->setPixmap( Resource::loadPixmap( "fastforward" ) ); |
52 | backweek->setPixmap( Resource::loadPixmap( "fastback" ) ); | 48 | backweek->setPixmap( Resource::loadPixmap( "fastback" ) ); |
53 | 49 | ||
54 | setBackgroundMode( PaletteButton ); | 50 | setBackgroundMode( PaletteButton ); |
55 | grpDays->setBackgroundMode( PaletteButton ); | 51 | grpDays->setBackgroundMode( PaletteButton ); |
56 | } | 52 | } |
57 | 53 | ||
58 | /* | 54 | /* |
59 | * Destroys the object and frees any allocated resources | 55 | * Destroys the object and frees any allocated resources |
60 | */ | 56 | */ |
61 | DateBookDayHeader::~DateBookDayHeader() | 57 | DateBookDayHeader::~DateBookDayHeader() |
62 | { | 58 | { |
63 | // no need to delete child widgets, Qt does it all for us | 59 | // no need to delete child widgets, Qt does it all for us |
64 | } | 60 | } |
65 | 61 | ||
66 | void DateBookDayHeader::setStartOfWeek( bool onMonday ) | 62 | void DateBookDayHeader::setStartOfWeek( bool onMonday ) |
67 | { | 63 | { |
68 | bUseMonday = onMonday; | 64 | bUseMonday = onMonday; |
69 | setupNames(); | 65 | setupNames(); |
70 | setDate( currDate.year(), currDate.month(), currDate.day() ); | 66 | setDate( currDate.year(), currDate.month(), currDate.day() ); |
71 | } | 67 | } |
72 | 68 | ||
73 | void DateBookDayHeader::setupNames() | 69 | void DateBookDayHeader::setupNames() |
74 | { | 70 | { |
75 | if ( bUseMonday ) { | 71 | if ( bUseMonday ) { |
76 | cmdDay1->setText( DateBookDayHeaderBase::tr("Monday").left(1) ); | 72 | cmdDay1->setText( DateBookDayHeaderBase::tr("Monday").left(1) ); |
77 | cmdDay2->setText( DateBookDayHeaderBase::tr("Tuesday").left(1) ); | 73 | cmdDay2->setText( DateBookDayHeaderBase::tr("Tuesday").left(1) ); |