-rw-r--r-- | korganizer/mainwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7a4275b..ca0d542 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1678,98 +1678,102 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1678 | case Qt::Key_0: | 1678 | case Qt::Key_0: |
1679 | case Qt::Key_1: | 1679 | case Qt::Key_1: |
1680 | case Qt::Key_2: | 1680 | case Qt::Key_2: |
1681 | case Qt::Key_3: | 1681 | case Qt::Key_3: |
1682 | case Qt::Key_4: | 1682 | case Qt::Key_4: |
1683 | case Qt::Key_5: | 1683 | case Qt::Key_5: |
1684 | case Qt::Key_6: | 1684 | case Qt::Key_6: |
1685 | case Qt::Key_7: | 1685 | case Qt::Key_7: |
1686 | case Qt::Key_8: | 1686 | case Qt::Key_8: |
1687 | case Qt::Key_9: | 1687 | case Qt::Key_9: |
1688 | pro = e->key()-48; | 1688 | pro = e->key()-48; |
1689 | if ( pro == 0 ) | 1689 | if ( pro == 0 ) |
1690 | pro = 10; | 1690 | pro = 10; |
1691 | if ( e->state() == Qt::ControlButton) | 1691 | if ( e->state() == Qt::ControlButton) |
1692 | pro += 10; | 1692 | pro += 10; |
1693 | break; | 1693 | break; |
1694 | case Qt::Key_M: | 1694 | case Qt::Key_M: |
1695 | mView->viewManager()->showMonthView(); | 1695 | mView->viewManager()->showMonthView(); |
1696 | showSelectedDates = true; | 1696 | showSelectedDates = true; |
1697 | break; | 1697 | break; |
1698 | case Qt::Key_Insert: | 1698 | case Qt::Key_Insert: |
1699 | mView->newEvent(); | 1699 | mView->newEvent(); |
1700 | break; | 1700 | break; |
1701 | case Qt::Key_S : | 1701 | case Qt::Key_S : |
1702 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1702 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1703 | mView->newSubTodo(); | 1703 | mView->newSubTodo(); |
1704 | else | 1704 | else |
1705 | mView->dialogManager()->showSearchDialog(); | 1705 | mView->dialogManager()->showSearchDialog(); |
1706 | break; | 1706 | break; |
1707 | case Qt::Key_Y : | 1707 | case Qt::Key_Y : |
1708 | case Qt::Key_Z : | 1708 | case Qt::Key_Z : |
1709 | mView->viewManager()->showWorkWeekView(); | 1709 | mView->viewManager()->showWorkWeekView(); |
1710 | showSelectedDates = true; | 1710 | showSelectedDates = true; |
1711 | break; | 1711 | break; |
1712 | case Qt::Key_U : | 1712 | case Qt::Key_U : |
1713 | mView->viewManager()->showWeekView(); | 1713 | mView->viewManager()->showWeekView(); |
1714 | showSelectedDates = true; | 1714 | showSelectedDates = true; |
1715 | break; | 1715 | break; |
1716 | case Qt::Key_H : | 1716 | case Qt::Key_H : |
1717 | keyBindings(); | 1717 | keyBindings(); |
1718 | break; | 1718 | break; |
1719 | case Qt::Key_W: | 1719 | case Qt::Key_W: |
1720 | mView->viewManager()->showWhatsNextView(); | 1720 | mView->viewManager()->showWhatsNextView(); |
1721 | break; | 1721 | break; |
1722 | case Qt::Key_L: | 1722 | case Qt::Key_L: |
1723 | mView->viewManager()->showListView(); | 1723 | mView->viewManager()->showListView(); |
1724 | break; | 1724 | break; |
1725 | case Qt::Key_N: | 1725 | case Qt::Key_N: |
1726 | mView->viewManager()->showNextXView(); | 1726 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1727 | showSelectedDates = true; | 1727 | mView->viewManager()->showNextView(); |
1728 | else { | ||
1729 | mView->viewManager()->showNextXView(); | ||
1730 | showSelectedDates = true; | ||
1731 | } | ||
1728 | break; | 1732 | break; |
1729 | case Qt::Key_V: | 1733 | case Qt::Key_V: |
1730 | mView->viewManager()->showTodoView(); | 1734 | mView->viewManager()->showTodoView(); |
1731 | break; | 1735 | break; |
1732 | case Qt::Key_C: | 1736 | case Qt::Key_C: |
1733 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1737 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1734 | break; | 1738 | break; |
1735 | case Qt::Key_P: | 1739 | case Qt::Key_P: |
1736 | mView->showDatePicker( ); | 1740 | mView->showDatePicker( ); |
1737 | break; | 1741 | break; |
1738 | case Qt::Key_F: | 1742 | case Qt::Key_F: |
1739 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1743 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1740 | mView->editFilters(); | 1744 | mView->editFilters(); |
1741 | else | 1745 | else |
1742 | mView->toggleFilter(); | 1746 | mView->toggleFilter(); |
1743 | break; | 1747 | break; |
1744 | case Qt::Key_X: | 1748 | case Qt::Key_X: |
1745 | mView->toggleDateNavigatorWidget(); | 1749 | mView->toggleDateNavigatorWidget(); |
1746 | break; | 1750 | break; |
1747 | case Qt::Key_Space: | 1751 | case Qt::Key_Space: |
1748 | mView->toggleExpand(); | 1752 | mView->toggleExpand(); |
1749 | break; | 1753 | break; |
1750 | case Qt::Key_A: | 1754 | case Qt::Key_A: |
1751 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) | 1755 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) |
1752 | mView->showNextAlarms(); | 1756 | mView->showNextAlarms(); |
1753 | else | 1757 | else |
1754 | mView->toggleAllDaySize(); | 1758 | mView->toggleAllDaySize(); |
1755 | break; | 1759 | break; |
1756 | case Qt::Key_T: | 1760 | case Qt::Key_T: |
1757 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1761 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1758 | mView->newTodo(); | 1762 | mView->newTodo(); |
1759 | else { | 1763 | else { |
1760 | mView->goToday(); | 1764 | mView->goToday(); |
1761 | showSelectedDates = true; | 1765 | showSelectedDates = true; |
1762 | } | 1766 | } |
1763 | break; | 1767 | break; |
1764 | case Qt::Key_J: | 1768 | case Qt::Key_J: |
1765 | mView->viewManager()->showJournalView(); | 1769 | mView->viewManager()->showJournalView(); |
1766 | break; | 1770 | break; |
1767 | case Qt::Key_B: | 1771 | case Qt::Key_B: |
1768 | mView->editIncidenceDescription();; | 1772 | mView->editIncidenceDescription();; |
1769 | break; | 1773 | break; |
1770 | // case Qt::Key_Return: | 1774 | // case Qt::Key_Return: |
1771 | case Qt::Key_E: | 1775 | case Qt::Key_E: |
1772 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1776 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1773 | mView->newEvent(); | 1777 | mView->newEvent(); |
1774 | else | 1778 | else |
1775 | mView->editIncidence(); | 1779 | mView->editIncidence(); |