summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-26 13:36:19 (UTC)
committer zautrix <zautrix>2005-03-26 13:36:19 (UTC)
commit98444f8937b151a3deb71b7ae0da495872c52855 (patch) (unidiff)
tree26856e27b5d9aca9d428142cbbd15fef030957a7 /korganizer
parent93d1be2c6eead07300e7f90f3b417fcef0f109d3 (diff)
downloadkdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.zip
kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.tar.gz
kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.tar.bz2
icons added
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp28
-rw-r--r--korganizer/koagendaview.h3
-rw-r--r--korganizer/koviewmanager.cpp4
-rw-r--r--korganizer/navigatorbar.cpp8
4 files changed, 14 insertions, 29 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 8001c8f..acf43bd 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -338,96 +338,95 @@ void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w )
338 setMaximumHeight(0); 338 setMaximumHeight(0);
339 setMinimumHeight(0); 339 setMinimumHeight(0);
340} 340}
341void EventIndicator::changeColumns(int columns) 341void EventIndicator::changeColumns(int columns)
342{ 342{
343 mColumns = columns; 343 mColumns = columns;
344 mEnabled.resize(mColumns); 344 mEnabled.resize(mColumns);
345 345
346 update(); 346 update();
347} 347}
348 348
349void EventIndicator::enableColumn(int column, bool enable) 349void EventIndicator::enableColumn(int column, bool enable)
350{ 350{
351 mEnabled[column] = enable; 351 mEnabled[column] = enable;
352} 352}
353 353
354 354
355//////////////////////////////////////////////////////////////////////////// 355////////////////////////////////////////////////////////////////////////////
356//////////////////////////////////////////////////////////////////////////// 356////////////////////////////////////////////////////////////////////////////
357//////////////////////////////////////////////////////////////////////////// 357////////////////////////////////////////////////////////////////////////////
358 358
359KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : 359KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
360 KOEventView (cal,parent,name) 360 KOEventView (cal,parent,name)
361{ 361{
362 mBlockUpdating = true; 362 mBlockUpdating = true;
363 mStartHour = 8; 363 mStartHour = 8;
364 mSelectedDates.append(QDate::currentDate()); 364 mSelectedDates.append(QDate::currentDate());
365 365
366 mLayoutDayLabels = 0; 366 mLayoutDayLabels = 0;
367 mDayLabelsFrame = 0; 367 mDayLabelsFrame = 0;
368 mDayLabels = 0; 368 mDayLabels = 0;
369 bool isRTL = KOGlobals::self()->reverseLayout(); 369 bool isRTL = KOGlobals::self()->reverseLayout();
370 370 QPixmap expandPix;
371 if ( KOPrefs::instance()->mVerticalScreen ) { 371 if ( KOPrefs::instance()->mVerticalScreen ) {
372 mExpandedPixmap = SmallIcon( "1downarrow" ); 372 expandPix = SmallIcon( "1updownarrow" );
373 mNotExpandedPixmap = SmallIcon( "1uparrow" );
374 } else { 373 } else {
375 mExpandedPixmap = SmallIcon( isRTL ? "1leftarrow" : "1rightarrow" ); 374 expandPix = SmallIcon("1leftrightarrow" );
376 mNotExpandedPixmap = SmallIcon( isRTL ? "1rightarrow" : "1leftarrow" );
377 } 375 }
378 376
379 QBoxLayout *topLayout = new QVBoxLayout(this); 377 QBoxLayout *topLayout = new QVBoxLayout(this);
380 378
381 // Create day name labels for agenda columns 379 // Create day name labels for agenda columns
382 // Create agenda splitter 380 // Create agenda splitter
383 381
384 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); 382 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this);
385 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 383 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
386 topLayout->addWidget( mSplitterAgenda ); 384 topLayout->addWidget( mSplitterAgenda );
387 mAllDayFrame = new QHBox(mSplitterAgenda); 385 mAllDayFrame = new QHBox(mSplitterAgenda);
388 mAllDayFrame->setFocusPolicy(NoFocus); 386 mAllDayFrame->setFocusPolicy(NoFocus);
389 QWidget *agendaFrame = new QWidget(mSplitterAgenda); 387 QWidget *agendaFrame = new QWidget(mSplitterAgenda);
390 agendaFrame->setFocusPolicy(NoFocus); 388 agendaFrame->setFocusPolicy(NoFocus);
391 389
392 // Create all-day agenda widget 390 // Create all-day agenda widget
393 mDummyAllDayLeft = new QVBox( mAllDayFrame ); 391 mDummyAllDayLeft = new QVBox( mAllDayFrame );
394 392
395 mExpandButton = new QPushButton(mDummyAllDayLeft); 393 mExpandButton = new QPushButton(mDummyAllDayLeft);
396 mExpandButton->setPixmap( mNotExpandedPixmap ); 394 mExpandButton->setPixmap( expandPix );
397 int widebut = mExpandButton->sizeHint().width(); 395 int widebut = mExpandButton->sizeHint().width()+4;
396 int heibut = mExpandButton->sizeHint().height()+4;
397 if ( heibut > widebut )
398 widebut = heibut ;
398 if ( QApplication::desktop()->width() < 480 ) 399 if ( QApplication::desktop()->width() < 480 )
399 widebut = widebut*2; 400 widebut = widebut*3/2;
400 else
401 widebut = (widebut*3) / 2;
402 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, 401 //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
403 // QSizePolicy::Fixed ) ); 402 // QSizePolicy::Fixed ) );
404 mExpandButton->setFixedSize( widebut, widebut); 403 mExpandButton->setFixedSize( widebut, widebut);
405 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); 404 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
406 mExpandButton->setFocusPolicy(NoFocus); 405 mExpandButton->setFocusPolicy(NoFocus);
407 mAllDayAgenda = new KOAgenda(1,mAllDayFrame); 406 mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
408 mAllDayAgenda->setFocusPolicy(NoFocus); 407 mAllDayAgenda->setFocusPolicy(NoFocus);
409 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); 408 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame);
410 409
411 // Create event context menu for all day agenda 410 // Create event context menu for all day agenda
412 mAllDayAgendaPopup = eventPopup(); 411 mAllDayAgendaPopup = eventPopup();
413 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 412 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
414 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 413 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
415 414
416 // Create agenda frame 415 // Create agenda frame
417 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); 416 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3);
418 // QHBox *agendaFrame = new QHBox(splitterAgenda); 417 // QHBox *agendaFrame = new QHBox(splitterAgenda);
419 418
420 // create event indicator bars 419 // create event indicator bars
421 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); 420 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
422#ifndef DESKTOP_VERSION 421#ifndef DESKTOP_VERSION
423 // FIX 422 // FIX
424 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 423 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
425#endif 424#endif
426 mDayLabelsFrame = new QHBox(agendaFrame); 425 mDayLabelsFrame = new QHBox(agendaFrame);
427 //topLayout->addWidget(mDayLabelsFrame); 426 //topLayout->addWidget(mDayLabelsFrame);
428 mDayLabels = new QFrame (mDayLabelsFrame); 427 mDayLabels = new QFrame (mDayLabelsFrame);
429 mLayoutDayLabels = new QHBoxLayout(mDayLabels); 428 mLayoutDayLabels = new QHBoxLayout(mDayLabels);
430 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); 429 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
431 agendaLayout->addWidget(mEventIndicatorTop,1,1); 430 agendaLayout->addWidget(mEventIndicatorTop,1,1);
432 431
433 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, 432 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom,
@@ -1427,73 +1426,64 @@ void KOAgendaView::setHolidayMasks()
1427 Event *event; 1426 Event *event;
1428 for( event = events.first(); event; event = events.next() ) { 1427 for( event = events.first(); event; event = events.next() ) {
1429 if ( event->isHoliday()) { 1428 if ( event->isHoliday()) {
1430 showHoliday = true; 1429 showHoliday = true;
1431 break; 1430 break;
1432 } 1431 }
1433 } 1432 }
1434 1433
1435 } 1434 }
1436 1435
1437#ifndef KORG_NOPLUGINS 1436#ifndef KORG_NOPLUGINS
1438 bool showHoliday = KOPrefs::instance()->mExcludeHolidays && 1437 bool showHoliday = KOPrefs::instance()->mExcludeHolidays &&
1439 !KOCore::self()->holiday(date).isEmpty(); 1438 !KOCore::self()->holiday(date).isEmpty();
1440#endif 1439#endif
1441 bool showDay = showSaturday || showSunday || showHoliday; 1440 bool showDay = showSaturday || showSunday || showHoliday;
1442 1441
1443 if (showDay) { 1442 if (showDay) {
1444 mHolidayMask.at(i) = true; 1443 mHolidayMask.at(i) = true;
1445 } else { 1444 } else {
1446 mHolidayMask.at(i) = false; 1445 mHolidayMask.at(i) = false;
1447 } 1446 }
1448 } 1447 }
1449 1448
1450 mAgenda->setHolidayMask(&mHolidayMask); 1449 mAgenda->setHolidayMask(&mHolidayMask);
1451 mAllDayAgenda->setHolidayMask(&mHolidayMask); 1450 mAllDayAgenda->setHolidayMask(&mHolidayMask);
1452} 1451}
1453 1452
1454void KOAgendaView::setContentsPos(int y) 1453void KOAgendaView::setContentsPos(int y)
1455{ 1454{
1456 mAgenda->setContentsPos(0,y); 1455 mAgenda->setContentsPos(0,y);
1457} 1456}
1458 1457
1459void KOAgendaView::setExpandedButton( bool expanded )
1460{
1461 if ( expanded ) {
1462 mExpandButton->setPixmap( mExpandedPixmap );
1463 } else {
1464 mExpandButton->setPixmap( mNotExpandedPixmap );
1465 }
1466}
1467
1468void KOAgendaView::clearSelection() 1458void KOAgendaView::clearSelection()
1469{ 1459{
1470 mAgenda->deselectItem(); 1460 mAgenda->deselectItem();
1471 mAllDayAgenda->deselectItem(); 1461 mAllDayAgenda->deselectItem();
1472} 1462}
1473 1463
1474void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart, 1464void KOAgendaView::newTimeSpanSelectedAllDay(int gxStart, int gyStart,
1475 int gxEnd, int gyEnd) 1465 int gxEnd, int gyEnd)
1476{ 1466{
1477 mTimeSpanInAllDay = true; 1467 mTimeSpanInAllDay = true;
1478 newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd); 1468 newTimeSpanSelected(gxStart,gyStart,gxEnd,gyEnd);
1479} 1469}
1480 1470
1481 1471
1482 1472
1483 1473
1484void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart, 1474void KOAgendaView::newTimeSpanSelected(int gxStart, int gyStart,
1485 int gxEnd, int gyEnd) 1475 int gxEnd, int gyEnd)
1486{ 1476{
1487 if (!mSelectedDates.count()) return; 1477 if (!mSelectedDates.count()) return;
1488 1478
1489 QDate dayStart = mSelectedDates[gxStart]; 1479 QDate dayStart = mSelectedDates[gxStart];
1490 QDate dayEnd = mSelectedDates[gxEnd]; 1480 QDate dayEnd = mSelectedDates[gxEnd];
1491 1481
1492 QTime timeStart = mAgenda->gyToTime(gyStart); 1482 QTime timeStart = mAgenda->gyToTime(gyStart);
1493 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 ); 1483 QTime timeEnd = mAgenda->gyToTime( gyEnd + 1 );
1494 1484
1495 QDateTime dtStart(dayStart,timeStart); 1485 QDateTime dtStart(dayStart,timeStart);
1496 QDateTime dtEnd(dayEnd,timeEnd); 1486 QDateTime dtEnd(dayEnd,timeEnd);
1497 1487
1498 mTimeSpanBegin = dtStart; 1488 mTimeSpanBegin = dtStart;
1499 mTimeSpanEnd = dtEnd; 1489 mTimeSpanEnd = dtEnd;
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 0cb9310..57b4e46 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -174,65 +174,64 @@ class KOAgendaView : public KOEventView {
174 QDateTime selectionEnd() {return mTimeSpanEnd;} 174 QDateTime selectionEnd() {return mTimeSpanEnd;}
175 /** returns true if selection is for whole day */ 175 /** returns true if selection is for whole day */
176 bool selectedIsAllDay() {return mTimeSpanInAllDay;} 176 bool selectedIsAllDay() {return mTimeSpanInAllDay;}
177 /** make selected start/end invalid */ 177 /** make selected start/end invalid */
178 void deleteSelectedDateTime(); 178 void deleteSelectedDateTime();
179 void repaintAgenda(); 179 void repaintAgenda();
180 public slots: 180 public slots:
181 void setInitStartHour(); 181 void setInitStartHour();
182 virtual void updateView(); 182 virtual void updateView();
183 virtual void updateConfig(); 183 virtual void updateConfig();
184 virtual void showDates(const QDate &start, const QDate &end); 184 virtual void showDates(const QDate &start, const QDate &end);
185 virtual void showEvents(QPtrList<Event> eventList); 185 virtual void showEvents(QPtrList<Event> eventList);
186 186
187 void updateTodo( Todo *, int ); 187 void updateTodo( Todo *, int );
188 void changeEventDisplay(Event *, int); 188 void changeEventDisplay(Event *, int);
189 189
190 void clearSelection(); 190 void clearSelection();
191 191
192 void newTodo(int gx,int gy); 192 void newTodo(int gx,int gy);
193 void newEvent(int gx,int gy); 193 void newEvent(int gx,int gy);
194 void newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd); 194 void newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd);
195 void newEventAllDay(int gx, int gy); 195 void newEventAllDay(int gx, int gy);
196 void newTodoAllDay(int gx, int gy); 196 void newTodoAllDay(int gx, int gy);
197 197
198 void startDrag(Event *); 198 void startDrag(Event *);
199 199
200 void readSettings(); 200 void readSettings();
201 void readSettings(KConfig *); 201 void readSettings(KConfig *);
202 void writeSettings(KConfig *); 202 void writeSettings(KConfig *);
203 203
204 void setContentsPos(int y); 204 void setContentsPos(int y);
205 205
206 void setExpandedButton( bool expanded );
207 void scrollOneHourUp(); 206 void scrollOneHourUp();
208 void scrollOneHourDown(); 207 void scrollOneHourDown();
209 void addToCalSlot(Incidence *, Incidence *); 208 void addToCalSlot(Incidence *, Incidence *);
210 209
211 signals: 210 signals:
212 void showDateView( int, QDate ); 211 void showDateView( int, QDate );
213 void newTodoSignal( QDateTime ,bool ); 212 void newTodoSignal( QDateTime ,bool );
214 void toggleExpand(); 213 void toggleExpand();
215 void selectWeekNum( int ); 214 void selectWeekNum( int );
216 void todoMoved( Todo *, int ); 215 void todoMoved( Todo *, int );
217 void incidenceChanged(Incidence * , int ); 216 void incidenceChanged(Incidence * , int );
218 // void cloneIncidenceSignal(Incidence *); 217 // void cloneIncidenceSignal(Incidence *);
219 218
220 protected: 219 protected:
221 KOAgendaButton* getNewDaylabel(); 220 KOAgendaButton* getNewDaylabel();
222 bool mBlockUpdating; 221 bool mBlockUpdating;
223 int mUpcomingWidth; 222 int mUpcomingWidth;
224 /** Fill agenda beginning with date startDate */ 223 /** Fill agenda beginning with date startDate */
225 void fillAgenda(const QDate &startDate); 224 void fillAgenda(const QDate &startDate);
226 void resizeEvent( QResizeEvent* e ); 225 void resizeEvent( QResizeEvent* e );
227 /** Fill agenda using the current set value for the start date */ 226 /** Fill agenda using the current set value for the start date */
228 void fillAgenda(); 227 void fillAgenda();
229 228
230 /** Create labels for the selected dates. */ 229 /** Create labels for the selected dates. */
231 void createDayLabels(); 230 void createDayLabels();
232 231
233 /** 232 /**
234 Set the masks on the agenda widgets indicating, which days are holidays. 233 Set the masks on the agenda widgets indicating, which days are holidays.
235 */ 234 */
236 void setHolidayMasks(); 235 void setHolidayMasks();
237 236
238 protected slots: 237 protected slots:
@@ -251,42 +250,40 @@ class KOAgendaView : public KOEventView {
251 250
252 private: 251 private:
253 // view widgets 252 // view widgets
254 QFrame *mDayLabels; 253 QFrame *mDayLabels;
255 QHBox *mDayLabelsFrame; 254 QHBox *mDayLabelsFrame;
256 QBoxLayout *mLayoutDayLabels; 255 QBoxLayout *mLayoutDayLabels;
257 QFrame *mAllDayFrame; 256 QFrame *mAllDayFrame;
258 KOAgenda *mAllDayAgenda; 257 KOAgenda *mAllDayAgenda;
259 KOAgenda *mAgenda; 258 KOAgenda *mAgenda;
260 TimeLabels *mTimeLabels; 259 TimeLabels *mTimeLabels;
261 QWidget *mDummyAllDayLeft; 260 QWidget *mDummyAllDayLeft;
262 261
263 KDGanttMinimizeSplitter* mSplitterAgenda; 262 KDGanttMinimizeSplitter* mSplitterAgenda;
264 QPushButton *mExpandButton; 263 QPushButton *mExpandButton;
265 264
266 DateList mSelectedDates; // List of dates to be displayed 265 DateList mSelectedDates; // List of dates to be displayed
267 int mViewType; 266 int mViewType;
268 267
269 bool mWeekStartsMonday; 268 bool mWeekStartsMonday;
270 int mStartHour; 269 int mStartHour;
271 270
272 KOEventPopupMenu *mAgendaPopup; 271 KOEventPopupMenu *mAgendaPopup;
273 KOEventPopupMenu *mAllDayAgendaPopup; 272 KOEventPopupMenu *mAllDayAgendaPopup;
274 273
275 EventIndicator *mEventIndicatorTop; 274 EventIndicator *mEventIndicatorTop;
276 EventIndicator *mEventIndicatorBottom; 275 EventIndicator *mEventIndicatorBottom;
277 276
278 QMemArray<int> mMinY; 277 QMemArray<int> mMinY;
279 QMemArray<int> mMaxY; 278 QMemArray<int> mMaxY;
280 279
281 QMemArray<bool> mHolidayMask; 280 QMemArray<bool> mHolidayMask;
282 281
283 QPixmap mExpandedPixmap;
284 QPixmap mNotExpandedPixmap;
285 QPtrList<KOAgendaButton> mDayLabelsList; 282 QPtrList<KOAgendaButton> mDayLabelsList;
286 QDateTime mTimeSpanBegin; 283 QDateTime mTimeSpanBegin;
287 QDateTime mTimeSpanEnd; 284 QDateTime mTimeSpanEnd;
288 bool mTimeSpanInAllDay; 285 bool mTimeSpanInAllDay;
289 void keyPressEvent ( QKeyEvent * e ); 286 void keyPressEvent ( QKeyEvent * e );
290}; 287};
291 288
292#endif // KOAGENDAVIEW_H 289#endif // KOAGENDAVIEW_H
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 5a2dce3..31ee5e2 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -367,67 +367,65 @@ void KOViewManager::showAgendaView( bool fullScreen )
367 addView(mAgendaView); 367 addView(mAgendaView);
368#ifndef DESKTOP_VERSION 368#ifndef DESKTOP_VERSION
369 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); 369 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold );
370#endif 370#endif
371 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), 371 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )),
372 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); 372 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) ));
373 373
374 // SIGNALS/SLOTS FOR DAY/WEEK VIEW 374 // SIGNALS/SLOTS FOR DAY/WEEK VIEW
375 375
376 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); 376 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate )));
377 377
378 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), 378 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)),
379 mMainView, SLOT(newTodoDateTime(QDateTime,bool))); 379 mMainView, SLOT(newTodoDateTime(QDateTime,bool)));
380 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), 380 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)),
381 mMainView, SLOT(newEvent(QDateTime))); 381 mMainView, SLOT(newEvent(QDateTime)));
382 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), 382 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)),
383 mMainView, SLOT(newEvent(QDateTime,QDateTime))); 383 mMainView, SLOT(newEvent(QDateTime,QDateTime)));
384 connect(mAgendaView,SIGNAL(newEventSignal(QDate)), 384 connect(mAgendaView,SIGNAL(newEventSignal(QDate)),
385 mMainView, SLOT(newEvent(QDate))); 385 mMainView, SLOT(newEvent(QDate)));
386 386
387 connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), 387 connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)),
388 mMainView, SLOT(editIncidence(Incidence *))); 388 mMainView, SLOT(editIncidence(Incidence *)));
389 connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), 389 connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)),
390 mMainView, SLOT(showIncidence(Incidence *))); 390 mMainView, SLOT(showIncidence(Incidence *)));
391 connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), 391 connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)),
392 mMainView, SLOT(deleteIncidence(Incidence *))); 392 mMainView, SLOT(deleteIncidence(Incidence *)));
393 393
394 connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), 394 connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ),
395 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 395 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
396 396
397 connect(mAgendaView, SIGNAL( toggleExpand() ), 397 connect(mAgendaView, SIGNAL( toggleExpand() ),
398 mMainView, SLOT( toggleExpand() ) ); 398 mMainView, SLOT( toggleExpand() ) );
399 399
400 connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ),
401 mAgendaView, SLOT( setExpandedButton( bool ) ) );
402 connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), 400 connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ),
403 mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; 401 mMainView, SLOT(cloneIncidence(Incidence *) ) ) ;
404 connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), 402 connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ),
405 mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; 403 mMainView, SLOT(cancelIncidence(Incidence *) ) ) ;
406 connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); 404 connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig()));
407 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, 405 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView,
408 SLOT( updateTodo( Todo *, int ) ) ); 406 SLOT( updateTodo( Todo *, int ) ) );
409 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), 407 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )),
410 mMainView, SIGNAL( todoModified( Todo *, int ))); 408 mMainView, SIGNAL( todoModified( Todo *, int )));
411 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 409 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
412 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 410 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
413 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 411 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
414 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 412 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
415 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), 413 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ),
416 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); 414 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
417 mAgendaView->readSettings(); 415 mAgendaView->readSettings();
418 mAgendaView->updateConfig(); 416 mAgendaView->updateConfig();
419 } 417 }
420 418
421 showView( mAgendaView, full); 419 showView( mAgendaView, full);
422 420
423} 421}
424 422
425void KOViewManager::showDayView() 423void KOViewManager::showDayView()
426{ 424{
427 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); 425 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
428 mFlagShowNextxDays = false; 426 mFlagShowNextxDays = false;
429 globalFlagBlockLabel = 1; 427 globalFlagBlockLabel = 1;
430 globalFlagBlockAgenda = 1; 428 globalFlagBlockAgenda = 1;
431 if ( mCurrentAgendaView != 1 ) 429 if ( mCurrentAgendaView != 1 )
432 mCurrentAgendaView = -1; 430 mCurrentAgendaView = -1;
433 showAgendaView(); 431 showAgendaView();
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index 06f5ef8..eca7c14 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -45,87 +45,87 @@
45#ifndef KORG_NOPLUGINS 45#ifndef KORG_NOPLUGINS
46#include "kocore.h" 46#include "kocore.h"
47#endif 47#endif
48 48
49#include <kcalendarsystem.h> 49#include <kcalendarsystem.h>
50 50
51#include "navigatorbar.h" 51#include "navigatorbar.h"
52 52
53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) 53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name )
54 : QWidget( parent, name ) 54 : QWidget( parent, name )
55{ 55{
56 QBoxLayout *topLayout = new QHBoxLayout( this ); 56 QBoxLayout *topLayout = new QHBoxLayout( this );
57 57
58 // Set up the control buttons and date label 58 // Set up the control buttons and date label
59 mCtrlFrame = new QFrame( this ); 59 mCtrlFrame = new QFrame( this );
60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); 60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised);
61 mCtrlFrame->setLineWidth(1); 61 mCtrlFrame->setLineWidth(1);
62 62
63 topLayout->addWidget( mCtrlFrame ); 63 topLayout->addWidget( mCtrlFrame );
64 64
65 65
66 66
67 bool isRTL = KOGlobals::self()->reverseLayout(); 67 bool isRTL = KOGlobals::self()->reverseLayout();
68#ifndef DESKTOP_VERSION 68#ifndef DESKTOP_VERSION
69 bool isDesktop = false; 69 bool isDesktop = false;
70#else 70#else
71 bool isDesktop = true; 71 bool isDesktop = true;
72#endif 72#endif
73 if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 ) 73 if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 )
74 isDesktop = true; 74 isDesktop = true;
75 // Create backward navigation buttons 75 // Create backward navigation buttons
76 mPrevYear = new QPushButton( mCtrlFrame ); 76 mPrevYear = new QPushButton( mCtrlFrame );
77 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) ); 77 mPrevYear->setPixmap( SmallIcon( isDesktop ? "3leftarrowB" : "3leftarrow" ) );
78 QToolTip::add( mPrevYear, i18n("Previous Year") ); 78 QToolTip::add( mPrevYear, i18n("Previous Year") );
79 79
80 mPrevMonth = new QPushButton( mCtrlFrame ); 80 mPrevMonth = new QPushButton( mCtrlFrame );
81 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); 81 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow") );
82 QToolTip::add( mPrevMonth, i18n("Previous Month") ); 82 QToolTip::add( mPrevMonth, i18n("Previous Month") );
83 83
84 // Create forward navigation buttons 84 // Create forward navigation buttons
85 mNextMonth = new QPushButton( mCtrlFrame ); 85 mNextMonth = new QPushButton( mCtrlFrame );
86 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); 86 mNextMonth->setPixmap( SmallIcon( isDesktop ? "2rightarrowB" : "2rightarrow") );
87 QToolTip::add( mNextMonth, i18n("Next Month") ); 87 QToolTip::add( mNextMonth, i18n("Next Month") );
88 88
89 mPrevWeek = new QPushButton( mCtrlFrame ); 89 mPrevWeek = new QPushButton( mCtrlFrame );
90 mPrevWeek->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); 90 mPrevWeek->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") );
91 QToolTip::add( mPrevWeek, i18n("Previous Week") ); 91 QToolTip::add( mPrevWeek, i18n("Previous Week") );
92 92
93 // Create forward navigation buttons 93 // Create forward navigation buttons
94 mNextWeek = new QPushButton( mCtrlFrame ); 94 mNextWeek = new QPushButton( mCtrlFrame );
95 mNextWeek->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); 95 mNextWeek->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
96 QToolTip::add( mNextWeek, i18n("Next Week") ); 96 QToolTip::add( mNextWeek, i18n("Next Week") );
97 97
98 mNextYear = new QPushButton( mCtrlFrame ); 98 mNextYear = new QPushButton( mCtrlFrame );
99 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") ); 99 mNextYear->setPixmap( SmallIcon( isDesktop ? "3rightarrowB": "3rightarrow") );
100 QToolTip::add( mNextYear, i18n("Next Year") ); 100 QToolTip::add( mNextYear, i18n("Next Year") );
101 mSelectMonth = new QPushButton( mCtrlFrame ); 101 mSelectMonth = new QPushButton( mCtrlFrame );
102 // Create month name label 102 // Create month name label
103 //selectMonth->setFont( tfont ); 103 //selectMonth->setFont( tfont );
104 // selectMonth->setAlignment( AlignCenter ); 104 // selectMonth->setAlignment( AlignCenter );
105 //mDateLabel = new QLabel( selectMonth ); 105 //mDateLabel = new QLabel( selectMonth );
106 //mDateLabel->setFont( tfont ); 106 //mDateLabel->setFont( tfont );
107 //mDateLabel->setAlignment( AlignCenter ); 107 //mDateLabel->setAlignment( AlignCenter );
108 if ( QString ( name ) == QString("useBigPixmaps") ) { 108 if ( QString ( name ) == QString("useBigPixmaps") ) {
109 mNextMonth->setFlat( true); 109 mNextMonth->setFlat( true);
110 mNextWeek->setFlat( true); 110 mNextWeek->setFlat( true);
111 mNextYear->setFlat( true); 111 mNextYear->setFlat( true);
112 mSelectMonth->setFlat( true); 112 mSelectMonth->setFlat( true);
113 mPrevYear->setFlat( true); 113 mPrevYear->setFlat( true);
114 mPrevMonth->setFlat( true); 114 mPrevMonth->setFlat( true);
115 mPrevWeek->setFlat( true); 115 mPrevWeek->setFlat( true);
116 } else { 116 } else {
117 mPrevWeek->hide(); 117 mPrevWeek->hide();
118 mNextWeek->hide(); 118 mNextWeek->hide();
119 } 119 }
120 120
121 resetFont( font() ); 121 resetFont( font() );
122 122
123 123
124 // set up control frame layout 124 // set up control frame layout
125 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); 125 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 );
126 ctrlLayout->addWidget( mPrevYear, 3 ); 126 ctrlLayout->addWidget( mPrevYear, 3 );
127 ctrlLayout->addWidget( mPrevMonth, 3 ); 127 ctrlLayout->addWidget( mPrevMonth, 3 );
128 ctrlLayout->addWidget( mPrevWeek, 3 ); 128 ctrlLayout->addWidget( mPrevWeek, 3 );
129 //ctrlLayout->addStretch( 1 ); 129 //ctrlLayout->addStretch( 1 );
130 // ctrlLayout->addSpacing( 1 ); 130 // ctrlLayout->addSpacing( 1 );
131 // ctrlLayout->addWidget( mDateLabel ); 131 // ctrlLayout->addWidget( mDateLabel );