author | zautrix <zautrix> | 2005-01-29 16:41:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-29 16:41:15 (UTC) |
commit | 41baa2e15a1ec5e14750297e0a21020c9e53d953 (patch) (unidiff) | |
tree | 2a1a1ae20928d4f2dc3ac73e9be82f04563b3604 | |
parent | c6548bb194a5e73b9b72505c2e952ef6346dec46 (diff) | |
download | kdepimpi-41baa2e15a1ec5e14750297e0a21020c9e53d953.zip kdepimpi-41baa2e15a1ec5e14750297e0a21020c9e53d953.tar.gz kdepimpi-41baa2e15a1ec5e14750297e0a21020c9e53d953.tar.bz2 |
fix
-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 | |||
@@ -1181,21 +1181,25 @@ | |||
1181 | { "events","Termine" }, | 1181 | { "events","Termine" }, |
1182 | { "todos","Todos" }, | 1182 | { "todos","Todos" }, |
1183 | { "journals","Journale" }, | 1183 | { "journals","Journale" }, |
1184 | { "public","öffentl." }, | 1184 | { "public","öffentl." }, |
1185 | { "private","privat" }, | 1185 | { "private","privat" }, |
1186 | { "confidential","vertraul." }, | 1186 | { "confidential","vertraul." }, |
1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1187 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1188 | { "Yesterday","Gestern" }, | 1188 | { "Yesterday","Gestern" }, |
1189 | { "Day after tomorrow","Übermorgen" }, | 1189 | { "Day after tomorrow","Übermorgen" }, |
1190 | { "Tomorrow","Morgen" }, | 1190 | { "Tomorrow","Morgen" }, |
1191 | { "Day before yesterday","Vorgestern" }, | 1191 | { "Day before yesterday","Vorgestern" }, |
1192 | { "Size %1","Größe %1" }, | 1192 | { "Size %1","Größe %1" }, |
1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1193 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
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 | |||
@@ -2676,33 +2676,32 @@ void CalendarView::todoChanged(Todo * t) | |||
2676 | // updateTodoViews(); | 2676 | // updateTodoViews(); |
2677 | } | 2677 | } |
2678 | void CalendarView::todoToBeDeleted(Todo *) | 2678 | void CalendarView::todoToBeDeleted(Todo *) |
2679 | { | 2679 | { |
2680 | //qDebug("todoToBeDeleted(Todo *) "); | 2680 | //qDebug("todoToBeDeleted(Todo *) "); |
2681 | updateTodoViews(); | 2681 | updateTodoViews(); |
2682 | } | 2682 | } |
2683 | void CalendarView::todoDeleted() | 2683 | void CalendarView::todoDeleted() |
2684 | { | 2684 | { |
2685 | //qDebug(" todoDeleted()"); | 2685 | //qDebug(" todoDeleted()"); |
2686 | updateTodoViews(); | 2686 | updateTodoViews(); |
2687 | } | 2687 | } |
2688 | 2688 | ||
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() ) { |
2696 | CalFilter *filter = mFilterView->selectedFilter(); | 2695 | CalFilter *filter = mFilterView->selectedFilter(); |
2697 | if (filter && filter->showCategories()) { | 2696 | if (filter && filter->showCategories()) { |
2698 | mTodoEditor->setCategories(filter->categoryList().join(",") ); | 2697 | mTodoEditor->setCategories(filter->categoryList().join(",") ); |
2699 | } | 2698 | } |
2700 | if ( filter ) | 2699 | if ( filter ) |
2701 | mTodoEditor->setSecrecy( filter->getSecrecy() ); | 2700 | mTodoEditor->setSecrecy( filter->getSecrecy() ); |
2702 | } | 2701 | } |
2703 | } | 2702 | } |
2704 | 2703 | ||
2705 | void CalendarView::newTodo() | 2704 | void CalendarView::newTodo() |
2706 | { | 2705 | { |
2707 | newTodoDateTime( QDateTime(),true ); | 2706 | newTodoDateTime( QDateTime(),true ); |
2708 | } | 2707 | } |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 73ee5cb..0eeacb3 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -155,72 +155,52 @@ void MarcusBains::updateLocation(bool recalculate) | |||
155 | mTimeBox->raise(); | 155 | mTimeBox->raise(); |
156 | //mTimeBox->setAutoMask(true); | 156 | //mTimeBox->setAutoMask(true); |
157 | minutes->start(5000,true); | 157 | minutes->start(5000,true); |
158 | } | 158 | } |
159 | 159 | ||
160 | 160 | ||
161 | //////////////////////////////////////////////////////////////////////////// | 161 | //////////////////////////////////////////////////////////////////////////// |
162 | 162 | ||
163 | 163 | ||
164 | /* | 164 | /* |
165 | Create an agenda widget with rows rows and columns columns. | 165 | Create an agenda widget with rows rows and columns columns. |
166 | */ | 166 | */ |
167 | KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, | 167 | 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; |
185 | mGridSpacingY = rowSize; | 175 | mGridSpacingY = rowSize; |
186 | mAllDayMode = false; | 176 | mAllDayMode = false; |
187 | #ifndef DESKTOP_VERSION | 177 | #ifndef DESKTOP_VERSION |
188 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 178 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
189 | #endif | 179 | #endif |
190 | mHolidayMask = 0; | 180 | mHolidayMask = 0; |
191 | init(); | 181 | init(); |
192 | } | 182 | } |
193 | 183 | ||
194 | /* | 184 | /* |
195 | Create an agenda widget with columns columns and one row. This is used for | 185 | Create an agenda widget with columns columns and one row. This is used for |
196 | all-day events. | 186 | all-day events. |
197 | */ | 187 | */ |
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; |
214 | //qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize); | 194 | //qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize); |
215 | mGridSpacingY = KOPrefs::instance()->mAllDaySize; | 195 | mGridSpacingY = KOPrefs::instance()->mAllDaySize; |
216 | mAllDayMode = true; | 196 | mAllDayMode = true; |
217 | #ifndef DESKTOP_VERSION | 197 | #ifndef DESKTOP_VERSION |
218 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 198 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
219 | #endif | 199 | #endif |
220 | mHolidayMask = 0; | 200 | mHolidayMask = 0; |
221 | init(); | 201 | init(); |
222 | } | 202 | } |
223 | 203 | ||
224 | 204 | ||
225 | KOAgenda::~KOAgenda() | 205 | KOAgenda::~KOAgenda() |
226 | { | 206 | { |
@@ -228,33 +208,51 @@ KOAgenda::~KOAgenda() | |||
228 | 208 | ||
229 | } | 209 | } |
230 | 210 | ||
231 | Incidence *KOAgenda::selectedIncidence() const | 211 | Incidence *KOAgenda::selectedIncidence() const |
232 | { | 212 | { |
233 | return (mSelectedItem ? mSelectedItem->incidence() : 0); | 213 | return (mSelectedItem ? mSelectedItem->incidence() : 0); |
234 | } | 214 | } |
235 | 215 | ||
236 | 216 | ||
237 | QDate KOAgenda::selectedIncidenceDate() const | 217 | QDate KOAgenda::selectedIncidenceDate() const |
238 | { | 218 | { |
239 | return (mSelectedItem ? mSelectedItem->itemDate() : QDate()); | 219 | return (mSelectedItem ? mSelectedItem->itemDate() : QDate()); |
240 | } | 220 | } |
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); |
248 | #endif | 246 | #endif |
249 | mGridSpacingX = 80; | 247 | mGridSpacingX = 80; |
250 | mResizeBorderWidth = 8; | 248 | mResizeBorderWidth = 8; |
251 | mScrollBorderWidth = 8; | 249 | mScrollBorderWidth = 8; |
252 | mScrollDelay = 30; | 250 | mScrollDelay = 30; |
253 | mScrollOffset = 10; | 251 | mScrollOffset = 10; |
254 | mPaintPixmap.resize( 20,20); | 252 | mPaintPixmap.resize( 20,20); |
255 | //enableClipper(true); | 253 | //enableClipper(true); |
256 | 254 | ||
257 | // Grab key strokes for keyboard navigation of agenda. Seems to have no | 255 | // Grab key strokes for keyboard navigation of agenda. Seems to have no |
258 | // effect. Has to be fixed. | 256 | // effect. Has to be fixed. |
259 | setFocusPolicy(WheelFocus); | 257 | setFocusPolicy(WheelFocus); |
260 | 258 | ||
@@ -549,39 +547,46 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
549 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 547 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
550 | emit editIncidenceSignal(doubleClickedItem->incidence()); | 548 | emit editIncidenceSignal(doubleClickedItem->incidence()); |
551 | else | 549 | else |
552 | emit showIncidenceSignal(doubleClickedItem->incidence()); | 550 | emit showIncidenceSignal(doubleClickedItem->incidence()); |
553 | } | 551 | } |
554 | break; | 552 | break; |
555 | 553 | ||
556 | default: | 554 | default: |
557 | break; | 555 | break; |
558 | } | 556 | } |
559 | 557 | ||
560 | return true; | 558 | return true; |
561 | } | 559 | } |
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 | { |
575 | //emit newStartSelectSignal(); | 580 | //emit newStartSelectSignal(); |
576 | 581 | ||
577 | mActionType = SELECT; | 582 | mActionType = SELECT; |
578 | 583 | ||
579 | int x,y; | 584 | int x,y; |
580 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 585 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
581 | int gx,gy; | 586 | int gx,gy; |
582 | contentsToGrid(x,y,gx,gy); | 587 | contentsToGrid(x,y,gx,gy); |
583 | 588 | ||
584 | mStartCellX = gx; | 589 | mStartCellX = gx; |
585 | mStartCellY = gy; | 590 | mStartCellY = gy; |
586 | mCurrentCellX = gx; | 591 | mCurrentCellX = gx; |
587 | mCurrentCellY = gy; | 592 | mCurrentCellY = gy; |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 12943d7..2069b22 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -131,32 +131,33 @@ class KOAgenda : public QScrollView | |||
131 | void scrollUp(); | 131 | void scrollUp(); |
132 | void scrollDown(); | 132 | void scrollDown(); |
133 | void updateTodo( Todo * t, int , bool ); | 133 | void updateTodo( Todo * t, int , bool ); |
134 | void popupAlarm(); | 134 | void popupAlarm(); |
135 | 135 | ||
136 | void checkScrollBoundaries(int); | 136 | void checkScrollBoundaries(int); |
137 | 137 | ||
138 | /** Deselect selected items. This function does not emit any signals. */ | 138 | /** Deselect selected items. This function does not emit any signals. */ |
139 | void deselectItem(); | 139 | void deselectItem(); |
140 | /** Select item. If the argument is 0, the currently selected item gets | 140 | /** Select item. If the argument is 0, the currently selected item gets |
141 | deselected. This function emits the itemSelected(bool) signal to inform | 141 | deselected. This function emits the itemSelected(bool) signal to inform |
142 | about selection/deseelction of events. */ | 142 | about selection/deseelction of events. */ |
143 | void selectItem(KOAgendaItem *); | 143 | void selectItem(KOAgendaItem *); |
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); |
150 | void newEventSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); | 151 | void newEventSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); |
151 | void newTimeSpanSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); | 152 | void newTimeSpanSignal(int gxStart, int gyStart, int gxEnd, int gyEnd); |
152 | void newStartSelectSignal(); | 153 | void newStartSelectSignal(); |
153 | void showIncidenceSignal(Incidence *); | 154 | void showIncidenceSignal(Incidence *); |
154 | void editIncidenceSignal(Incidence *); | 155 | void editIncidenceSignal(Incidence *); |
155 | void deleteIncidenceSignal(Incidence *); | 156 | void deleteIncidenceSignal(Incidence *); |
156 | void showIncidencePopupSignal(Incidence *); | 157 | void showIncidencePopupSignal(Incidence *); |
157 | 158 | ||
158 | void itemModified(KOAgendaItem *item, int ); | 159 | void itemModified(KOAgendaItem *item, int ); |
159 | void incidenceSelected(Incidence *); | 160 | void incidenceSelected(Incidence *); |
160 | 161 | ||
161 | void lowerYChanged(int); | 162 | void lowerYChanged(int); |
162 | void upperYChanged(int); | 163 | void upperYChanged(int); |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 60ae41f..e0a1a21 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -472,32 +472,35 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
472 | // Update widgets to reflect user preferences | 472 | // Update widgets to reflect user preferences |
473 | // updateConfig(); | 473 | // updateConfig(); |
474 | 474 | ||
475 | // createDayLabels(); | 475 | // createDayLabels(); |
476 | 476 | ||
477 | // these blank widgets make the All Day Event box line up with the agenda | 477 | // these blank widgets make the All Day Event box line up with the agenda |
478 | dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); | 478 | dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); |
479 | dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); | 479 | dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); |
480 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); | 480 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); |
481 | 481 | ||
482 | // Scrolling | 482 | // Scrolling |
483 | connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), | 483 | connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), |
484 | mTimeLabels, SLOT(positionChanged())); | 484 | mTimeLabels, SLOT(positionChanged())); |
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))); |
491 | connect(mAgenda,SIGNAL(newTodoSignal(int,int)), | 494 | connect(mAgenda,SIGNAL(newTodoSignal(int,int)), |
492 | SLOT(newTodo(int,int))); | 495 | SLOT(newTodo(int,int))); |
493 | connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), | 496 | connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), |
494 | SLOT(newEvent(int,int,int,int))); | 497 | SLOT(newEvent(int,int,int,int))); |
495 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), | 498 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), |
496 | SLOT(newEventAllDay(int,int))); | 499 | SLOT(newEventAllDay(int,int))); |
497 | connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)), | 500 | connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)), |
498 | SLOT(newTodoAllDay(int,int))); | 501 | SLOT(newTodoAllDay(int,int))); |
499 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), | 502 | connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), |
500 | SLOT(newEventAllDay(int,int))); | 503 | SLOT(newEventAllDay(int,int))); |
501 | connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), | 504 | connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), |
502 | SLOT(newTimeSpanSelected(int,int,int,int))); | 505 | SLOT(newTimeSpanSelected(int,int,int,int))); |
503 | connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), | 506 | connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), |
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 01d74a1..7774fbe 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -169,32 +169,33 @@ class KOAgendaView : public KOEventView { | |||
169 | void newTodoAllDay(int gx, int gy); | 169 | void newTodoAllDay(int gx, int gy); |
170 | 170 | ||
171 | void startDrag(Event *); | 171 | void startDrag(Event *); |
172 | 172 | ||
173 | void readSettings(); | 173 | void readSettings(); |
174 | void readSettings(KConfig *); | 174 | void readSettings(KConfig *); |
175 | void writeSettings(KConfig *); | 175 | void writeSettings(KConfig *); |
176 | 176 | ||
177 | void setContentsPos(int y); | 177 | void setContentsPos(int y); |
178 | 178 | ||
179 | void setExpandedButton( bool expanded ); | 179 | void setExpandedButton( bool expanded ); |
180 | void scrollOneHourUp(); | 180 | void scrollOneHourUp(); |
181 | void scrollOneHourDown(); | 181 | void scrollOneHourDown(); |
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 ); |
188 | void incidenceChanged(Incidence * , int ); | 189 | void incidenceChanged(Incidence * , int ); |
189 | // void cloneIncidenceSignal(Incidence *); | 190 | // void cloneIncidenceSignal(Incidence *); |
190 | 191 | ||
191 | protected: | 192 | protected: |
192 | bool mBlockUpdating; | 193 | bool mBlockUpdating; |
193 | int mUpcomingWidth; | 194 | int mUpcomingWidth; |
194 | /** Fill agenda beginning with date startDate */ | 195 | /** Fill agenda beginning with date startDate */ |
195 | void fillAgenda(const QDate &startDate); | 196 | void fillAgenda(const QDate &startDate); |
196 | void resizeEvent( QResizeEvent* e ); | 197 | void resizeEvent( QResizeEvent* e ); |
197 | /** Fill agenda using the current set value for the start date */ | 198 | /** Fill agenda using the current set value for the start date */ |
198 | void fillAgenda(); | 199 | void fillAgenda(); |
199 | 200 | ||
200 | /** Create labels for the selected dates. */ | 201 | /** Create labels for the selected dates. */ |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index a88276e..6da4799 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -85,32 +85,80 @@ KOrg::BaseView *KOViewManager::currentView() | |||
85 | 85 | ||
86 | void KOViewManager::readSettings(KConfig *config) | 86 | void KOViewManager::readSettings(KConfig *config) |
87 | { | 87 | { |
88 | config->setGroup("General"); | 88 | config->setGroup("General"); |
89 | QString view = config->readEntry("Current View"); | 89 | QString view = config->readEntry("Current View"); |
90 | if (view == "WhatsNext") showWhatsNextView(); | 90 | if (view == "WhatsNext") showWhatsNextView(); |
91 | else if (view == "Month") showMonthView(); | 91 | else if (view == "Month") showMonthView(); |
92 | else if (view == "List") showListView(); | 92 | else if (view == "List") showListView(); |
93 | else if (view == "Journal") showJournalView(); | 93 | else if (view == "Journal") showJournalView(); |
94 | else if (view == "TimeSpan") showTimeSpanView(); | 94 | else if (view == "TimeSpan") showTimeSpanView(); |
95 | else if (view == "Todo") showTodoView(); | 95 | else if (view == "Todo") showTodoView(); |
96 | else { | 96 | else { |
97 | showAgendaView(); | 97 | showAgendaView(); |
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"); |
104 | 152 | ||
105 | QString view; | 153 | QString view; |
106 | if (mCurrentView == mWhatsNextView) view = "WhatsNext"; | 154 | if (mCurrentView == mWhatsNextView) view = "WhatsNext"; |
107 | else if (mCurrentView == mMonthView) view = "Month"; | 155 | else if (mCurrentView == mMonthView) view = "Month"; |
108 | else if (mCurrentView == mListView) view = "List"; | 156 | else if (mCurrentView == mListView) view = "List"; |
109 | else if (mCurrentView == mJournalView) view = "Journal"; | 157 | else if (mCurrentView == mJournalView) view = "Journal"; |
110 | else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; | 158 | else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; |
111 | else if (mCurrentView == mTodoView) view = "Todo"; | 159 | else if (mCurrentView == mTodoView) view = "Todo"; |
112 | else view = "Agenda"; | 160 | else view = "Agenda"; |
113 | 161 | ||
114 | config->writeEntry("Current View",view); | 162 | config->writeEntry("Current View",view); |
115 | 163 | ||
116 | if (mAgendaView) { | 164 | if (mAgendaView) { |
@@ -295,33 +343,33 @@ void KOViewManager::showAgendaView( bool fullScreen ) | |||
295 | mMainView->dialogManager()->hideSearchDialog(); | 343 | mMainView->dialogManager()->hideSearchDialog(); |
296 | // qDebug("KOViewManager::showAgendaView "); | 344 | // qDebug("KOViewManager::showAgendaView "); |
297 | bool full; | 345 | bool full; |
298 | full = fullScreen; | 346 | full = fullScreen; |
299 | if (!mAgendaView) { | 347 | if (!mAgendaView) { |
300 | full = false; | 348 | full = false; |
301 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); | 349 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); |
302 | addView(mAgendaView); | 350 | addView(mAgendaView); |
303 | #ifndef DESKTOP_VERSION | 351 | #ifndef DESKTOP_VERSION |
304 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); | 352 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); |
305 | #endif | 353 | #endif |
306 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), | 354 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), |
307 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); | 355 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); |
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))); |
315 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), | 363 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), |
316 | mMainView, SLOT(newEvent(QDateTime))); | 364 | mMainView, SLOT(newEvent(QDateTime))); |
317 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), | 365 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), |
318 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); | 366 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); |
319 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), | 367 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), |
320 | mMainView, SLOT(newEvent(QDate))); | 368 | mMainView, SLOT(newEvent(QDate))); |
321 | 369 | ||
322 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), | 370 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), |
323 | mMainView, SLOT(editIncidence(Incidence *))); | 371 | mMainView, SLOT(editIncidence(Incidence *))); |
324 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), | 372 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), |
325 | mMainView, SLOT(showIncidence(Incidence *))); | 373 | mMainView, SLOT(showIncidence(Incidence *))); |
326 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 374 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
327 | mMainView, SLOT(deleteIncidence(Incidence *))); | 375 | mMainView, SLOT(deleteIncidence(Incidence *))); |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index c8c7a7a..137eb2d 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -69,32 +69,33 @@ class KOViewManager : public QObject | |||
69 | void updateView( const QDate &start, const QDate &end ); | 69 | void updateView( const QDate &start, const QDate &end ); |
70 | 70 | ||
71 | void raiseCurrentView( bool fullScreen = false ); | 71 | void raiseCurrentView( bool fullScreen = false ); |
72 | 72 | ||
73 | void addView(KOrg::BaseView *); | 73 | void addView(KOrg::BaseView *); |
74 | 74 | ||
75 | Incidence *currentSelection(); | 75 | Incidence *currentSelection(); |
76 | QDate currentSelectionDate(); | 76 | QDate currentSelectionDate(); |
77 | 77 | ||
78 | KOAgendaView *agendaView() const { return mAgendaView; } | 78 | KOAgendaView *agendaView() const { return mAgendaView; } |
79 | 79 | ||
80 | signals: | 80 | signals: |
81 | void printWNV(); | 81 | void printWNV(); |
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(); |
88 | void showAgendaView( bool fullScreen = false ); | 89 | void showAgendaView( bool fullScreen = false ); |
89 | void showDayView(); | 90 | void showDayView(); |
90 | void showWorkWeekView(); | 91 | void showWorkWeekView(); |
91 | void showWeekView(); | 92 | void showWeekView(); |
92 | void showNextXView(); | 93 | void showNextXView(); |
93 | void showMonthView(); | 94 | void showMonthView(); |
94 | void showTodoView(); | 95 | void showTodoView(); |
95 | void showJournalView(); | 96 | void showJournalView(); |
96 | void showTimeSpanView(); | 97 | void showTimeSpanView(); |
97 | 98 | ||
98 | private: | 99 | private: |
99 | CalendarView *mMainView; | 100 | CalendarView *mMainView; |
100 | 101 | ||