-rw-r--r-- | library/datebookmonth.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp index 728045f..76e022f 100644 --- a/library/datebookmonth.cpp +++ b/library/datebookmonth.cpp | |||
@@ -1,97 +1,92 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the 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 "config.h" | 20 | #include "config.h" |
21 | #include "datebookmonth.h" | 21 | #include "datebookmonth.h" |
22 | #include "datebookdb.h" | 22 | #include "datebookdb.h" |
23 | #include <qtopia/private/event.h> | ||
24 | #include "resource.h" | 23 | #include "resource.h" |
25 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
26 | #include "timestring.h" | ||
27 | 25 | ||
28 | #include <qtoolbutton.h> | 26 | #include <qtoolbutton.h> |
29 | #include <qspinbox.h> | 27 | #include <qspinbox.h> |
30 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
31 | #include <qdatetime.h> | ||
32 | #include <qpainter.h> | ||
33 | #include <qpopupmenu.h> | ||
34 | #include <qvaluestack.h> | 29 | #include <qvaluestack.h> |
35 | #include <qwhatsthis.h> | 30 | #include <qwhatsthis.h> |
36 | 31 | ||
37 | 32 | ||
38 | DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) | 33 | DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) |
39 | : QHBox( parent, name ) | 34 | : QHBox( parent, name ) |
40 | { | 35 | { |
41 | setBackgroundMode( PaletteButton ); | 36 | setBackgroundMode( PaletteButton ); |
42 | 37 | ||
43 | begin = new QToolButton( this ); | 38 | begin = new QToolButton( this ); |
44 | begin->setFocusPolicy(NoFocus); | 39 | begin->setFocusPolicy(NoFocus); |
45 | begin->setPixmap( Resource::loadPixmap( "start" ) ); | 40 | begin->setPixmap( Resource::loadPixmap( "start" ) ); |
46 | begin->setAutoRaise( TRUE ); | 41 | begin->setAutoRaise( TRUE ); |
47 | begin->setFixedSize( begin->sizeHint() ); | 42 | begin->setFixedSize( begin->sizeHint() ); |
48 | QWhatsThis::add( begin, tr("Show January in the selected year") ); | 43 | QWhatsThis::add( begin, tr("Show January in the selected year") ); |
49 | 44 | ||
50 | back = new QToolButton( this ); | 45 | back = new QToolButton( this ); |
51 | back->setFocusPolicy(NoFocus); | 46 | back->setFocusPolicy(NoFocus); |
52 | back->setPixmap( Resource::loadPixmap( "back" ) ); | 47 | back->setPixmap( Resource::loadPixmap( "back" ) ); |
53 | back->setAutoRaise( TRUE ); | 48 | back->setAutoRaise( TRUE ); |
54 | back->setFixedSize( back->sizeHint() ); | 49 | back->setFixedSize( back->sizeHint() ); |
55 | QWhatsThis::add( back, tr("Show the previous month") ); | 50 | QWhatsThis::add( back, tr("Show the previous month") ); |
56 | 51 | ||
57 | month = new QComboBox( FALSE, this ); | 52 | month = new QComboBox( FALSE, this ); |
58 | for ( int i = 0; i < 12; ++i ) | 53 | for ( int i = 0; i < 12; ++i ) |
59 | month->insertItem( Calendar::nameOfMonth( i + 1 ) ); | 54 | month->insertItem( Calendar::nameOfMonth( i + 1 ) ); |
60 | 55 | ||
61 | year = new QSpinBox( 1752, 8000, 1, this ); | 56 | year = new QSpinBox( 1752, 8000, 1, this ); |
62 | 57 | ||
63 | next = new QToolButton( this ); | 58 | next = new QToolButton( this ); |
64 | next->setFocusPolicy(NoFocus); | 59 | next->setFocusPolicy(NoFocus); |
65 | next->setPixmap( Resource::loadPixmap( "forward" ) ); | 60 | next->setPixmap( Resource::loadPixmap( "forward" ) ); |
66 | next->setAutoRaise( TRUE ); | 61 | next->setAutoRaise( TRUE ); |
67 | next->setFixedSize( next->sizeHint() ); | 62 | next->setFixedSize( next->sizeHint() ); |
68 | QWhatsThis::add( next, tr("Show the next month") ); | 63 | QWhatsThis::add( next, tr("Show the next month") ); |
69 | 64 | ||
70 | end = new QToolButton( this ); | 65 | end = new QToolButton( this ); |
71 | end->setFocusPolicy(NoFocus); | 66 | end->setFocusPolicy(NoFocus); |
72 | end->setPixmap( Resource::loadPixmap( "finish" ) ); | 67 | end->setPixmap( Resource::loadPixmap( "finish" ) ); |
73 | end->setAutoRaise( TRUE ); | 68 | end->setAutoRaise( TRUE ); |
74 | end->setFixedSize( end->sizeHint() ); | 69 | end->setFixedSize( end->sizeHint() ); |
75 | QWhatsThis::add( end, tr("Show December in the selected year") ); | 70 | QWhatsThis::add( end, tr("Show December in the selected year") ); |
76 | 71 | ||
77 | connect( month, SIGNAL( activated( int ) ), | 72 | connect( month, SIGNAL( activated( int ) ), |
78 | this, SLOT( updateDate() ) ); | 73 | this, SLOT( updateDate() ) ); |
79 | connect( year, SIGNAL( valueChanged( int ) ), | 74 | connect( year, SIGNAL( valueChanged( int ) ), |
80 | this, SLOT( updateDate() ) ); | 75 | this, SLOT( updateDate() ) ); |
81 | connect( begin, SIGNAL( clicked() ), | 76 | connect( begin, SIGNAL( clicked() ), |
82 | this, SLOT( firstMonth() ) ); | 77 | this, SLOT( firstMonth() ) ); |
83 | connect( end, SIGNAL( clicked() ), | 78 | connect( end, SIGNAL( clicked() ), |
84 | this, SLOT( lastMonth() ) ); | 79 | this, SLOT( lastMonth() ) ); |
85 | connect( back, SIGNAL( clicked() ), | 80 | connect( back, SIGNAL( clicked() ), |
86 | this, SLOT( monthBack() ) ); | 81 | this, SLOT( monthBack() ) ); |
87 | connect( next, SIGNAL( clicked() ), | 82 | connect( next, SIGNAL( clicked() ), |
88 | this, SLOT( monthForward() ) ); | 83 | this, SLOT( monthForward() ) ); |
89 | back->setAutoRepeat( TRUE ); | 84 | back->setAutoRepeat( TRUE ); |
90 | next->setAutoRepeat( TRUE ); | 85 | next->setAutoRepeat( TRUE ); |
91 | } | 86 | } |
92 | 87 | ||
93 | 88 | ||
94 | DateBookMonthHeader::~DateBookMonthHeader() | 89 | DateBookMonthHeader::~DateBookMonthHeader() |
95 | { | 90 | { |
96 | 91 | ||
97 | } | 92 | } |