summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp4
-rw-r--r--korganizer/mainwindow.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 7b29ce7..d0a7b07 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -394,35 +394,35 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
394 w -= (AGENDA_ICON_SIZE+3); 394 w -= (AGENDA_ICON_SIZE+3);
395 } 395 }
396 else { 396 else {
397 yy+= AGENDA_ICON_SIZE+2; 397 yy+= AGENDA_ICON_SIZE+2;
398 h -=(AGENDA_ICON_SIZE+3); 398 h -=(AGENDA_ICON_SIZE+3);
399 } 399 }
400 } 400 }
401 int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue(); 401 int colsum = mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue();
402 if ( colsum < 250 ) 402 if ( colsum < 250 )
403 paint->setPen ( white); 403 paint->setPen ( white);
404 if ( x < 0 ) { 404 if ( x < 0 ) {
405 w = w+x-3; 405 w = w+x-3;
406 x = 3; 406 x = 3;
407 if ( w > parentWidget()->width() ){ 407 if ( w > parentWidget()->width() ){
408 w = parentWidget()->width() - 6; 408 w = parentWidget()->width() - 6;
409#ifndef DESKTOP_VERSION 409#ifndef DESKTOP_VERSION
410 align = ( AlignCenter|WordBreak); 410 align = ( AlignHCenter|WordBreak|AlignTop);
411#else 411#else
412 align = ( AlignCenter|BreakAnywhere|WordBreak); 412 align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop);
413#endif 413#endif
414 414
415 } 415 }
416 } 416 }
417 QRect dr; 417 QRect dr;
418 if ( w + x > parentWidget()->width() ) 418 if ( w + x > parentWidget()->width() )
419 w = parentWidget()->width()-x; 419 w = parentWidget()->width()-x;
420 paint->drawText ( x, yy, w, h, align, mDisplayedText, -1, &dr ); 420 paint->drawText ( x, yy, w, h, align, mDisplayedText, -1, &dr );
421 //qDebug("%d %d %d %d ", x, yy, w, h ); 421 //qDebug("%d %d %d %d ", x, yy, w, h );
422 if ( mIncidence->cancelled() ){ 422 if ( mIncidence->cancelled() ){
423 if ( ! small ) { 423 if ( ! small ) {
424 QFontMetrics fm ( paint->font() ); 424 QFontMetrics fm ( paint->font() );
425 paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2); 425 paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2);
426 } 426 }
427 427
428 } 428 }
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 16031b8..a164fa4 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -274,32 +274,33 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
274 qApp->processEvents(); 274 qApp->processEvents();
275 mView->dialogManager()->showSyncOptions(); 275 mView->dialogManager()->showSyncOptions();
276 } 276 }
277 277
278 //US listen for result adressed from Ka/Pi 278 //US listen for result adressed from Ka/Pi
279#ifndef DESKTOP_VERSION 279#ifndef DESKTOP_VERSION
280 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 280 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
281#endif 281#endif
282#ifndef DESKTOP_VERSION 282#ifndef DESKTOP_VERSION
283 infrared = 0; 283 infrared = 0;
284#endif 284#endif
285 updateWeek( mView->startDate() ); 285 updateWeek( mView->startDate() );
286 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 286 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
287 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 287 SLOT( updateWeekNum( const KCal::DateList & ) ) );
288 mBRdisabled = false; 288 mBRdisabled = false;
289 //toggleBeamReceive(); 289 //toggleBeamReceive();
290 setFocusPolicy ( WheelFocus );
290} 291}
291MainWindow::~MainWindow() 292MainWindow::~MainWindow()
292{ 293{
293 //qDebug("MainWindow::~MainWindow() "); 294 //qDebug("MainWindow::~MainWindow() ");
294 //save toolbar location 295 //save toolbar location
295 delete mCalendar; 296 delete mCalendar;
296 delete mSyncManager; 297 delete mSyncManager;
297#ifndef DESKTOP_VERSION 298#ifndef DESKTOP_VERSION
298 if ( infrared ) 299 if ( infrared )
299 delete infrared; 300 delete infrared;
300#endif 301#endif
301 302
302 303
303} 304}
304 305
305void MainWindow::disableBR(bool b) 306void MainWindow::disableBR(bool b)
@@ -1265,32 +1266,33 @@ void MainWindow::about()
1265 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1266 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1266} 1267}
1267void MainWindow::keyBindings() 1268void MainWindow::keyBindings()
1268{ 1269{
1269 QString cap = i18n("KO/Pi Keys + Colors"); 1270 QString cap = i18n("KO/Pi Keys + Colors");
1270 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1271 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1271 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1272 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1272 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1273 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1273 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1274 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1274 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ 1275 i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+
1275 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1276 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1276 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1277 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1277 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ 1278 i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+
1278 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1279 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1279 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1280 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1280 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1281 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1282 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1281 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1283 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1282 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1284 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1283 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ 1285 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+
1284 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1286 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1285 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1287 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1286 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1288 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1287 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1289 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1288 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1290 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1289 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1291 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1290 i18n("<p><h3>In agenda view:</h3></p>\n") + 1292 i18n("<p><h3>In agenda view:</h3></p>\n") +
1291 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1293 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1292 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1294 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1293 i18n("<p><h3>In todo view:</h3></p>\n") + 1295 i18n("<p><h3>In todo view:</h3></p>\n") +
1294 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1296 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1295 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1297 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1296 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1298 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
@@ -1613,32 +1615,35 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
1613 mView->goNext(); 1615 mView->goNext();
1614 showSelectedDates = true; 1616 showSelectedDates = true;
1615 break; 1617 break;
1616 case Qt::Key_Left: 1618 case Qt::Key_Left:
1617 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1619 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1618 mView->goPreviousMonth(); 1620 mView->goPreviousMonth();
1619 else 1621 else
1620 mView->goPrevious(); 1622 mView->goPrevious();
1621 showSelectedDates = true; 1623 showSelectedDates = true;
1622 break; 1624 break;
1623 case Qt::Key_Down: 1625 case Qt::Key_Down:
1624 mView->viewManager()->agendaView()->scrollOneHourDown(); 1626 mView->viewManager()->agendaView()->scrollOneHourDown();
1625 break; 1627 break;
1626 case Qt::Key_Up: 1628 case Qt::Key_Up:
1627 mView->viewManager()->agendaView()->scrollOneHourUp(); 1629 mView->viewManager()->agendaView()->scrollOneHourUp();
1628 break; 1630 break;
1631 case Qt::Key_K:
1632 mView->viewManager()->showMonthViewWeek();
1633 break;
1629 case Qt::Key_I: 1634 case Qt::Key_I:
1630 mView->showIncidence(); 1635 mView->showIncidence();
1631 break; 1636 break;
1632 case Qt::Key_Delete: 1637 case Qt::Key_Delete:
1633 case Qt::Key_Backspace: 1638 case Qt::Key_Backspace:
1634 mView->deleteIncidence(); 1639 mView->deleteIncidence();
1635 break; 1640 break;
1636 case Qt::Key_D: 1641 case Qt::Key_D:
1637 mView->viewManager()->showDayView(); 1642 mView->viewManager()->showDayView();
1638 showSelectedDates = true; 1643 showSelectedDates = true;
1639 break; 1644 break;
1640 case Qt::Key_O: 1645 case Qt::Key_O:
1641 mView->toggleFilerEnabled( ); 1646 mView->toggleFilerEnabled( );
1642 break; 1647 break;
1643 case Qt::Key_0: 1648 case Qt::Key_0:
1644 case Qt::Key_1: 1649 case Qt::Key_1: