-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a93d8e5..c3c4c26 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1486,133 +1486,131 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1486 | } | 1486 | } |
1487 | break; | 1487 | break; |
1488 | case Qt::Key_J: | 1488 | case Qt::Key_J: |
1489 | mView->viewManager()->showJournalView(); | 1489 | mView->viewManager()->showJournalView(); |
1490 | break; | 1490 | break; |
1491 | case Qt::Key_B: | 1491 | case Qt::Key_B: |
1492 | mView->editIncidenceDescription();; | 1492 | mView->editIncidenceDescription();; |
1493 | break; | 1493 | break; |
1494 | // case Qt::Key_Return: | 1494 | // case Qt::Key_Return: |
1495 | case Qt::Key_E: | 1495 | case Qt::Key_E: |
1496 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1496 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1497 | mView->newEvent(); | 1497 | mView->newEvent(); |
1498 | else | 1498 | else |
1499 | mView->editIncidence(); | 1499 | mView->editIncidence(); |
1500 | break; | 1500 | break; |
1501 | case Qt::Key_Plus: | 1501 | case Qt::Key_Plus: |
1502 | size = p->mHourSize +2; | 1502 | size = p->mHourSize +2; |
1503 | if ( size <= 18 ) | 1503 | if ( size <= 18 ) |
1504 | configureAgenda( size ); | 1504 | configureAgenda( size ); |
1505 | break; | 1505 | break; |
1506 | case Qt::Key_Minus: | 1506 | case Qt::Key_Minus: |
1507 | size = p->mHourSize - 2; | 1507 | size = p->mHourSize - 2; |
1508 | if ( size >= 4 ) | 1508 | if ( size >= 4 ) |
1509 | configureAgenda( size ); | 1509 | configureAgenda( size ); |
1510 | break; | 1510 | break; |
1511 | 1511 | ||
1512 | 1512 | ||
1513 | default: | 1513 | default: |
1514 | e->ignore(); | 1514 | e->ignore(); |
1515 | } | 1515 | } |
1516 | if ( pro > 0 ) { | 1516 | if ( pro > 0 ) { |
1517 | mView->selectFilter( pro-1 ); | 1517 | mView->selectFilter( pro-1 ); |
1518 | } | 1518 | } |
1519 | if ( showSelectedDates ) { | 1519 | if ( showSelectedDates ) { |
1520 | ;// setCaptionToDates(); | 1520 | ;// setCaptionToDates(); |
1521 | } | 1521 | } |
1522 | 1522 | ||
1523 | } | 1523 | } |
1524 | 1524 | ||
1525 | void MainWindow::fillFilterMenu() | 1525 | void MainWindow::fillFilterMenu() |
1526 | { | 1526 | { |
1527 | selectFilterMenu->clear(); | 1527 | selectFilterMenu->clear(); |
1528 | bool disable = false; | 1528 | bool disable = false; |
1529 | if ( mView->filterView()->filtersEnabled() ) { | 1529 | if ( mView->filterView()->filtersEnabled() ) { |
1530 | selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 0 ); | 1530 | selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 0 ); |
1531 | } | 1531 | } |
1532 | else { | 1532 | else { |
1533 | selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 0 ); | 1533 | selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 0 ); |
1534 | disable = true; | 1534 | disable = true; |
1535 | } | 1535 | } |
1536 | selectFilterMenu->insertSeparator(); | 1536 | selectFilterMenu->insertSeparator(); |
1537 | QPtrList<CalFilter> fili = mView->filters(); | 1537 | QPtrList<CalFilter> fili = mView->filters(); |
1538 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 1538 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
1539 | CalFilter *filter = fili.first(); | 1539 | CalFilter *filter = fili.first(); |
1540 | int iii = 1; | 1540 | int iii = 1; |
1541 | while(filter) { | 1541 | while(filter) { |
1542 | selectFilterMenu->insertItem( filter->name(), iii ); | 1542 | selectFilterMenu->insertItem( filter->name(), iii ); |
1543 | if ( filter == curfilter) | 1543 | if ( filter == curfilter) |
1544 | selectFilterMenu->setItemChecked( iii, true ); | 1544 | selectFilterMenu->setItemChecked( iii, true ); |
1545 | if ( disable ) | 1545 | if ( disable ) |
1546 | selectFilterMenu->setItemEnabled( iii, false ); | 1546 | selectFilterMenu->setItemEnabled( iii, false ); |
1547 | filter = fili.next(); | 1547 | filter = fili.next(); |
1548 | ++iii; | 1548 | ++iii; |
1549 | } | 1549 | } |
1550 | qDebug("rettich "); | ||
1551 | } | 1550 | } |
1552 | void MainWindow::selectFilter( int fil ) | 1551 | void MainWindow::selectFilter( int fil ) |
1553 | { | 1552 | { |
1554 | qDebug("selectFilter %d ", fil); | ||
1555 | if ( fil == 0 ) { | 1553 | if ( fil == 0 ) { |
1556 | mView->toggleFilerEnabled( ); | 1554 | mView->toggleFilerEnabled( ); |
1557 | } else { | 1555 | } else { |
1558 | mView->selectFilter( fil-1 ); | 1556 | mView->selectFilter( fil-1 ); |
1559 | } | 1557 | } |
1560 | } | 1558 | } |
1561 | void MainWindow::configureToolBar( int item ) | 1559 | void MainWindow::configureToolBar( int item ) |
1562 | { | 1560 | { |
1563 | 1561 | ||
1564 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 1562 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
1565 | KOPrefs *p = KOPrefs::instance(); | 1563 | KOPrefs *p = KOPrefs::instance(); |
1566 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 1564 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
1567 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 1565 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
1568 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 1566 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
1569 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 1567 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
1570 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 1568 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
1571 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 1569 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
1572 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 1570 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
1573 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 1571 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
1574 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 1572 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
1575 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 1573 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
1576 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 1574 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
1577 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 1575 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
1578 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 1576 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
1579 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 1577 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
1580 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 1578 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
1581 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 1579 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
1582 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 1580 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
1583 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 1581 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
1584 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 1582 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
1585 | // initActions(); | 1583 | // initActions(); |
1586 | } | 1584 | } |
1587 | 1585 | ||
1588 | void MainWindow::setCaptionToDates() | 1586 | void MainWindow::setCaptionToDates() |
1589 | { | 1587 | { |
1590 | QString selDates; | 1588 | QString selDates; |
1591 | selDates = KGlobal::locale()->formatDate(mView->startDate(), true); | 1589 | selDates = KGlobal::locale()->formatDate(mView->startDate(), true); |
1592 | if (mView->startDate() < mView->endDate() ) | 1590 | if (mView->startDate() < mView->endDate() ) |
1593 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 1591 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
1594 | setCaption( i18n("Dates: ") + selDates ); | 1592 | setCaption( i18n("Dates: ") + selDates ); |
1595 | 1593 | ||
1596 | } | 1594 | } |
1597 | // parameter item == 0: reinit | 1595 | // parameter item == 0: reinit |
1598 | void MainWindow::configureAgenda( int item ) | 1596 | void MainWindow::configureAgenda( int item ) |
1599 | { | 1597 | { |
1600 | 1598 | ||
1601 | KOPrefs *p = KOPrefs::instance(); | 1599 | KOPrefs *p = KOPrefs::instance(); |
1602 | 1600 | ||
1603 | int i; | 1601 | int i; |
1604 | if ( item == 1 ) { | 1602 | if ( item == 1 ) { |
1605 | mView->toggleAllDaySize(); | 1603 | mView->toggleAllDaySize(); |
1606 | return; | 1604 | return; |
1607 | } | 1605 | } |
1608 | // do not allow 4 for widgets higher than 480 | 1606 | // do not allow 4 for widgets higher than 480 |
1609 | // if ( QApplication::desktop()->height() > 480 ) { | 1607 | // if ( QApplication::desktop()->height() > 480 ) { |
1610 | // if ( item == 4 ) | 1608 | // if ( item == 4 ) |
1611 | // item = 6; | 1609 | // item = 6; |
1612 | // } | 1610 | // } |
1613 | for ( i = 4; i <= 18; i= i+2 ) | 1611 | for ( i = 4; i <= 18; i= i+2 ) |
1614 | configureAgendaMenu->setItemChecked( i, false ); | 1612 | configureAgendaMenu->setItemChecked( i, false ); |
1615 | configureAgendaMenu->setItemChecked( item, true ); | 1613 | configureAgendaMenu->setItemChecked( item, true ); |
1616 | if ( p->mHourSize == item ) | 1614 | if ( p->mHourSize == item ) |
1617 | return; | 1615 | return; |
1618 | p->mHourSize=item; | 1616 | p->mHourSize=item; |