summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-21 11:44:00 (UTC)
committer zautrix <zautrix>2005-04-21 11:44:00 (UTC)
commit4d96d7b681ce99d76746a843c289b75f5e7dba64 (patch) (unidiff)
tree71b6953625d8b096e62177bf93379c3ca6c74d66
parentf23afbb9c09b4ee0f00af8f04ee4458181792cd0 (diff)
downloadkdepimpi-4d96d7b681ce99d76746a843c289b75f5e7dba64.zip
kdepimpi-4d96d7b681ce99d76746a843c289b75f5e7dba64.tar.gz
kdepimpi-4d96d7b681ce99d76746a843c289b75f5e7dba64.tar.bz2
memory leaks fixed
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp8
-rw-r--r--korganizer/kodaymatrix.cpp2
-rw-r--r--korganizer/kolistview.cpp8
-rw-r--r--korganizer/kolistview.h3
-rw-r--r--korganizer/komonthview.cpp4
-rw-r--r--korganizer/kotodoview.cpp8
-rw-r--r--korganizer/mainwindow.cpp6
-rw-r--r--korganizer/mainwindow.h1
8 files changed, 34 insertions, 6 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 1801d7e..df2e478 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -134,50 +134,54 @@ void KOAgendaItem::init ( Incidence *incidence, QDate qd )
134 mColorGroup = QColorGroup( mBackgroundColor.light(), 134 mColorGroup = QColorGroup( mBackgroundColor.light(),
135 mBackgroundColor.dark(),mBackgroundColor.light(), 135 mBackgroundColor.dark(),mBackgroundColor.light(),
136 mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ; 136 mBackgroundColor.dark(),mBackgroundColor, black, mBackgroundColor) ;
137 setBackgroundColor( mBackgroundColor ); 137 setBackgroundColor( mBackgroundColor );
138 138
139 mConflictItems.clear(); 139 mConflictItems.clear();
140 setCellXY(0,0,1); 140 setCellXY(0,0,1);
141 setCellXWidth(0); 141 setCellXWidth(0);
142 setSubCell(0); 142 setSubCell(0);
143 setSubCells(1); 143 setSubCells(1);
144 setMultiItem(0,0,0); 144 setMultiItem(0,0,0);
145 startMove(); 145 startMove();
146 mSelected = true; 146 mSelected = true;
147 select(false); 147 select(false);
148 QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont); 148 QFontMetrics fontinf(KOPrefs::instance()->mAgendaViewFont);
149 mFontPixelSize = fontinf.height();; 149 mFontPixelSize = fontinf.height();;
150 hide(); 150 hide();
151 xPaintCoord = -1; 151 xPaintCoord = -1;
152 yPaintCoord = -1; 152 yPaintCoord = -1;
153} 153}
154 154
155 155
156KOAgendaItem::~KOAgendaItem() 156KOAgendaItem::~KOAgendaItem()
157{ 157{
158 // qDebug("deleteKOAgendaItem::~KOAgendaItem( "); 158#if QT_VERSION >= 0x030000
159 // delete mKOAgendaItemWhatsThis; 159
160#else
161 delete mKOAgendaItemWhatsThis;
162#endif
163
160} 164}
161 165
162void KOAgendaItem::recreateIncidence() 166void KOAgendaItem::recreateIncidence()
163{ 167{
164#if 0 168#if 0
165 Incidence* newInc = mIncidence->clone(); 169 Incidence* newInc = mIncidence->clone();
166 newInc->recreate(); 170 newInc->recreate();
167 if ( mIncidence->doesRecur() ) { 171 if ( mIncidence->doesRecur() ) {
168 mIncidence->addExDate( mDate ); 172 mIncidence->addExDate( mDate );
169 newInc->recurrence()->unsetRecurs(); 173 newInc->recurrence()->unsetRecurs();
170 int len = mIncidence->dtStart().secsTo( ((Event*)mIncidence)->dtEnd()); 174 int len = mIncidence->dtStart().secsTo( ((Event*)mIncidence)->dtEnd());
171 QTime tim = mIncidence->dtStart().time(); 175 QTime tim = mIncidence->dtStart().time();
172 newInc->setDtStart( QDateTime(mDate, tim) ); 176 newInc->setDtStart( QDateTime(mDate, tim) );
173 ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); 177 ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) );
174 } 178 }
175#endif 179#endif
176 mIncidence = mIncidence->recreateCloneException( mDate ); 180 mIncidence = mIncidence->recreateCloneException( mDate );
177} 181}
178bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) 182bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
179{ 183{
180 int size = AGENDA_ICON_SIZE; 184 int size = AGENDA_ICON_SIZE;
181 185
182 int yOff = 0; 186 int yOff = 0;
183 int xOff = 0; 187 int xOff = 0;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index c32a2a4..53ebdb2 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -42,49 +42,49 @@
42#include <kcalendarsystem.h> 42#include <kcalendarsystem.h>
43 43
44#ifndef KORG_NOPLUGINS 44#ifndef KORG_NOPLUGINS
45#include "kocore.h" 45#include "kocore.h"
46#endif 46#endif
47#include "koprefs.h" 47#include "koprefs.h"
48#include "koglobals.h" 48#include "koglobals.h"
49 49
50#include "kodaymatrix.h" 50#include "kodaymatrix.h"
51 51
52// ============================================================================ 52// ============================================================================
53// D Y N A M I C T I P 53// D Y N A M I C T I P
54// ============================================================================ 54// ============================================================================
55 55
56DynamicTip::DynamicTip( QWidget * parent ) 56DynamicTip::DynamicTip( QWidget * parent )
57 : QToolTip( parent ) 57 : QToolTip( parent )
58{ 58{
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() { qDebug("DELETE KODaymatrixWhatsThis "); }; 66 ~KODaymatrixWhatsThis() { ; };
67 67
68protected: 68protected:
69 virtual QString text( const QPoint& p ) 69 virtual QString text( const QPoint& p )
70 { 70 {
71 return _view->getWhatsThisText( p ) ; 71 return _view->getWhatsThisText( p ) ;
72 } 72 }
73private: 73private:
74 KODayMatrix * _view; 74 KODayMatrix * _view;
75}; 75};
76 76
77void DynamicTip::maybeTip( const QPoint &pos ) 77void DynamicTip::maybeTip( const QPoint &pos )
78{ 78{
79 //calculate which cell of the matrix the mouse is in 79 //calculate which cell of the matrix the mouse is in
80 QRect sz = matrix->frameRect(); 80 QRect sz = matrix->frameRect();
81 int dheight = sz.height()*7 / 42; 81 int dheight = sz.height()*7 / 42;
82 int dwidth = sz.width() / 7; 82 int dwidth = sz.width() / 7;
83 int row = pos.y()/dheight; 83 int row = pos.y()/dheight;
84 int col = pos.x()/dwidth; 84 int col = pos.x()/dwidth;
85 85
86 QRect rct(col*dwidth, row*dheight, dwidth, dheight); 86 QRect rct(col*dwidth, row*dheight, dwidth, dheight);
87 87
88// kdDebug() << "DynamicTip::maybeTip matrix cell index [" << 88// kdDebug() << "DynamicTip::maybeTip matrix cell index [" <<
89// col << "][" << row << "] => " <<(col+row*7) << endl; 89// col << "][" << row << "] => " <<(col+row*7) << endl;
90 90
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index fd86095..b94916a 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -240,49 +240,49 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
240 mListView->addColumn(i18n("Summary")); 240 mListView->addColumn(i18n("Summary"));
241 mListView->addColumn(i18n("Start Date")); 241 mListView->addColumn(i18n("Start Date"));
242 mListView->addColumn(i18n("Start Time")); 242 mListView->addColumn(i18n("Start Time"));
243 mListView->addColumn(i18n("End Date")); 243 mListView->addColumn(i18n("End Date"));
244 mListView->addColumn(i18n("End Time")); 244 mListView->addColumn(i18n("End Time"));
245 mListView->addColumn(i18n("Alarm")); // alarm set? 245 mListView->addColumn(i18n("Alarm")); // alarm set?
246 mListView->addColumn(i18n("Recurs")); // recurs? 246 mListView->addColumn(i18n("Recurs")); // recurs?
247 mListView->addColumn(i18n("Due Date")); 247 mListView->addColumn(i18n("Due Date"));
248 mListView->addColumn(i18n("Due Time")); 248 mListView->addColumn(i18n("Due Time"));
249 mListView->addColumn(i18n("Cancelled")); 249 mListView->addColumn(i18n("Cancelled"));
250 mListView->addColumn(i18n("Categories")); 250 mListView->addColumn(i18n("Categories"));
251 251
252 mListView->setColumnAlignment(0,AlignLeft); 252 mListView->setColumnAlignment(0,AlignLeft);
253 mListView->setColumnAlignment(1,AlignLeft); 253 mListView->setColumnAlignment(1,AlignLeft);
254 mListView->setColumnAlignment(2,AlignHCenter); 254 mListView->setColumnAlignment(2,AlignHCenter);
255 mListView->setColumnAlignment(3,AlignLeft); 255 mListView->setColumnAlignment(3,AlignLeft);
256 mListView->setColumnAlignment(4,AlignHCenter); 256 mListView->setColumnAlignment(4,AlignHCenter);
257 mListView->setColumnAlignment(5,AlignLeft); 257 mListView->setColumnAlignment(5,AlignLeft);
258 mListView->setColumnAlignment(6,AlignLeft); 258 mListView->setColumnAlignment(6,AlignLeft);
259 mListView->setColumnAlignment(7,AlignLeft); 259 mListView->setColumnAlignment(7,AlignLeft);
260 mListView->setColumnAlignment(8,AlignLeft); 260 mListView->setColumnAlignment(8,AlignLeft);
261 mListView->setColumnAlignment(9,AlignLeft); 261 mListView->setColumnAlignment(9,AlignLeft);
262 mListView->setColumnAlignment(10,AlignLeft); 262 mListView->setColumnAlignment(10,AlignLeft);
263 mListView->setColumnWidthMode(10, QListView::Manual); 263 mListView->setColumnWidthMode(10, QListView::Manual);
264 new KOListViewWhatsThis(mListView->viewport(),this); 264 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
265 265
266 int iii = 0; 266 int iii = 0;
267 for ( iii = 0; iii< 10 ; ++iii ) 267 for ( iii = 0; iii< 10 ; ++iii )
268 mListView->setColumnWidthMode( iii, QListView::Manual ); 268 mListView->setColumnWidthMode( iii, QListView::Manual );
269 269
270 QBoxLayout *layoutTop = new QVBoxLayout(this); 270 QBoxLayout *layoutTop = new QVBoxLayout(this);
271 layoutTop->addWidget(mListView); 271 layoutTop->addWidget(mListView);
272 mListView->setFont ( KOPrefs::instance()->mListViewFont ); 272 mListView->setFont ( KOPrefs::instance()->mListViewFont );
273 mPopupMenu = eventPopup(); 273 mPopupMenu = eventPopup();
274 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 274 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
275 i18n("Select all"),this, 275 i18n("Select all"),this,
276 SLOT(allSelection()),true); 276 SLOT(allSelection()),true);
277 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 277 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
278 i18n("Deselect all"),this, 278 i18n("Deselect all"),this,
279 SLOT(clearSelection()),true); 279 SLOT(clearSelection()),true);
280 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 280 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
281 i18n("Delete all selected"),this, 281 i18n("Delete all selected"),this,
282 SLOT(deleteAll()),true); 282 SLOT(deleteAll()),true);
283 mPopupMenu->insertSeparator(); 283 mPopupMenu->insertSeparator();
284 QPopupMenu * exportPO = new QPopupMenu ( this ); 284 QPopupMenu * exportPO = new QPopupMenu ( this );
285 mPopupMenu->insertItem( i18n("Export selected"), exportPO ); 285 mPopupMenu->insertItem( i18n("Export selected"), exportPO );
286 exportPO->insertItem( i18n("As iCal (ics) file..."),this, 286 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
287 SLOT(saveToFile())); 287 SLOT(saveToFile()));
288 exportPO->insertItem( i18n("As vCal (vcs) file..."),this, 288 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
@@ -317,48 +317,53 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
317 mPopupMenu->insertSeparator(); 317 mPopupMenu->insertSeparator();
318 mPopupMenu->insertItem(i18n("Show Dates"), this, 318 mPopupMenu->insertItem(i18n("Show Dates"), this,
319 SLOT(showDates())); 319 SLOT(showDates()));
320 mPopupMenu->insertItem(i18n("Hide Dates"), this, 320 mPopupMenu->insertItem(i18n("Hide Dates"), this,
321 SLOT(hideDates())); 321 SLOT(hideDates()));
322 */ 322 */
323 QObject::connect(mListView,SIGNAL( newEvent()), 323 QObject::connect(mListView,SIGNAL( newEvent()),
324 this,SIGNAL(signalNewEvent())); 324 this,SIGNAL(signalNewEvent()));
325 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 325 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
326 this,SLOT(defaultItemAction(QListViewItem *))); 326 this,SLOT(defaultItemAction(QListViewItem *)));
327 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, 327 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *,
328 const QPoint &, int )), 328 const QPoint &, int )),
329 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 329 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
330 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 330 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
331 SLOT(processSelectionChange(QListViewItem *))); 331 SLOT(processSelectionChange(QListViewItem *)));
332 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 332 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
333 SIGNAL(showIncidenceSignal(Incidence *)) ); 333 SIGNAL(showIncidenceSignal(Incidence *)) );
334 334
335 readSettings(KOGlobals::config(),"KOListView Layout"); 335 readSettings(KOGlobals::config(),"KOListView Layout");
336} 336}
337 337
338KOListView::~KOListView() 338KOListView::~KOListView()
339{ 339{
340 delete mPopupMenu; 340 delete mPopupMenu;
341#if QT_VERSION >= 0x030000
342
343#else
344 delete mKOListViewWhatsThis;
345#endif
341} 346}
342 347
343QString KOListView::getWhatsThisText(QPoint p) 348QString KOListView::getWhatsThisText(QPoint p)
344{ 349{
345 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p ); 350 KOListViewItem* item = ( KOListViewItem* ) mListView->itemAt( p );
346 if ( item ) 351 if ( item )
347 return KIncidenceFormatter::instance()->getFormattedText( item->data(), 352 return KIncidenceFormatter::instance()->getFormattedText( item->data(),
348 KOPrefs::instance()->mWTshowDetails, 353 KOPrefs::instance()->mWTshowDetails,
349 KOPrefs::instance()->mWTshowCreated, 354 KOPrefs::instance()->mWTshowCreated,
350 KOPrefs::instance()->mWTshowChanged); 355 KOPrefs::instance()->mWTshowChanged);
351 return i18n("That is the list view" ); 356 return i18n("That is the list view" );
352 357
353} 358}
354 359
355void KOListView::updateList() 360void KOListView::updateList()
356{ 361{
357 // qDebug(" KOListView::updateList() "); 362 // qDebug(" KOListView::updateList() ");
358 363
359} 364}
360 365
361void KOListView::addCat( ) 366void KOListView::addCat( )
362{ 367{
363 setCategories( false ); 368 setCategories( false );
364} 369}
@@ -1160,48 +1165,49 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1160 if ( cn ) { 1165 if ( cn ) {
1161 KOListViewItem* ci = (KOListViewItem*)( cn ); 1166 KOListViewItem* ci = (KOListViewItem*)( cn );
1162 if ( ci ){ 1167 if ( ci ){
1163 if ( e->state() == ShiftButton ) 1168 if ( e->state() == ShiftButton )
1164 ci->setSelected( false ); 1169 ci->setSelected( false );
1165 else 1170 else
1166 ci->setSelected( true ); 1171 ci->setSelected( true );
1167 cn = cn->nextSibling(); 1172 cn = cn->nextSibling();
1168 if ( cn ) { 1173 if ( cn ) {
1169 setCurrentItem ( cn ); 1174 setCurrentItem ( cn );
1170 ensureItemVisible ( cn ); 1175 ensureItemVisible ( cn );
1171 } 1176 }
1172 } 1177 }
1173 } 1178 }
1174 e->accept(); 1179 e->accept();
1175 } 1180 }
1176 break; 1181 break;
1177 default: 1182 default:
1178 e->ignore(); 1183 e->ignore();
1179 } 1184 }
1180} 1185}
1181KOListViewListView::KOListViewListView(KOListView * lv ) 1186KOListViewListView::KOListViewListView(KOListView * lv )
1182 : KListView( lv, "kolistlistview", false ) 1187 : KListView( lv, "kolistlistview", false )
1183{ 1188{
1189 mYMousePos = 0;
1184 mPopupTimer = new QTimer(this); 1190 mPopupTimer = new QTimer(this);
1185 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); 1191 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
1186#ifndef DESKTOP_VERSION 1192#ifndef DESKTOP_VERSION
1187 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 1193 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
1188#endif 1194#endif
1189 setSelectionMode( QListView::Multi ); 1195 setSelectionMode( QListView::Multi );
1190 setMultiSelection( true); 1196 setMultiSelection( true);
1191} 1197}
1192void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) 1198void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1193{ 1199{
1194 if (!e) return; 1200 if (!e) return;
1195 QPoint vp = contentsToViewport(e->pos()); 1201 QPoint vp = contentsToViewport(e->pos());
1196 QListViewItem *item = itemAt(vp); 1202 QListViewItem *item = itemAt(vp);
1197 if (!item) { 1203 if (!item) {
1198 emit newEvent(); 1204 emit newEvent();
1199 return; 1205 return;
1200 } 1206 }
1201 KListView::contentsMouseDoubleClickEvent(e); 1207 KListView::contentsMouseDoubleClickEvent(e);
1202} 1208}
1203#if 0 1209#if 0
1204void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) 1210void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
1205{ 1211{
1206 //qDebug("contentsMousePressEvent++++ "); 1212 //qDebug("contentsMousePressEvent++++ ");
1207 KListView::contentsMousePressEvent( e ); 1213 KListView::contentsMousePressEvent( e );
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index eb5bb6e..2051d60 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -21,49 +21,49 @@
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef _KOLISTVIEW_H 24#ifndef _KOLISTVIEW_H
25#define _KOLISTVIEW_H 25#define _KOLISTVIEW_H
26 26
27#include <qlistview.h> 27#include <qlistview.h>
28#include <qmap.h> 28#include <qmap.h>
29#include <qdict.h> 29#include <qdict.h>
30 30
31#include <klistview.h> 31#include <klistview.h>
32 32
33#ifndef DESKTOP_VERSION 33#ifndef DESKTOP_VERSION
34#include <qtopia/ir.h> 34#include <qtopia/ir.h>
35#else 35#else
36#define Ir char 36#define Ir char
37#endif 37#endif
38#include <libkcal/incidence.h> 38#include <libkcal/incidence.h>
39 39
40#include "koeventview.h" 40#include "koeventview.h"
41#include "customlistviewitem.h" 41#include "customlistviewitem.h"
42 42
43using namespace KCal; 43using namespace KCal;
44 44
45 45class KOListViewWhatsThis;
46 46
47#include <qpushbutton.h> 47#include <qpushbutton.h>
48#include <qlayout.h> 48#include <qlayout.h>
49#include <qdialog.h> 49#include <qdialog.h>
50#include <qtimer.h> 50#include <qtimer.h>
51#include <qcombobox.h> 51#include <qcombobox.h>
52#include <qspinbox.h> 52#include <qspinbox.h>
53#include <qtooltip.h> 53#include <qtooltip.h>
54#include <qcheckbox.h> 54#include <qcheckbox.h>
55#include <qhbox.h> 55#include <qhbox.h>
56#include <qlabel.h> 56#include <qlabel.h>
57#include <kiconloader.h> 57#include <kiconloader.h>
58#include "kfiledialog.h" 58#include "kfiledialog.h"
59#include "koprefs.h" 59#include "koprefs.h"
60class KOAlarmPrefs : public QDialog 60class KOAlarmPrefs : public QDialog
61{ 61{
62 Q_OBJECT 62 Q_OBJECT
63 public: 63 public:
64 KOAlarmPrefs( QWidget *par=0, const char *name=0 ) : 64 KOAlarmPrefs( QWidget *par=0, const char *name=0 ) :
65 QDialog( par, name, true ) 65 QDialog( par, name, true )
66 { 66 {
67 setCaption( i18n("Alarm Options") ); 67 setCaption( i18n("Alarm Options") );
68 QVBoxLayout* alarmLayout = new QVBoxLayout( this ); 68 QVBoxLayout* alarmLayout = new QVBoxLayout( this );
69 alarmLayout->setSpacing( 3 ); 69 alarmLayout->setSpacing( 3 );
@@ -279,33 +279,34 @@ class KOListView : public KOEventView
279 void saveToFile(); 279 void saveToFile();
280 void saveToFileVCS(); 280 void saveToFileVCS();
281 void saveDescriptionToFile(); 281 void saveDescriptionToFile();
282 void beamSelected(); 282 void beamSelected();
283 void updateConfig(); 283 void updateConfig();
284 void addCat(); 284 void addCat();
285 void setCat(); 285 void setCat();
286 void setAlarm(); 286 void setAlarm();
287 void setCategories( bool removeOld ); 287 void setCategories( bool removeOld );
288 void changeEventDisplay(Event *, int); 288 void changeEventDisplay(Event *, int);
289 289
290 void defaultItemAction(QListViewItem *item); 290 void defaultItemAction(QListViewItem *item);
291 void popupMenu(QListViewItem *item,const QPoint &,int); 291 void popupMenu(QListViewItem *item,const QPoint &,int);
292 292
293 protected slots: 293 protected slots:
294 void processSelectionChange(QListViewItem *); 294 void processSelectionChange(QListViewItem *);
295 295
296 protected: 296 protected:
297 void writeToFile( bool iCal ); 297 void writeToFile( bool iCal );
298 void addEvents(QPtrList<Event> eventList); 298 void addEvents(QPtrList<Event> eventList);
299 void addIncidence(Incidence *); 299 void addIncidence(Incidence *);
300 KOListViewItem *getItemForEvent(Event *event); 300 KOListViewItem *getItemForEvent(Event *event);
301 301
302 private: 302 private:
303 KOListViewWhatsThis *mKOListViewWhatsThis;
303 KOListViewListView *mListView; 304 KOListViewListView *mListView;
304 KOEventPopupMenu *mPopupMenu; 305 KOEventPopupMenu *mPopupMenu;
305 KOListViewItem *mActiveItem; 306 KOListViewItem *mActiveItem;
306 QDict<Incidence> mUidDict; 307 QDict<Incidence> mUidDict;
307 QDate mStartDate; 308 QDate mStartDate;
308 void keyPressEvent ( QKeyEvent * ) ; 309 void keyPressEvent ( QKeyEvent * ) ;
309}; 310};
310 311
311#endif 312#endif
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index ae61db6..7927307 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -68,49 +68,53 @@ public:
68protected: 68protected:
69 virtual QString text( const QPoint& p) 69 virtual QString text( const QPoint& p)
70 { 70 {
71 return _wid->getWhatsThisText(p) ; 71 return _wid->getWhatsThisText(p) ;
72 }; 72 };
73private: 73private:
74 KNoScrollListBox* _wid; 74 KNoScrollListBox* _wid;
75 75
76}; 76};
77 77
78 78
79KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) 79KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
80 : QListBox(parent, name, WRepaintNoErase) 80 : QListBox(parent, name, WRepaintNoErase)
81{ 81{
82#ifndef DESKTOP_VERSION 82#ifndef DESKTOP_VERSION
83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
84#endif 84#endif
85 mWT = new KNOWhatsThis(this); 85 mWT = new KNOWhatsThis(this);
86 resetOnFocusIn = true; 86 resetOnFocusIn = true;
87 setVScrollBarMode(QScrollView::AlwaysOff); 87 setVScrollBarMode(QScrollView::AlwaysOff);
88 setHScrollBarMode(QScrollView::AlwaysOff); 88 setHScrollBarMode(QScrollView::AlwaysOff);
89} 89}
90KNoScrollListBox::~KNoScrollListBox() 90KNoScrollListBox::~KNoScrollListBox()
91{ 91{
92#if QT_VERSION >= 0x030000
92 93
94#else
95 delete mWT;
96#endif
93} 97}
94 98
95 99
96void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) 100void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
97{ 101{
98 QListBox::focusInEvent ( e ); 102 QListBox::focusInEvent ( e );
99 if ( count() ){ 103 if ( count() ){
100 int ci = currentItem(); 104 int ci = currentItem();
101 if ( ci < 0 ) ci = 0; 105 if ( ci < 0 ) ci = 0;
102 106
103 setCurrentItem( ci ); 107 setCurrentItem( ci );
104 setSelected ( ci, true ); 108 setSelected ( ci, true );
105 emit highlighted( item ( ci ) ); 109 emit highlighted( item ( ci ) );
106 110
107 resetOnFocusIn = true; 111 resetOnFocusIn = true;
108 112
109 if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { 113 if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) {
110 QListBoxItem *fi = firstItem (); 114 QListBoxItem *fi = firstItem ();
111 if (fi ) { 115 if (fi ) {
112 int ihei = fi->height( this ); 116 int ihei = fi->height( this );
113 int hei = numRows () * ihei; 117 int hei = numRows () * ihei;
114 if ( hei < height() - horizontalScrollBar()->height () ) { 118 if ( hei < height() - horizontalScrollBar()->height () ) {
115 setVScrollBarMode(QScrollView::AlwaysOff); 119 setVScrollBarMode(QScrollView::AlwaysOff);
116 } 120 }
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index f26d16d..e95039d 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -567,49 +567,55 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
567 SLOT( paintNeeded()) ); 567 SLOT( paintNeeded()) );
568 568
569#if 0 569#if 0
570 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), 570 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)),
571 SLOT(selectionChanged(QListViewItem *))); 571 SLOT(selectionChanged(QListViewItem *)));
572 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), 572 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)),
573 SLOT(selectionChanged(QListViewItem *))); 573 SLOT(selectionChanged(QListViewItem *)));
574 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), 574 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)),
575 SLOT(selectionChanged(QListViewItem *))); 575 SLOT(selectionChanged(QListViewItem *)));
576#endif 576#endif
577 577
578 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); 578 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
579 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) )); 579 connect( mTodoListView, SIGNAL(unparentTodoSignal(Todo *) ), SIGNAL(unparentTodoSignal(Todo *) ));
580 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) )); 580 connect( mTodoListView, SIGNAL( deleteTodo(Todo *) ), SIGNAL(deleteTodoSignal(Todo *) ));
581 581
582 connect( mTodoListView, SIGNAL(selectionChanged() ), 582 connect( mTodoListView, SIGNAL(selectionChanged() ),
583 SLOT( processSelectionChange() ) ); 583 SLOT( processSelectionChange() ) );
584 connect( mQuickAdd, SIGNAL( returnPressed () ), 584 connect( mQuickAdd, SIGNAL( returnPressed () ),
585 SLOT( addQuickTodo() ) ); 585 SLOT( addQuickTodo() ) );
586 586
587} 587}
588 588
589KOTodoView::~KOTodoView() 589KOTodoView::~KOTodoView()
590{ 590{
591 // delete mKOTodoViewWhatsThis; 591
592#if QT_VERSION >= 0x030000
593
594#else
595 delete mKOTodoViewWhatsThis;
596#endif
597
592 delete mDocPrefs; 598 delete mDocPrefs;
593} 599}
594QString KOTodoView::getWhatsThisText(QPoint p) 600QString KOTodoView::getWhatsThisText(QPoint p)
595{ 601{
596 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p ); 602 KOTodoViewItem* item = ( KOTodoViewItem* ) mTodoListView->itemAt( p );
597 if ( item ) 603 if ( item )
598 return KIncidenceFormatter::instance()->getFormattedText( item->todo(), 604 return KIncidenceFormatter::instance()->getFormattedText( item->todo(),
599 KOPrefs::instance()->mWTshowDetails, 605 KOPrefs::instance()->mWTshowDetails,
600 KOPrefs::instance()->mWTshowCreated, 606 KOPrefs::instance()->mWTshowCreated,
601 KOPrefs::instance()->mWTshowChanged); 607 KOPrefs::instance()->mWTshowChanged);
602 return i18n("That is the todo view" ); 608 return i18n("That is the todo view" );
603 609
604} 610}
605 611
606void KOTodoView::jumpToDate () 612void KOTodoView::jumpToDate ()
607{ 613{
608 // if (mActiveItem) { 614 // if (mActiveItem) {
609// mActiveItem->todo()); 615// mActiveItem->todo());
610// if ( mActiveItem->todo()->hasDueDate() ) 616// if ( mActiveItem->todo()->hasDueDate() )
611// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); 617// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() );
612} 618}
613void KOTodoView::paintNeeded() 619void KOTodoView::paintNeeded()
614{ 620{
615 if ( mPendingUpdateBeforeRepaint ) { 621 if ( mPendingUpdateBeforeRepaint ) {
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 87cef20..68e5e5a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -569,48 +569,54 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
569 mView->viewManager()->showNextXView(); 569 mView->viewManager()->showNextXView();
570 } 570 }
571 else if ( msg == "-showWNext" ) { 571 else if ( msg == "-showWNext" ) {
572 mView->viewManager()->showWhatsNextView(); 572 mView->viewManager()->showWhatsNextView();
573 } 573 }
574 else if ( msg == "nextView()" ) { 574 else if ( msg == "nextView()" ) {
575 mView->viewManager()->showNextView(); 575 mView->viewManager()->showNextView();
576 } 576 }
577 else if ( msg == "-showNextXView" ) { 577 else if ( msg == "-showNextXView" ) {
578 mView->viewManager()->showNextXView(); 578 mView->viewManager()->showNextXView();
579 } 579 }
580 580
581 581
582 } 582 }
583 583
584 showMaximized(); 584 showMaximized();
585 raise(); 585 raise();
586} 586}
587 587
588QPixmap MainWindow::loadPixmap( QString name ) 588QPixmap MainWindow::loadPixmap( QString name )
589{ 589{
590 return SmallIcon( name ); 590 return SmallIcon( name );
591 591
592} 592}
593void MainWindow::setUsesBigPixmaps ( bool b )
594{
595 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
596 if ( b )
597 qDebug("KO: BigPixmaps are not supported ");
598}
593void MainWindow::initActions() 599void MainWindow::initActions()
594{ 600{
595 //KOPrefs::instance()->mShowFullMenu 601 //KOPrefs::instance()->mShowFullMenu
596 iconToolBar->clear(); 602 iconToolBar->clear();
597 KOPrefs *p = KOPrefs::instance(); 603 KOPrefs *p = KOPrefs::instance();
598 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 604 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
599 605
600 QPopupMenu *viewMenu = new QPopupMenu( this ); 606 QPopupMenu *viewMenu = new QPopupMenu( this );
601 QPopupMenu *actionMenu = new QPopupMenu( this ); 607 QPopupMenu *actionMenu = new QPopupMenu( this );
602 QPopupMenu *importMenu = new QPopupMenu( this ); 608 QPopupMenu *importMenu = new QPopupMenu( this );
603 QPopupMenu *importMenu_X = new QPopupMenu( this ); 609 QPopupMenu *importMenu_X = new QPopupMenu( this );
604 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 610 QPopupMenu *exportMenu_X = new QPopupMenu( this );
605 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 611 QPopupMenu *beamMenu_X = new QPopupMenu( this );
606 selectFilterMenu = new QPopupMenu( this ); 612 selectFilterMenu = new QPopupMenu( this );
607 selectFilterMenu->setCheckable( true ); 613 selectFilterMenu->setCheckable( true );
608 syncMenu = new QPopupMenu( this ); 614 syncMenu = new QPopupMenu( this );
609 configureAgendaMenu = new QPopupMenu( this ); 615 configureAgendaMenu = new QPopupMenu( this );
610 configureToolBarMenu = new QPopupMenu( this ); 616 configureToolBarMenu = new QPopupMenu( this );
611 QPopupMenu *helpMenu = new QPopupMenu( this ); 617 QPopupMenu *helpMenu = new QPopupMenu( this );
612 QIconSet icon; 618 QIconSet icon;
613 int pixWid = 22, pixHei = 22; 619 int pixWid = 22, pixHei = 22;
614 QString pathString = ""; 620 QString pathString = "";
615 if ( !p->mToolBarMiniIcons ) { 621 if ( !p->mToolBarMiniIcons ) {
616 if ( QApplication::desktop()->width() < 480 ) { 622 if ( QApplication::desktop()->width() < 480 ) {
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 8fd3d24..6895e36 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -22,48 +22,49 @@ class KSyncProfile;
22#define QPEToolBar QToolBar 22#define QPEToolBar QToolBar
23#define QPEMenuBar QMenuBar 23#define QPEMenuBar QMenuBar
24#endif 24#endif
25class QPEToolBar; 25class QPEToolBar;
26class QPEMenuBar; 26class QPEMenuBar;
27 27
28 28
29namespace KCal { 29namespace KCal {
30class CalendarLocal; 30class CalendarLocal;
31} 31}
32 32
33using namespace KCal; 33using namespace KCal;
34 34
35class MainWindow : public QMainWindow 35class MainWindow : public QMainWindow
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38 public: 38 public:
39 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); 39 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
40 ~MainWindow(); 40 ~MainWindow();
41 bool beamReceiveEnabled(); 41 bool beamReceiveEnabled();
42 static QString defaultFileName(); 42 static QString defaultFileName();
43 static QString syncFileName(); 43 static QString syncFileName();
44 static QString resourcePath(); 44 static QString resourcePath();
45 public slots: 45 public slots:
46 void setUsesBigPixmaps ( bool );
46 void setCaption ( const QString & ); 47 void setCaption ( const QString & );
47 void updateWeekNum(const KCal::DateList &); 48 void updateWeekNum(const KCal::DateList &);
48 void updateWeek(QDate); 49 void updateWeek(QDate);
49 void updateFilterToolbar(); 50 void updateFilterToolbar();
50 virtual void showMaximized (); 51 virtual void showMaximized ();
51 void configureAgenda( int ); 52 void configureAgenda( int );
52 void recieve( const QCString& msg, const QByteArray& data ); 53 void recieve( const QCString& msg, const QByteArray& data );
53 protected slots: 54 protected slots:
54 void setCaptionToDates(); 55 void setCaptionToDates();
55 void weekAction(); 56 void weekAction();
56 void about(); 57 void about();
57 void licence(); 58 void licence();
58 void faq(); 59 void faq();
59 void usertrans(); 60 void usertrans();
60 void features(); 61 void features();
61 void synchowto(); 62 void synchowto();
62 void storagehowto(); 63 void storagehowto();
63 void timetrackinghowto(); 64 void timetrackinghowto();
64 void kdesynchowto(); 65 void kdesynchowto();
65 void multisynchowto(); 66 void multisynchowto();
66 void whatsNew(); 67 void whatsNew();
67 void keyBindings(); 68 void keyBindings();
68 void aboutAutoSaving();; 69 void aboutAutoSaving();;
69 void aboutKnownBugs(); 70 void aboutKnownBugs();