-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 8 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 59 | ||||
-rw-r--r-- | korganizer/koagenda.h | 1 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 3 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 50 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 1 |
8 files changed, 93 insertions, 31 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 6a20868..8572bf9 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1194,8 +1194,12 @@ | |||
1194 | { " (%1 y.)"," (%1 J.)" }, | 1194 | { " (%1 y.)"," (%1 J.)" }, |
1195 | { "Allday:","Ganztägig:" }, | 1195 | { "Allday:","Ganztägig:" }, |
1196 | { "compl.todos","erled.Todos" }, | 1196 | { "compl.todos","erled.Todos" }, |
1197 | { "","" }, | 1197 | { "Day view","Tagesansicht" }, |
1198 | { "","" }, | 1198 | { "Next days","Nächste Tage" }, |
1199 | { "Next week","Nächste Woche" }, | ||
1200 | { "Next two weeks","Nächste zwei Wochen" }, | ||
1201 | { "Next month","Nächster Monat" }, | ||
1202 | { "Journal view","Journal" }, | ||
1199 | { "","" }, | 1203 | { "","" }, |
1200 | { "","" }, | 1204 | { "","" }, |
1201 | { "","" }, | 1205 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 035d630..e7b6755 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2689,7 +2689,6 @@ void CalendarView::todoDeleted() | |||
2689 | 2689 | ||
2690 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) | 2690 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) |
2691 | { | 2691 | { |
2692 | qDebug("datetime "); | ||
2693 | showTodoEditor(); | 2692 | showTodoEditor(); |
2694 | mTodoEditor->newTodo(dt,0,allday); | 2693 | mTodoEditor->newTodo(dt,0,allday); |
2695 | if ( mFilterView->filtersEnabled() ) { | 2694 | if ( mFilterView->filtersEnabled() ) { |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 73ee5cb..0eeacb3 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -168,17 +168,7 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, | |||
168 | const char *name,WFlags f) : | 168 | const char *name,WFlags f) : |
169 | QScrollView(parent,name,f) | 169 | QScrollView(parent,name,f) |
170 | { | 170 | { |
171 | mNewItemPopup = new QPopupMenu( this ); | 171 | |
172 | connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); | ||
173 | QString pathString = ""; | ||
174 | if ( !KOPrefs::instance()->mToolBarMiniIcons ) { | ||
175 | if ( QApplication::desktop()->width() < 480 ) | ||
176 | pathString += "icons16/"; | ||
177 | } else | ||
178 | pathString += "iconsmini/"; | ||
179 | |||
180 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); | ||
181 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); | ||
182 | 172 | ||
183 | mColumns = columns; | 173 | mColumns = columns; |
184 | mRows = rows; | 174 | mRows = rows; |
@@ -198,16 +188,6 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, | |||
198 | KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : | 188 | KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : |
199 | QScrollView(parent,name,f) | 189 | QScrollView(parent,name,f) |
200 | { | 190 | { |
201 | mNewItemPopup = new QPopupMenu( this ); | ||
202 | connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); | ||
203 | QString pathString = ""; | ||
204 | if ( !KOPrefs::instance()->mToolBarMiniIcons ) { | ||
205 | if ( QApplication::desktop()->width() < 480 ) | ||
206 | pathString += "icons16/"; | ||
207 | } else | ||
208 | pathString += "iconsmini/"; | ||
209 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."),1 ); | ||
210 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); | ||
211 | blockResize = false; | 191 | blockResize = false; |
212 | mColumns = columns; | 192 | mColumns = columns; |
213 | mRows = 1; | 193 | mRows = 1; |
@@ -241,7 +221,25 @@ QDate KOAgenda::selectedIncidenceDate() const | |||
241 | 221 | ||
242 | 222 | ||
243 | void KOAgenda::init() | 223 | void KOAgenda::init() |
244 | { | 224 | { |
225 | mNewItemPopup = new QPopupMenu( this ); | ||
226 | connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); | ||
227 | QString pathString = ""; | ||
228 | if ( !KOPrefs::instance()->mToolBarMiniIcons ) { | ||
229 | if ( QApplication::desktop()->width() < 480 ) | ||
230 | pathString += "icons16/"; | ||
231 | } else | ||
232 | pathString += "iconsmini/"; | ||
233 | |||
234 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); | ||
235 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); | ||
236 | mNewItemPopup->insertSeparator ( ); | ||
237 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); | ||
238 | mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); | ||
239 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); | ||
240 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); | ||
241 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next month"),6 ); | ||
242 | mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); | ||
245 | #ifndef _WIN32_ | 243 | #ifndef _WIN32_ |
246 | int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase | 244 | int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase |
247 | viewport()->setWFlags ( wflags); | 245 | viewport()->setWFlags ( wflags); |
@@ -562,13 +560,20 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
562 | 560 | ||
563 | void KOAgenda::newItem( int item ) | 561 | void KOAgenda::newItem( int item ) |
564 | { | 562 | { |
565 | qDebug("new %d ", item); | ||
566 | if ( item == 1 ) { //new event | 563 | if ( item == 1 ) { //new event |
567 | newEventSignal(mStartCellX ,mStartCellY ); | 564 | newEventSignal(mStartCellX ,mStartCellY ); |
568 | } | 565 | } else |
569 | if ( item == 2 ) { //new event | 566 | if ( item == 2 ) { //new event |
570 | newTodoSignal(mStartCellX ,mStartCellY ); | 567 | newTodoSignal(mStartCellX ,mStartCellY ); |
571 | } | 568 | } else |
569 | { | ||
570 | QDate day = mSelectedDates[mStartCellX]; | ||
571 | emit showDateView( item, day ); | ||
572 | // 3Day view | ||
573 | // 4Week view | ||
574 | // 5Month view | ||
575 | // 6Journal view | ||
576 | } | ||
572 | } | 577 | } |
573 | void KOAgenda::startSelectAction(QPoint viewportPos) | 578 | void KOAgenda::startSelectAction(QPoint viewportPos) |
574 | { | 579 | { |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 12943d7..2069b22 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -144,6 +144,7 @@ class KOAgenda : public QScrollView | |||
144 | void finishResize(); | 144 | void finishResize(); |
145 | 145 | ||
146 | signals: | 146 | signals: |
147 | void showDateView( int, QDate ); | ||
147 | void newEventSignal(); | 148 | void newEventSignal(); |
148 | void newEventSignal(int gx,int gy); | 149 | void newEventSignal(int gx,int gy); |
149 | void newTodoSignal(int gx,int gy); | 150 | void newTodoSignal(int gx,int gy); |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 60ae41f..e0a1a21 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -485,6 +485,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
485 | connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), | 485 | connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), |
486 | SLOT(setContentsPos(int))); | 486 | SLOT(setContentsPos(int))); |
487 | 487 | ||
488 | connect(mAgenda,SIGNAL(showDateView( int, QDate )),SIGNAL(showDateView( int, QDate ))); | ||
489 | connect(mAllDayAgenda,SIGNAL(showDateView( int, QDate )),SIGNAL(showDateView( int, QDate ))); | ||
490 | |||
488 | // Create/Show/Edit/Delete Event | 491 | // Create/Show/Edit/Delete Event |
489 | connect(mAgenda,SIGNAL(newEventSignal(int,int)), | 492 | connect(mAgenda,SIGNAL(newEventSignal(int,int)), |
490 | SLOT(newEvent(int,int))); | 493 | SLOT(newEvent(int,int))); |
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 01d74a1..7774fbe 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -182,6 +182,7 @@ class KOAgendaView : public KOEventView { | |||
182 | void addToCalSlot(Incidence *, Incidence *); | 182 | void addToCalSlot(Incidence *, Incidence *); |
183 | 183 | ||
184 | signals: | 184 | signals: |
185 | void showDateView( int, QDate ); | ||
185 | void newTodoSignal( QDateTime ,bool ); | 186 | void newTodoSignal( QDateTime ,bool ); |
186 | void toggleExpand(); | 187 | void toggleExpand(); |
187 | void todoMoved( Todo *, int ); | 188 | void todoMoved( Todo *, int ); |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index a88276e..6da4799 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -98,6 +98,54 @@ void KOViewManager::readSettings(KConfig *config) | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | |||
102 | void KOViewManager::showDateView( int view, QDate date) | ||
103 | { | ||
104 | |||
105 | qDebug("date %d %s", view, date.toString().latin1()); | ||
106 | #if 0 | ||
107 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); | ||
108 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); | ||
109 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); | ||
110 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 ); | ||
111 | mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); | ||
112 | #endif | ||
113 | if ( view == 3 ) { | ||
114 | mMainView->showDay( date ); | ||
115 | } else if (view == 4 ) { | ||
116 | mMainView->dateNavigator()->selectDates( date, 7 ); | ||
117 | } else if (view == 5 ) { | ||
118 | mMainView->dateNavigator()->selectDates( date, 14); | ||
119 | } else if (view == 6 ) { | ||
120 | showMonthView(); | ||
121 | mMainView->dateNavigator()->selectMonthByDate( date ); | ||
122 | mMainView->dateNavigator()->selectDate( date ); | ||
123 | } else if (view == 7 ) { | ||
124 | mMainView->dateNavigator()->selectDate( date ); | ||
125 | showJournalView(); | ||
126 | } else if (view == 8 ) { | ||
127 | globalFlagBlockAgenda = 1; | ||
128 | if ( mCurrentAgendaView != 3 ) | ||
129 | mCurrentAgendaView = -1; | ||
130 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | ||
131 | globalFlagBlockAgenda = 2; | ||
132 | mMainView->dateNavigator()->selectDates( date , | ||
133 | KOPrefs::instance()->mNextXDays ); | ||
134 | mFlagShowNextxDays = true; | ||
135 | mCurrentAgendaView = 3 ; | ||
136 | } | ||
137 | |||
138 | #if 0 | ||
139 | dateNavigator()->blockSignals( true ); | ||
140 | dateNavigator()->selectDate( d ); | ||
141 | dateNavigator()->blockSignals( false ); | ||
142 | mViewManager->showDayView(); | ||
143 | #endif | ||
144 | |||
145 | } | ||
146 | |||
147 | |||
148 | |||
101 | void KOViewManager::writeSettings(KConfig *config) | 149 | void KOViewManager::writeSettings(KConfig *config) |
102 | { | 150 | { |
103 | config->setGroup("General"); | 151 | config->setGroup("General"); |
@@ -308,7 +356,7 @@ void KOViewManager::showAgendaView( bool fullScreen ) | |||
308 | 356 | ||
309 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW | 357 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW |
310 | 358 | ||
311 | 359 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); | |
312 | 360 | ||
313 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), | 361 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), |
314 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); | 362 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index c8c7a7a..137eb2d 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -82,6 +82,7 @@ class KOViewManager : public QObject | |||
82 | void signalFullScreen( bool ); | 82 | void signalFullScreen( bool ); |
83 | void signalAgendaView( bool ); | 83 | void signalAgendaView( bool ); |
84 | public slots: | 84 | public slots: |
85 | void showDateView( int, QDate ); | ||
85 | void updateView(); | 86 | void updateView(); |
86 | void showWhatsNextView(); | 87 | void showWhatsNextView(); |
87 | void showListView(); | 88 | void showListView(); |