author | zecke <zecke> | 2002-06-23 18:48:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-23 18:48:50 (UTC) |
commit | a27191487361a43e3240a144176688c75e54b868 (patch) (unidiff) | |
tree | 9ef647b417e522695ebd21234b4c88f0aa4e89c9 | |
parent | 25fbcaaa768b83cf0518aced5a76479617959769 (diff) | |
download | opie-a27191487361a43e3240a144176688c75e54b868.zip opie-a27191487361a43e3240a144176688c75e54b868.tar.gz opie-a27191487361a43e3240a144176688c75e54b868.tar.bz2 |
stupid me II
-rw-r--r-- | core/pim/datebook/datebook.pro | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro index 2edbf99..088ae3e 100644 --- a/core/pim/datebook/datebook.pro +++ b/core/pim/datebook/datebook.pro | |||
@@ -1,48 +1,46 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | DESTDIR = $(OPIEDIR)/bin | 3 | DESTDIR = $(OPIEDIR)/bin |
4 | 4 | ||
5 | HEADERS= datebookday.h \ | 5 | HEADERS= datebookday.h \ |
6 | datebook.h \ | 6 | datebook.h \ |
7 | dateentryimpl.h \ | 7 | dateentryimpl.h \ |
8 | datebookdayheaderimpl.h \ | 8 | datebookdayheaderimpl.h \ |
9 | datebooksettings.h \ | 9 | datebooksettings.h \ |
10 | datebooksettingsbase.h \ | ||
11 | datebookweek.h \ | 10 | datebookweek.h \ |
12 | datebookweeklst.h \ | 11 | datebookweeklst.h \ |
13 | datebookweekheaderimpl.h \ | 12 | datebookweekheaderimpl.h \ |
14 | repeatentry.h \ | 13 | repeatentry.h \ |
15 | timepicker.h \ | 14 | timepicker.h \ |
16 | noteentryimpl.h \ | 15 | noteentryimpl.h \ |
17 | onoteedit.h | 16 | onoteedit.h |
18 | 17 | ||
19 | SOURCES= main.cpp \ | 18 | SOURCES= main.cpp \ |
20 | datebookday.cpp \ | 19 | datebookday.cpp \ |
21 | datebook.cpp \ | 20 | datebook.cpp \ |
22 | dateentryimpl.cpp \ | 21 | dateentryimpl.cpp \ |
23 | datebookdayheaderimpl.cpp \ | 22 | datebookdayheaderimpl.cpp \ |
24 | datebooksettingsbase.cpp \ | ||
25 | datebooksettings.cpp \ | 23 | datebooksettings.cpp \ |
26 | datebookweek.cpp \ | 24 | datebookweek.cpp \ |
27 | datebookweeklst.cpp \ | 25 | datebookweeklst.cpp \ |
28 | datebookweekheaderimpl.cpp \ | 26 | datebookweekheaderimpl.cpp \ |
29 | repeatentry.cpp \ | 27 | repeatentry.cpp \ |
30 | timepicker.cpp \ | 28 | timepicker.cpp \ |
31 | noteentryimpl.cpp \ | 29 | noteentryimpl.cpp \ |
32 | onoteedit.cpp | 30 | onoteedit.cpp |
33 | 31 | ||
34 | INTERFACES= dateentry.ui \ | 32 | INTERFACES= dateentry.ui \ |
35 | datebookdayheader.ui \ | 33 | datebookdayheader.ui \ |
36 | datebookweekheader.ui \ | 34 | datebookweekheader.ui \ |
37 | datebookweeklstheader.ui \ | 35 | datebookweeklstheader.ui \ |
38 | datebookweeklstdayhdr.ui \ | 36 | datebookweeklstdayhdr.ui \ |
39 | repeatentrybase.ui \ | 37 | repeatentrybase.ui \ |
40 | datebooksettingsbase.ui \ | 38 | datebooksettingsbase.ui \ |
41 | noteentry.ui | 39 | noteentry.ui |
42 | 40 | ||
43 | INCLUDEPATH += $(OPIEDIR)/include | 41 | INCLUDEPATH += $(OPIEDIR)/include |
44 | DEPENDPATH+= $(OPIEDIR)/include | 42 | DEPENDPATH+= $(OPIEDIR)/include |
45 | LIBS += -lqpe -lopie | 43 | LIBS += -lqpe -lopie |
46 | 44 | ||
47 | TARGET = datebook | 45 | TARGET = datebook |
48 | 46 | ||
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 58a9c53..29519c1 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp | |||
@@ -6,49 +6,49 @@ | |||
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 | 12 | ||
13 | #include <qdatetime.h> | 13 | #include <qdatetime.h> |
14 | #include <qheader.h> | 14 | #include <qheader.h> |
15 | #include <qlabel.h> | 15 | #include <qlabel.h> |
16 | #include <qlayout.h> | 16 | #include <qlayout.h> |
17 | #include <qpainter.h> | 17 | #include <qpainter.h> |
18 | #include <qpopupmenu.h> | 18 | #include <qpopupmenu.h> |
19 | #include <qtimer.h> | 19 | #include <qtimer.h> |
20 | #include <qstyle.h> | 20 | #include <qstyle.h> |
21 | #include <qtoolbutton.h> | 21 | #include <qtoolbutton.h> |
22 | #include <qvbox.h> | 22 | #include <qvbox.h> |
23 | #include <qsizepolicy.h> | 23 | #include <qsizepolicy.h> |
24 | #include <qabstractlayout.h> | 24 | #include <qabstractlayout.h> |
25 | #include <qtl.h> | 25 | #include <qtl.h> |
26 | 26 | ||
27 | bool calcWeek(const QDate &d, int &week, int &year, | 27 | bool calcWeek(const QDate &d, int &week, int &year, |
28 | bool startOnMonday = false); | 28 | bool startOnMonday = false); |
29 | 29 | ||
30 | DateBookWeekLstHeader::DateBookWeekLstHeader(bool /*onM*/, QWidget* parent, | 30 | DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, |
31 | const char* name, WFlags fl) | 31 | const char* name, WFlags fl) |
32 | : DateBookWeekLstHeaderBase(parent, name, fl) | 32 | : DateBookWeekLstHeaderBase(parent, name, fl) |
33 | { | 33 | { |
34 | setBackgroundMode( PaletteButton ); | 34 | setBackgroundMode( PaletteButton ); |
35 | labelDate->setBackgroundMode( PaletteButton ); | 35 | labelDate->setBackgroundMode( PaletteButton ); |
36 | labelWeek->setBackgroundMode( PaletteButton ); | 36 | labelWeek->setBackgroundMode( PaletteButton ); |
37 | forward->setBackgroundMode( PaletteButton ); | 37 | forward->setBackgroundMode( PaletteButton ); |
38 | back->setBackgroundMode( PaletteButton ); | 38 | back->setBackgroundMode( PaletteButton ); |
39 | DateBookWeekLstHeaderBaseLayout->setSpacing(0); | 39 | DateBookWeekLstHeaderBaseLayout->setSpacing(0); |
40 | DateBookWeekLstHeaderBaseLayout->setMargin(0); | 40 | DateBookWeekLstHeaderBaseLayout->setMargin(0); |
41 | //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); | 41 | //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); |
42 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); | 42 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); |
43 | 43 | ||
44 | connect(back, SIGNAL(clicked()), this, SLOT(prevWeek())); | 44 | connect(back, SIGNAL(clicked()), this, SLOT(prevWeek())); |
45 | connect(forward, SIGNAL(clicked()), this, SLOT(nextWeek())); | 45 | connect(forward, SIGNAL(clicked()), this, SLOT(nextWeek())); |
46 | connect(labelWeek, SIGNAL(clicked()), this, SLOT(pickDate())); | 46 | connect(labelWeek, SIGNAL(clicked()), this, SLOT(pickDate())); |
47 | connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); | 47 | connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); |
48 | onMonday=onM; | 48 | onMonday=onM; |
49 | } | 49 | } |
50 | DateBookWeekLstHeader::~DateBookWeekLstHeader(){} | 50 | DateBookWeekLstHeader::~DateBookWeekLstHeader(){} |
51 | void DateBookWeekLstHeader::setDate(const QDate &d) { | 51 | void DateBookWeekLstHeader::setDate(const QDate &d) { |
52 | date=d; | 52 | date=d; |
53 | 53 | ||
54 | int year,week; | 54 | int year,week; |
@@ -70,49 +70,49 @@ void DateBookWeekLstHeader::pickDate() { | |||
70 | m1 = new QPopupMenu( this ); | 70 | m1 = new QPopupMenu( this ); |
71 | picker = new DateBookMonth( m1, 0, TRUE ); | 71 | picker = new DateBookMonth( m1, 0, TRUE ); |
72 | m1->insertItem( picker ); | 72 | m1->insertItem( picker ); |
73 | connect( picker, SIGNAL( dateClicked( int, int, int ) ), | 73 | connect( picker, SIGNAL( dateClicked( int, int, int ) ), |
74 | this, SLOT( setDate( int, int, int ) ) ); | 74 | this, SLOT( setDate( int, int, int ) ) ); |
75 | //connect( m1, SIGNAL( aboutToHide() ), | 75 | //connect( m1, SIGNAL( aboutToHide() ), |
76 | //this, SLOT( gotHide() ) ); | 76 | //this, SLOT( gotHide() ) ); |
77 | } | 77 | } |
78 | picker->setDate( date.year(), date.month(), date.day() ); | 78 | picker->setDate( date.year(), date.month(), date.day() ); |
79 | m1->popup(mapToGlobal(labelWeek->pos()+QPoint(0,labelWeek->height()))); | 79 | m1->popup(mapToGlobal(labelWeek->pos()+QPoint(0,labelWeek->height()))); |
80 | picker->setFocus(); | 80 | picker->setFocus(); |
81 | } | 81 | } |
82 | void DateBookWeekLstHeader::setDate(int y, int m, int d) { | 82 | void DateBookWeekLstHeader::setDate(int y, int m, int d) { |
83 | QDate new_date(y,m,d); | 83 | QDate new_date(y,m,d); |
84 | setDate(new_date); | 84 | setDate(new_date); |
85 | } | 85 | } |
86 | 86 | ||
87 | void DateBookWeekLstHeader::nextWeek() { | 87 | void DateBookWeekLstHeader::nextWeek() { |
88 | setDate(date.addDays(7)); | 88 | setDate(date.addDays(7)); |
89 | } | 89 | } |
90 | void DateBookWeekLstHeader::prevWeek() { | 90 | void DateBookWeekLstHeader::prevWeek() { |
91 | setDate(date.addDays(-7)); | 91 | setDate(date.addDays(-7)); |
92 | } | 92 | } |
93 | 93 | ||
94 | DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool onM, | 94 | DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /*onM*/, |
95 | QWidget* parent, | 95 | QWidget* parent, |
96 | const char* name, | 96 | const char* name, |
97 | WFlags fl ) | 97 | WFlags fl ) |
98 | : DateBookWeekLstDayHdrBase(parent, name, fl) { | 98 | : DateBookWeekLstDayHdrBase(parent, name, fl) { |
99 | 99 | ||
100 | date=d; | 100 | date=d; |
101 | 101 | ||
102 | static const char *wdays="MTWTFSS"; | 102 | static const char *wdays="MTWTFSS"; |
103 | char day=wdays[d.dayOfWeek()-1]; | 103 | char day=wdays[d.dayOfWeek()-1]; |
104 | 104 | ||
105 | label->setText( QString(QChar(day)) + " " + | 105 | label->setText( QString(QChar(day)) + " " + |
106 | QString::number(d.day()) ); | 106 | QString::number(d.day()) ); |
107 | add->setText("+"); | 107 | add->setText("+"); |
108 | 108 | ||
109 | if (d == QDate::currentDate()) { | 109 | if (d == QDate::currentDate()) { |
110 | QPalette pal=label->palette(); | 110 | QPalette pal=label->palette(); |
111 | pal.setColor(QColorGroup::Foreground, QColor(0,0,255)); | 111 | pal.setColor(QColorGroup::Foreground, QColor(0,0,255)); |
112 | label->setPalette(pal); | 112 | label->setPalette(pal); |
113 | 113 | ||
114 | /* | 114 | /* |
115 | QFont f=label->font(); | 115 | QFont f=label->font(); |
116 | f.setItalic(true); | 116 | f.setItalic(true); |
117 | label->setFont(f); | 117 | label->setFont(f); |
118 | label->setPalette(QPalette(QColor(0,0,255),label->backgroundColor())); | 118 | label->setPalette(QPalette(QColor(0,0,255),label->backgroundColor())); |