summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp10
-rw-r--r--korganizer/koagendaitem.cpp4
-rw-r--r--korganizer/koagendaitem.h2
-rw-r--r--korganizer/kodaymatrix.cpp6
-rw-r--r--korganizer/kodaymatrix.h2
-rw-r--r--korganizer/kotodoview.cpp3
-rw-r--r--korganizer/kotodoview.h2
7 files changed, 21 insertions, 8 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 5cdaa83..5941337 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -203,15 +203,19 @@ void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
203 mExtraViews.append( n ); 203 mExtraViews.append( n );
204 n->setCalendar( mCalendar ); 204 n->setCalendar( mCalendar );
205 setBaseDates(); 205 setBaseDates();
206 connectNavigatorView( n ); 206 connectNavigatorView( n );
207 n->show(); 207 n->show();
208 } 208 }
209 209 int iii = 0;
210 while ( count < ( mExtraViews.count() + 1 ) ) { 210 while ( iii < ( mExtraViews.count() ) ) {
211 mExtraViews.removeLast(); 211 if ( iii < count-1 )
212 mExtraViews.at( iii )->show();
213 else
214 mExtraViews.at( iii )->hide();
215 ++iii;
212 } 216 }
213 if ( fontchange ) { 217 if ( fontchange ) {
214 //mNavigatorView->changeFont( fo ); 218 //mNavigatorView->changeFont( fo );
215 uint i; 219 uint i;
216 for( i = 0; i < mExtraViews.count(); ++i ) { 220 for( i = 0; i < mExtraViews.count(); ++i ) {
217 KDateNavigator *view = mExtraViews.at( i ); 221 KDateNavigator *view = mExtraViews.at( i );
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 0ea2860..19cc0e3 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -74,13 +74,13 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool
74 const char *name,WFlags) : 74 const char *name,WFlags) :
75 QWidget(parent, name), mIncidence(incidence), mDate(qd) 75 QWidget(parent, name), mIncidence(incidence), mDate(qd)
76{ 76{
77#ifndef DESKTOP_VERSION 77#ifndef DESKTOP_VERSION
78 //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); 78 //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
79#endif 79#endif
80 new KOAgendaItemWhatsThis(this); 80 mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this);
81 int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase 81 int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase
82 setWFlags ( wflags); 82 setWFlags ( wflags);
83 mAllDay = allday; 83 mAllDay = allday;
84 init ( incidence, qd ); 84 init ( incidence, qd );
85 //setMouseTracking(true); 85 //setMouseTracking(true);
86 //setAcceptDrops(true); 86 //setAcceptDrops(true);
@@ -152,13 +152,13 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
152} 152}
153 153
154 154
155KOAgendaItem::~KOAgendaItem() 155KOAgendaItem::~KOAgendaItem()
156{ 156{
157 // qDebug("deleteKOAgendaItem::~KOAgendaItem( "); 157 // qDebug("deleteKOAgendaItem::~KOAgendaItem( ");
158 158 delete mKOAgendaItemWhatsThis;
159} 159}
160 160
161void KOAgendaItem::recreateIncidence() 161void KOAgendaItem::recreateIncidence()
162{ 162{
163#if 0 163#if 0
164 Incidence* newInc = mIncidence->clone(); 164 Incidence* newInc = mIncidence->clone();
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index b4dba79..53658c0 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -24,12 +24,13 @@
24#include <qpixmap.h> 24#include <qpixmap.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qpalette.h> 26#include <qpalette.h>
27 27
28#include <libkcal/incidence.h> 28#include <libkcal/incidence.h>
29 29
30class KOAgendaItemWhatsThis;
30class QToolTipGroup; 31class QToolTipGroup;
31class QDragEnterEvent; 32class QDragEnterEvent;
32class QDropEvent; 33class QDropEvent;
33 34
34using namespace KCal; 35using namespace KCal;
35 36
@@ -116,12 +117,13 @@ class KOAgendaItem : public QWidget
116 void dragEnterEvent(QDragEnterEvent *e); 117 void dragEnterEvent(QDragEnterEvent *e);
117 void dropEvent(QDropEvent *e); 118 void dropEvent(QDropEvent *e);
118 void paintEvent ( QPaintEvent * ); 119 void paintEvent ( QPaintEvent * );
119 void resizeEvent ( QResizeEvent *ev ); 120 void resizeEvent ( QResizeEvent *ev );
120 121
121 private: 122 private:
123 KOAgendaItemWhatsThis* mKOAgendaItemWhatsThis;
122 bool mAllDay; 124 bool mAllDay;
123 int mCellX; 125 int mCellX;
124 int mCellXWidth; 126 int mCellXWidth;
125 int mCellYTop,mCellYBottom; 127 int mCellYTop,mCellYBottom;
126 int mSubCell; // subcell number of this item 128 int mSubCell; // subcell number of this item
127 int mSubCells; // Total number of subcells in cell of this item 129 int mSubCells; // Total number of subcells in cell of this item
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index ae0a051..5133519 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -59,13 +59,14 @@ DynamicTip::DynamicTip( QWidget * parent )
59 matrix = (KODayMatrix*)parent; 59 matrix = (KODayMatrix*)parent;
60} 60}
61 61
62class KODaymatrixWhatsThis :public QWhatsThis 62class KODaymatrixWhatsThis :public QWhatsThis
63{ 63{
64public: 64public:
65 KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { }; 65 KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;};
66 ~KODaymatrixWhatsThis() { ; };
66 67
67protected: 68protected:
68 virtual QString text( const QPoint& p ) 69 virtual QString text( const QPoint& p )
69 { 70 {
70 return _view->getWhatsThisText( p ) ; 71 return _view->getWhatsThisText( p ) ;
71 } 72 }
@@ -106,13 +107,13 @@ KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
106 107
107#if 0 108#if 0
108KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : 109KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) :
109 QFrame(parent, name) 110 QFrame(parent, name)
110#endif 111#endif
111{ 112{
112 new KODaymatrixWhatsThis(this); 113 mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this);
113 mPendingUpdateBeforeRepaint = false; 114 mPendingUpdateBeforeRepaint = false;
114 mouseDown = false; 115 mouseDown = false;
115 // initialize dynamic arrays 116 // initialize dynamic arrays
116 bDays.resize ( NUMDAYS ); 117 bDays.resize ( NUMDAYS );
117 days = new QDate[NUMDAYS]; 118 days = new QDate[NUMDAYS];
118 daylbls = new QString[NUMDAYS]; 119 daylbls = new QString[NUMDAYS];
@@ -219,12 +220,13 @@ QColor KODayMatrix::getShadedColor(QColor color)
219 220
220 return shaded; 221 return shaded;
221} 222}
222 223
223KODayMatrix::~KODayMatrix() 224KODayMatrix::~KODayMatrix()
224{ 225{
226 delete mKODaymatrixWhatsThis;
225 delete [] days; 227 delete [] days;
226 delete [] daylbls; 228 delete [] daylbls;
227 delete [] events; 229 delete [] events;
228 delete mToolTip; 230 delete mToolTip;
229} 231}
230 232
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index f4016b6..10f4b05 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -38,12 +38,13 @@
38class QDragEnterEvent; 38class QDragEnterEvent;
39class QDragMoveEvent; 39class QDragMoveEvent;
40class QDragLeaveEvent; 40class QDragLeaveEvent;
41class QDropEvent; 41class QDropEvent;
42 42
43class KODayMatrix; 43class KODayMatrix;
44class KODaymatrixWhatsThis;
44 45
45using namespace KCal; 46using namespace KCal;
46 47
47 48
48/** 49/**
49 * small helper class to dynamically show tooltips inside the day matrix. 50 * small helper class to dynamically show tooltips inside the day matrix.
@@ -223,12 +224,13 @@ protected:
223 224
224 void dropEvent(QDropEvent *); 225 void dropEvent(QDropEvent *);
225 226
226 void resizeEvent(QResizeEvent *); 227 void resizeEvent(QResizeEvent *);
227 228
228private: 229private:
230 KODaymatrixWhatsThis* mKODaymatrixWhatsThis;
229 bool mouseDown; 231 bool mouseDown;
230 QBitArray bDays; 232 QBitArray bDays;
231 QPixmap myPix; 233 QPixmap myPix;
232 QTimer* mUpdateTimer; 234 QTimer* mUpdateTimer;
233 QTimer* mRepaintTimer; 235 QTimer* mRepaintTimer;
234 bool mDayChanged; 236 bool mDayChanged;
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 5e8ea27..2b01c23 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -410,13 +410,13 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
410 mTodoListView->setColumnWidthMode(5, QListView::Manual); 410 mTodoListView->setColumnWidthMode(5, QListView::Manual);
411 mTodoListView->setColumnWidthMode(6, QListView::Manual); 411 mTodoListView->setColumnWidthMode(6, QListView::Manual);
412 mTodoListView->setColumnWidthMode(7, QListView::Manual); 412 mTodoListView->setColumnWidthMode(7, QListView::Manual);
413 mTodoListView->setColumnWidthMode(8, QListView::Manual); 413 mTodoListView->setColumnWidthMode(8, QListView::Manual);
414 414
415 415
416 new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 416 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
417 417
418 mPriorityPopupMenu = new QPopupMenu(this); 418 mPriorityPopupMenu = new QPopupMenu(this);
419 for (int i = 1; i <= 5; i++) { 419 for (int i = 1; i <= 5; i++) {
420 QString label = QString ("%1").arg (i); 420 QString label = QString ("%1").arg (i);
421 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 421 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
422 } 422 }
@@ -547,12 +547,13 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
547 SLOT( addQuickTodo() ) ); 547 SLOT( addQuickTodo() ) );
548 548
549} 549}
550 550
551KOTodoView::~KOTodoView() 551KOTodoView::~KOTodoView()
552{ 552{
553 delete mKOTodoViewWhatsThis;
553 delete mDocPrefs; 554 delete mDocPrefs;
554} 555}
555QString KOTodoView::getWhatsThisText(QPoint p) 556QString KOTodoView::getWhatsThisText(QPoint p)
556{ 557{
557 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); 558 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
558 if ( item ) 559 if ( item )
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 462f0a6..eab0754 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -46,12 +46,13 @@
46#include "datenavigator.h" 46#include "datenavigator.h"
47 47
48class QDragEnterEvent; 48class QDragEnterEvent;
49class QDragMoveEvent; 49class QDragMoveEvent;
50class QDragLeaveEvent; 50class QDragLeaveEvent;
51class QDropEvent; 51class QDropEvent;
52class KOTodoViewWhatsThis;
52 53
53class DocPrefs; 54class DocPrefs;
54 55
55class KOTodoListView : public KListView 56class KOTodoListView : public KListView
56{ 57{
57 Q_OBJECT 58 Q_OBJECT
@@ -215,12 +216,13 @@ class KOTodoView : public KOrg::BaseView
215 * Korganizer keeps it in memory and we need to update 216 * Korganizer keeps it in memory and we need to update
216 * 1. make KOTodoViewItem a QObject again? 217 * 1. make KOTodoViewItem a QObject again?
217 * 2. add a public method for setting one todo modified? 218 * 2. add a public method for setting one todo modified?
218 * 3. add a private method for setting a todo modified + friend here? 219 * 3. add a private method for setting a todo modified + friend here?
219 * -- zecke 2002-07-08 220 * -- zecke 2002-07-08
220 */ 221 */
222 KOTodoViewWhatsThis* mKOTodoViewWhatsThis;
221 friend class KOTodoListView; 223 friend class KOTodoListView;
222 void paintEvent(QPaintEvent * pevent); 224 void paintEvent(QPaintEvent * pevent);
223 bool mPendingUpdateBeforeRepaint; 225 bool mPendingUpdateBeforeRepaint;
224 friend class KOTodoViewItem; 226 friend class KOTodoViewItem;
225 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 227 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
226 void restoreItemState( QListViewItem * ); 228 void restoreItemState( QListViewItem * );