summaryrefslogtreecommitdiffabout
path: root/korganizer/datenavigatorcontainer.cpp
Unidiff
Diffstat (limited to 'korganizer/datenavigatorcontainer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index ea510f1..53507d3 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -1,84 +1,86 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2001,2002,2003 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2001,2002,2003 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 5 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 20
21 As a special exception, permission is given to link this program 21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable, 22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution. 23 without including the source code for Qt in the source distribution.
24*/ 24*/
25 25
26#include <kdebug.h> 26#include <kdebug.h>
27#include <klocale.h> 27#include <klocale.h>
28 28
29//#include "koglobals.h" 29//#include "koglobals.h"
30#include "navigatorbar.h" 30#include "navigatorbar.h"
31#include "kdatenavigator.h" 31#include "kdatenavigator.h"
32 32
33#include <kcalendarsystem.h> 33#include <kcalendarsystem.h>
34 34
35#include "datenavigatorcontainer.h" 35#include "datenavigatorcontainer.h"
36#include "koprefs.h" 36#include "koprefs.h"
37//Added by qt3to4:
38#include <QResizeEvent>
37 39
38DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, 40DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
39 const char *name ) 41 const char *name )
40 : QWidget( parent, name ), mCalendar( 0 ), 42 : QWidget( parent, name ), mCalendar( 0 ),
41 mHorizontalCount( 1 ), mVerticalCount( 1 ) 43 mHorizontalCount( 1 ), mVerticalCount( 1 )
42{ 44{
43 mResizeEnabled = false; 45 mResizeEnabled = false;
44 mExtraViews.setAutoDelete( true ); 46 mExtraViews.setAutoDelete( true );
45 47
46 mNavigatorView = new KDateNavigator( this, name ); 48 mNavigatorView = new KDateNavigator( this, name );
47 mNavigatorView->hide(); 49 mNavigatorView->hide();
48 connectNavigatorView( mNavigatorView ); 50 connectNavigatorView( mNavigatorView );
49 //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); 51 //setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
50 mLastDisplayedDN = 0; 52 mLastDisplayedDN = 0;
51 mUpdateTimer = new QTimer( this ); 53 mUpdateTimer = new QTimer( this );
52 connect (mUpdateTimer ,SIGNAL(timeout()), this, SLOT ( checkUpdateDayMatrixDates() )); 54 connect (mUpdateTimer ,SIGNAL(timeout()), this, SLOT ( checkUpdateDayMatrixDates() ));
53 mFirstSelectedDate = QDate::currentDate(); 55 mFirstSelectedDate = QDate::currentDate();
54 mSelectedDateCount = 1; 56 mSelectedDateCount = 1;
55} 57}
56 58
57DateNavigatorContainer::~DateNavigatorContainer() 59DateNavigatorContainer::~DateNavigatorContainer()
58{ 60{
59} 61}
60 62
61void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v ) 63void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v )
62{ 64{
63 connect( v, SIGNAL( datesSelected( const KCal::DateList & ) ), 65 connect( v, SIGNAL( datesSelected( const KCal::DateList & ) ),
64 SIGNAL( datesSelected( const KCal::DateList & ) ) ); 66 SIGNAL( datesSelected( const KCal::DateList & ) ) );
65#if 0 67#if 0
66 connect( v, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ), 68 connect( v, SIGNAL( incidenceDropped( Incidence *, const QDate & ) ),
67 SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) ); 69 SIGNAL( incidenceDropped( Incidence *, const QDate & ) ) );
68 connect( v, SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ), 70 connect( v, SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ),
69 SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) ); 71 SIGNAL( incidenceDroppedMove( Incidence *, const QDate & ) ) );
70#endif 72#endif
71 connect( v, SIGNAL( weekClicked( const QDate & ) ), 73 connect( v, SIGNAL( weekClicked( const QDate & ) ),
72 SIGNAL( weekClicked( const QDate & ) ) ); 74 SIGNAL( weekClicked( const QDate & ) ) );
73 connect( v, SIGNAL( showMonth( const QDate & ) ), 75 connect( v, SIGNAL( showMonth( const QDate & ) ),
74 SIGNAL( showMonth( const QDate & ) ) ); 76 SIGNAL( showMonth( const QDate & ) ) );
75 77
76 connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) ); 78 connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) );
77 connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) ); 79 connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) );
78 80
79 connect( v, SIGNAL( goNextMonth() ), SLOT( slotgoNextMonth() ) ); 81 connect( v, SIGNAL( goNextMonth() ), SLOT( slotgoNextMonth() ) );
80 connect( v, SIGNAL( goPrevMonth() ), SLOT( slotgoPrevMonth() ) ); 82 connect( v, SIGNAL( goPrevMonth() ), SLOT( slotgoPrevMonth() ) );
81 connect( v, SIGNAL( goNextYear() ), SLOT( slotgoNextYear() ) ); 83 connect( v, SIGNAL( goNextYear() ), SLOT( slotgoNextYear() ) );
82 connect( v, SIGNAL( goPrevYear() ), SLOT( slotgoPrevYear() ) ); 84 connect( v, SIGNAL( goPrevYear() ), SLOT( slotgoPrevYear() ) );
83 85
84 connect( v, SIGNAL( monthSelected( int ) ), SLOT( slotMonthSelected( int ) ) ); 86 connect( v, SIGNAL( monthSelected( int ) ), SLOT( slotMonthSelected( int ) ) );