summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
Unidiff
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 607c250..6532705 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1,97 +1,96 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 Marcus Bains line. 5 Marcus Bains line.
6 Copyright (c) 2001 Ali Rahimi 6 Copyright (c) 2001 Ali Rahimi
7 7
8 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or 10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version. 11 (at your option) any later version.
12 12
13 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16 GNU General Public License for more details.
17 17
18 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 21
22 As a special exception, permission is given to link this program 22 As a special exception, permission is given to link this program
23 with any edition of Qt, and distribute the resulting executable, 23 with any edition of Qt, and distribute the resulting executable,
24 without including the source code for Qt in the source distribution. 24 without including the source code for Qt in the source distribution.
25*/ 25*/
26 26
27#ifndef _WIN32_ 27#ifndef _WIN32_
28#define protected public 28#define protected public
29#include <qwidget.h> 29#include <qwidget.h>
30#undef protected 30#undef protected
31#endif 31#endif
32#include <qintdict.h> 32#include <qintdict.h>
33#include <qdatetime.h> 33#include <qdatetime.h>
34#include <qapplication.h> 34#include <qapplication.h>
35#include <qpopupmenu.h> 35#include <qpopupmenu.h>
36#include <qcursor.h> 36#include <qcursor.h>
37#include <qpainter.h> 37#include <qpainter.h>
38 38
39#include <kdebug.h> 39#include <kdebug.h>
40#include <klocale.h> 40#include <klocale.h>
41#include <kiconloader.h> 41#include <kiconloader.h>
42#include <kglobal.h> 42#include <kglobal.h>
43 43
44#include "koagendaitem.h" 44#include "koagendaitem.h"
45#include "koprefs.h" 45#include "koprefs.h"
46#include "koglobals.h" 46#include "koglobals.h"
47 47
48#include "koagenda.h" 48#include "koagenda.h"
49#include "koagenda.moc"
50 49
51#include <libkcal/event.h> 50#include <libkcal/event.h>
52#include <libkcal/todo.h> 51#include <libkcal/todo.h>
53 52
54#ifndef DESKTOP_VERSION 53#ifndef DESKTOP_VERSION
55#include <qpe/qpeapplication.h> 54#include <qpe/qpeapplication.h>
56#endif 55#endif
57 56
58//extern bool globalFlagBlockPainting; 57//extern bool globalFlagBlockPainting;
59extern int globalFlagBlockAgenda; 58extern int globalFlagBlockAgenda;
60extern int globalFlagBlockAgendaItemPaint; 59extern int globalFlagBlockAgendaItemPaint;
61extern int globalFlagBlockAgendaItemUpdate; 60extern int globalFlagBlockAgendaItemUpdate;
62extern int globalFlagBlockStartup; 61extern int globalFlagBlockStartup;
63 62
64//////////////////////////////////////////////////////////////////////////// 63////////////////////////////////////////////////////////////////////////////
65MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) 64MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
66 : QFrame(_agenda->viewport(),name), agenda(_agenda) 65 : QFrame(_agenda->viewport(),name), agenda(_agenda)
67{ 66{
68 setLineWidth(0); 67 setLineWidth(0);
69 setMargin(0); 68 setMargin(0);
70 setBackgroundColor(Qt::red); 69 setBackgroundColor(Qt::red);
71 minutes = new QTimer(this); 70 minutes = new QTimer(this);
72 connect(minutes, SIGNAL(timeout()), this, SLOT(updateLoc())); 71 connect(minutes, SIGNAL(timeout()), this, SLOT(updateLoc()));
73 minutes->start(0, true); 72 minutes->start(0, true);
74 73
75 mTimeBox = new QLabel(this); 74 mTimeBox = new QLabel(this);
76 mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom); 75 mTimeBox->setAlignment(Qt::AlignRight | Qt::AlignBottom);
77 QPalette pal = mTimeBox->palette(); 76 QPalette pal = mTimeBox->palette();
78 pal.setColor(QColorGroup::Foreground, Qt::red); 77 pal.setColor(QColorGroup::Foreground, Qt::red);
79 mTimeBox->setPalette(pal); 78 mTimeBox->setPalette(pal);
80 //mTimeBox->setAutoMask(true); 79 //mTimeBox->setAutoMask(true);
81 80
82 agenda->addChild(mTimeBox); 81 agenda->addChild(mTimeBox);
83 82
84 oldToday = -1; 83 oldToday = -1;
85} 84}
86 85
87MarcusBains::~MarcusBains() 86MarcusBains::~MarcusBains()
88{ 87{
89 delete minutes; 88 delete minutes;
90} 89}
91 90
92int MarcusBains::todayColumn() 91int MarcusBains::todayColumn()
93{ 92{
94 QDate currentDate = QDate::currentDate(); 93 QDate currentDate = QDate::currentDate();
95 94
96 DateList dateList = agenda->dateList(); 95 DateList dateList = agenda->dateList();
97 DateList::ConstIterator it; 96 DateList::ConstIterator it;