-rw-r--r-- | korganizer/koagendaview.cpp | 8 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 6 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 53 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 24 |
5 files changed, 52 insertions, 41 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 05216a7..f54f7bc 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -217,6 +217,6 @@ void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) | |||
217 | if ( tSize < 4 ) | 217 | if ( tSize < 4 ) |
218 | tSize = 4; | 218 | tSize = 4; |
219 | if ( tSize > 18 ) | 219 | if ( tSize > 22 ) |
220 | tSize = 18; | 220 | tSize = 22; |
221 | tSize = (tSize-2)/2; | 221 | tSize = (tSize-2)/2; |
222 | topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); | 222 | topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); |
@@ -232,6 +232,6 @@ void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) | |||
232 | if ( tSize < 4 ) | 232 | if ( tSize < 4 ) |
233 | tSize = 4; | 233 | tSize = 4; |
234 | if ( tSize > 18 ) | 234 | if ( tSize > 22 ) |
235 | tSize = 18; | 235 | tSize = 22; |
236 | tSize = (tSize/2)*2; | 236 | tSize = (tSize/2)*2; |
237 | if ( tSize == KOPrefs::instance()->mHourSize ) | 237 | if ( tSize == KOPrefs::instance()->mHourSize ) |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index e255b83..94c459b 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -183,5 +183,5 @@ void KOViewManager::raiseCurrentView( bool fullScreen ) | |||
183 | wid -= mMainView->leftFrame()->width(); | 183 | wid -= mMainView->leftFrame()->width(); |
184 | } | 184 | } |
185 | 185 | emit signalFullScreen( !fullScreen ); | |
186 | if ( globalFlagBlockAgenda == 5 ) { | 186 | if ( globalFlagBlockAgenda == 5 ) { |
187 | globalFlagBlockAgenda = 4; | 187 | globalFlagBlockAgenda = 4; |
@@ -201,8 +201,10 @@ void KOViewManager::raiseCurrentView( bool fullScreen ) | |||
201 | mAgendaView->repaintAgenda(); | 201 | mAgendaView->repaintAgenda(); |
202 | 202 | ||
203 | } | 203 | } |
204 | globalFlagBlockAgenda = 0; | 204 | globalFlagBlockAgenda = 0; |
205 | } | 205 | } |
206 | emit signalAgendaView( mCurrentView == mAgendaView ); | ||
206 | //qDebug("raiseCurrentView ende "); | 207 | //qDebug("raiseCurrentView ende "); |
208 | |||
207 | } | 209 | } |
208 | 210 | ||
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 3c251fb..c8c7a7a 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -80,4 +80,6 @@ class KOViewManager : public QObject | |||
80 | signals: | 80 | signals: |
81 | void printWNV(); | 81 | void printWNV(); |
82 | void signalFullScreen( bool ); | ||
83 | void signalAgendaView( bool ); | ||
82 | public slots: | 84 | public slots: |
83 | void updateView(); | 85 | void updateView(); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 877b6f2..145b36c 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -546,5 +546,5 @@ void MainWindow::initActions() | |||
546 | } | 546 | } |
547 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 547 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
548 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); | 548 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
549 | 549 | ||
550 | // ****************** | 550 | // ****************** |
@@ -561,14 +561,13 @@ void MainWindow::initActions() | |||
561 | pathString += "iconsmini/"; | 561 | pathString += "iconsmini/"; |
562 | configureAgendaMenu->setCheckable( true ); | 562 | configureAgendaMenu->setCheckable( true ); |
563 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); | 563 | int iii ; |
564 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); | 564 | for ( iii = 1;iii<= 10 ;++iii ){ |
565 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); | 565 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
566 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); | 566 | } |
567 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); | ||
568 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); | ||
569 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); | ||
570 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); | ||
571 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 567 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
572 | 568 | ||
569 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | ||
570 | this, SLOT( showConfigureAgenda( ) ) ); | ||
571 | |||
573 | icon = loadPixmap( pathString + "configure" ); | 572 | icon = loadPixmap( pathString + "configure" ); |
574 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 573 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
@@ -603,4 +602,5 @@ void MainWindow::initActions() | |||
603 | connect( action, SIGNAL( activated() ), | 602 | connect( action, SIGNAL( activated() ), |
604 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 603 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
604 | mToggleNav = action ; | ||
605 | icon = loadPixmap( pathString + "filter" ); | 605 | icon = loadPixmap( pathString + "filter" ); |
606 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 606 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
@@ -608,4 +608,5 @@ void MainWindow::initActions() | |||
608 | connect( action, SIGNAL( activated() ), | 608 | connect( action, SIGNAL( activated() ), |
609 | mView, SLOT( toggleFilter() ) ); | 609 | mView, SLOT( toggleFilter() ) ); |
610 | mToggleFilter = action; | ||
610 | icon = loadPixmap( pathString + "allday" ); | 611 | icon = loadPixmap( pathString + "allday" ); |
611 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 612 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
@@ -613,4 +614,13 @@ void MainWindow::initActions() | |||
613 | connect( action, SIGNAL( activated() ), | 614 | connect( action, SIGNAL( activated() ), |
614 | mView, SLOT( toggleAllDaySize() ) ); | 615 | mView, SLOT( toggleAllDaySize() ) ); |
616 | mToggleAllday = action; | ||
617 | |||
618 | |||
619 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | ||
620 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | ||
621 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | ||
622 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); | ||
623 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | ||
624 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | ||
615 | 625 | ||
616 | viewMenu->insertSeparator(); | 626 | viewMenu->insertSeparator(); |
@@ -1721,22 +1731,17 @@ void MainWindow::setCaptionToDates() | |||
1721 | 1731 | ||
1722 | } | 1732 | } |
1723 | // parameter item == 0: reinit | 1733 | void MainWindow::showConfigureAgenda( ) |
1734 | { | ||
1735 | int iii; | ||
1736 | for ( iii = 1;iii<= 10 ;++iii ){ | ||
1737 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); | ||
1738 | } | ||
1739 | configureAgendaMenu->setItemChecked( KOPrefs::instance()->mHourSize, true ); | ||
1740 | } | ||
1724 | void MainWindow::configureAgenda( int item ) | 1741 | void MainWindow::configureAgenda( int item ) |
1725 | { | 1742 | { |
1726 | 1743 | if ( KOPrefs::instance()->mHourSize == item ) | |
1727 | KOPrefs *p = KOPrefs::instance(); | ||
1728 | |||
1729 | int i; | ||
1730 | // do not allow 4 for widgets higher than 480 | ||
1731 | // if ( QApplication::desktop()->height() > 480 ) { | ||
1732 | // if ( item == 4 ) | ||
1733 | // item = 6; | ||
1734 | // } | ||
1735 | for ( i = 4; i <= 18; i= i+2 ) | ||
1736 | configureAgendaMenu->setItemChecked( i, false ); | ||
1737 | configureAgendaMenu->setItemChecked( item, true ); | ||
1738 | if ( p->mHourSize == item ) | ||
1739 | return; | 1744 | return; |
1740 | p->mHourSize=item; | 1745 | KOPrefs::instance()->mHourSize=item; |
1741 | mView->viewManager()->agendaView()->updateConfig(); | 1746 | mView->viewManager()->agendaView()->updateConfig(); |
1742 | } | 1747 | } |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 96e627e..6de0543 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -39,12 +39,12 @@ class MainWindow : public QMainWindow | |||
39 | ~MainWindow(); | 39 | ~MainWindow(); |
40 | bool beamReceiveEnabled(); | 40 | bool beamReceiveEnabled(); |
41 | static QString defaultFileName(); | ||
42 | static QString syncFileName(); | ||
43 | static QString resourcePath(); | ||
41 | public slots: | 44 | public slots: |
42 | virtual void showMaximized (); | 45 | virtual void showMaximized (); |
43 | void configureAgenda( int ); | 46 | void configureAgenda( int ); |
44 | void recieve( const QCString& msg, const QByteArray& data ); | 47 | void recieve( const QCString& msg, const QByteArray& data ); |
45 | static QString defaultFileName(); | 48 | protected slots: |
46 | static QString syncFileName(); | ||
47 | static QString resourcePath(); | ||
48 | protected slots: | ||
49 | void setCaptionToDates(); | 49 | void setCaptionToDates(); |
50 | void about(); | 50 | void about(); |
@@ -85,16 +85,13 @@ class MainWindow : public QMainWindow | |||
85 | void disableBR(bool); | 85 | void disableBR(bool); |
86 | 86 | ||
87 | private slots: | ||
88 | void showConfigureAgenda(); | ||
89 | void getFile( bool ); | ||
90 | void syncFileRequest(); | ||
87 | 91 | ||
88 | protected: | 92 | protected: |
89 | void displayText( QString, QString); | 93 | void displayText( QString, QString); |
90 | |||
91 | void enableIncidenceActions( bool ); | 94 | void enableIncidenceActions( bool ); |
92 | 95 | ||
93 | private slots: | ||
94 | QSocket* piSocket; | ||
95 | QString piFileString; | ||
96 | QTime piTime; | ||
97 | void getFile( bool ); | ||
98 | void syncFileRequest(); | ||
99 | private: | 96 | private: |
100 | bool mBRdisabled; | 97 | bool mBRdisabled; |
@@ -128,4 +125,9 @@ class MainWindow : public QMainWindow | |||
128 | QAction *mCancelAction; | 125 | QAction *mCancelAction; |
129 | 126 | ||
127 | QAction *mToggleNav; | ||
128 | QAction *mToggleFilter; | ||
129 | QAction *mToggleAllday; | ||
130 | |||
131 | |||
130 | void closeEvent( QCloseEvent* ce ); | 132 | void closeEvent( QCloseEvent* ce ); |
131 | SimpleAlarmClient mAlarmClient; | 133 | SimpleAlarmClient mAlarmClient; |