summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-15 00:20:28 (UTC)
committer zautrix <zautrix>2005-01-15 00:20:28 (UTC)
commit80da9080c1c33c4704806c442179522edce06bd2 (patch) (unidiff)
treef17bfb786b7c85d4d3bf93545494dafdf9ec5184
parentd937154e5ae3691dda55fac9114142f92e29e37b (diff)
downloadkdepimpi-80da9080c1c33c4704806c442179522edce06bd2.zip
kdepimpi-80da9080c1c33c4704806c442179522edce06bd2.tar.gz
kdepimpi-80da9080c1c33c4704806c442179522edce06bd2.tar.bz2
completed todo
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koeventviewerdialog.cpp16
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/koviewmanager.h2
5 files changed, 23 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 5be1d28..da33d12 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,31 +1,34 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.17 ************ 3********** VERSION 1.9.17 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed that tooltips were not updated after moving an item in agenda view. 6Fixed that tooltips were not updated after moving an item in agenda view.
7Fixed a bug in sorting start date for recurring events in list view. 7Fixed a bug in sorting start date for recurring events in list view.
8Changed the left button in todo viewer from "Agenda" to "Set completed".
9This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
10
8 11
9KA/Pi: 12KA/Pi:
10All fields search does now actually search all the (possible) fields, 13All fields search does now actually search all the (possible) fields,
11not only those listed in the contact list. 14not only those listed in the contact list.
12Made is possible to inline a picture in a vcard on the Z. 15Made is possible to inline a picture in a vcard on the Z.
13This was only possible on the desktop, now is it possible on the Z as well. 16This was only possible on the desktop, now is it possible on the Z as well.
14Fixed of missing save settings after filter configuration. 17Fixed of missing save settings after filter configuration.
15Made saving of addressbook much faster. 18Made saving of addressbook much faster.
16Fixed extension widget layout problem. 19Fixed extension widget layout problem.
17Fixed saving of default formatted name settings. 20Fixed saving of default formatted name settings.
18Fixed formatted name handling in edit dialog. 21Fixed formatted name handling in edit dialog.
19Added an option for changing formatted names of many contacts 22Added an option for changing formatted names of many contacts
20(menu: File - Change - Set formatted name). 23(menu: File - Change - Set formatted name).
21 24
22QWhatsThis was not working on the Z ( only black rectangle was shown). 25QWhatsThis was not working on the Z ( only black rectangle was shown).
23This is Fixed. 26This is Fixed.
24 27
25KDE-Sync: 28KDE-Sync:
26Now readonly KDE resources are synced as well. 29Now readonly KDE resources are synced as well.
27(They are not changed in KDE itself, of course). 30(They are not changed in KDE itself, of course).
28 31
29 32
30 33
31********** VERSION 1.9.16 ************ 34********** VERSION 1.9.16 ************
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 363dc32..378c7d4 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2705,48 +2705,50 @@ void CalendarView::editJournal( Journal *jour )
2705} 2705}
2706void CalendarView::editTodo( Todo *todo ) 2706void CalendarView::editTodo( Todo *todo )
2707{ 2707{
2708 if ( !todo ) return; 2708 if ( !todo ) return;
2709 2709
2710 if ( todo->isReadOnly() ) { 2710 if ( todo->isReadOnly() ) {
2711 showTodo( todo ); 2711 showTodo( todo );
2712 return; 2712 return;
2713 } 2713 }
2714 showTodoEditor(); 2714 showTodoEditor();
2715 mTodoEditor->editTodo( todo ,mFlagEditDescription); 2715 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2716 2716
2717} 2717}
2718 2718
2719KOEventViewerDialog* CalendarView::getEventViewerDialog() 2719KOEventViewerDialog* CalendarView::getEventViewerDialog()
2720{ 2720{
2721 if ( !mEventViewerDialog ) { 2721 if ( !mEventViewerDialog ) {
2722 mEventViewerDialog = new KOEventViewerDialog(this); 2722 mEventViewerDialog = new KOEventViewerDialog(this);
2723 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 2723 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
2724 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 2724 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
2725 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 2725 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
2726 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 2726 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
2727 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 2727 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
2728 viewManager(), SLOT( showAgendaView( bool ) ) ); 2728 viewManager(), SLOT( showAgendaView( bool ) ) );
2729 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
2730 this, SLOT( todoChanged(Todo *) ) );
2729 mEventViewerDialog->resize( 640, 480 ); 2731 mEventViewerDialog->resize( 640, 480 );
2730 2732
2731 } 2733 }
2732 return mEventViewerDialog; 2734 return mEventViewerDialog;
2733} 2735}
2734void CalendarView::showEvent(Event *event) 2736void CalendarView::showEvent(Event *event)
2735{ 2737{
2736 getEventViewerDialog()->setEvent(event); 2738 getEventViewerDialog()->setEvent(event);
2737 getEventViewerDialog()->showMe(); 2739 getEventViewerDialog()->showMe();
2738} 2740}
2739 2741
2740void CalendarView::showTodo(Todo *event) 2742void CalendarView::showTodo(Todo *event)
2741{ 2743{
2742 getEventViewerDialog()->setTodo(event); 2744 getEventViewerDialog()->setTodo(event);
2743 getEventViewerDialog()->showMe(); 2745 getEventViewerDialog()->showMe();
2744} 2746}
2745void CalendarView::showJournal( Journal *jour ) 2747void CalendarView::showJournal( Journal *jour )
2746{ 2748{
2747 getEventViewerDialog()->setJournal(jour); 2749 getEventViewerDialog()->setJournal(jour);
2748 getEventViewerDialog()->showMe(); 2750 getEventViewerDialog()->showMe();
2749 2751
2750} 2752}
2751// void CalendarView::todoModified (Todo *event, int changed) 2753// void CalendarView::todoModified (Todo *event, int changed)
2752// { 2754// {
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 68c0e1a..772fd95 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -129,104 +129,120 @@ void KOEventViewerDialog::setIncidence(Incidence *in )
129 else if ( in->type() =="Todo" ) 129 else if ( in->type() =="Todo" )
130 setTodo( (Todo*) in ); 130 setTodo( (Todo*) in );
131 else if ( in->type() =="Journal" ) 131 else if ( in->type() =="Journal" )
132 setJournal( (Journal*) in ); 132 setJournal( (Journal*) in );
133} 133}
134void KOEventViewerDialog::addIncidence(Incidence *in) 134void KOEventViewerDialog::addIncidence(Incidence *in)
135{ 135{
136 if ( in->type() == "Event" ) 136 if ( in->type() == "Event" )
137 addEvent( (Event*) in ); 137 addEvent( (Event*) in );
138 else if ( in->type() =="Todo" ) 138 else if ( in->type() =="Todo" )
139 mEventViewer->setTodo( (Todo*) in, false ); 139 mEventViewer->setTodo( (Todo*) in, false );
140 else if ( in->type() =="Journal" ) 140 else if ( in->type() =="Journal" )
141 mEventViewer->setJournal( (Journal*) in, false ); 141 mEventViewer->setJournal( (Journal*) in, false );
142 if ( mSyncMode ) { 142 if ( mSyncMode ) {
143 findButton( User1 )->setFocus(); 143 findButton( User1 )->setFocus();
144 setCaption(i18n("Conflict! Please choose entry")); 144 setCaption(i18n("Conflict! Please choose entry"));
145 } 145 }
146} 146}
147 147
148void KOEventViewerDialog::addEvent(Event *event) 148void KOEventViewerDialog::addEvent(Event *event)
149{ 149{
150 mEventViewer->addEvent(event); 150 mEventViewer->addEvent(event);
151 mIncidence = event; 151 mIncidence = event;
152 findButton( Close )->setFocus(); 152 findButton( Close )->setFocus();
153 if ( !mSyncMode ) {
154 findButton( User1 )->setText( i18n("Agenda"));
155 }
153} 156}
154 157
155void KOEventViewerDialog::setTodo(Todo *event) 158void KOEventViewerDialog::setTodo(Todo *event)
156{ 159{
157 mEventViewer->setTodo(event); 160 mEventViewer->setTodo(event);
158 mIncidence = (Incidence*)event; 161 mIncidence = (Incidence*)event;
159 findButton( Close )->setFocus(); 162 findButton( Close )->setFocus();
163 if ( !mSyncMode ) {
164 findButton( User1 )->setText( i18n("Set complete"));
165 }
160} 166}
161void KOEventViewerDialog::setJournal(Journal *j) 167void KOEventViewerDialog::setJournal(Journal *j)
162{ 168{
163 mEventViewer->setJournal(j); 169 mEventViewer->setJournal(j);
164 mIncidence = (Incidence*)j; 170 mIncidence = (Incidence*)j;
165 findButton( Close )->setFocus(); 171 findButton( Close )->setFocus();
172 if ( !mSyncMode ) {
173 findButton( User1 )->setText( i18n("Agenda"));
174 }
166} 175}
167 176
168void KOEventViewerDialog::addText(QString text) 177void KOEventViewerDialog::addText(QString text)
169{ 178{
170 mEventViewer->addText(text); 179 mEventViewer->addText(text);
171 findButton( Close )->setFocus(); 180 findButton( Close )->setFocus();
172} 181}
173void KOEventViewerDialog::editIncidence() 182void KOEventViewerDialog::editIncidence()
174{ 183{
175 if ( mSyncMode ) { 184 if ( mSyncMode ) {
176 mSyncResult = 2; 185 mSyncResult = 2;
177 accept(); 186 accept();
178 return; 187 return;
179 } 188 }
180 if ( mIncidence ){ 189 if ( mIncidence ){
181#ifndef DESKTOP_VERSION 190#ifndef DESKTOP_VERSION
182 hide(); 191 hide();
183#endif 192#endif
184 emit editIncidence( mIncidence ); 193 emit editIncidence( mIncidence );
185 } 194 }
186} 195}
187void KOEventViewerDialog::showIncidence() 196void KOEventViewerDialog::showIncidence()
188{ 197{
189 198
190 if ( mSyncMode ) { 199 if ( mSyncMode ) {
191 mSyncResult = 1; 200 mSyncResult = 1;
192 accept(); 201 accept();
193 return; 202 return;
194 } 203 }
195 204
196 if ( mIncidence ){ 205 if ( mIncidence ){
197#ifndef DESKTOP_VERSION 206#ifndef DESKTOP_VERSION
198 hide(); 207 hide();
199#endif 208#endif
200 QDate date; 209 QDate date;
201 if ( mIncidence->type() == "Todo" ) { 210 if ( mIncidence->type() == "Todo" ) {
211 /*
202 if ( ((Todo*)mIncidence)->hasDueDate() ) 212 if ( ((Todo*)mIncidence)->hasDueDate() )
203 date = ((Todo*)mIncidence)->dtDue().date(); 213 date = ((Todo*)mIncidence)->dtDue().date();
204 else { 214 else {
205 globalFlagBlockAgenda = 2; 215 globalFlagBlockAgenda = 2;
206 emit showAgendaView( false ); 216 emit showAgendaView( false );
207 return; 217 return;
208 } 218 }
219 */
220 ((Todo*)mIncidence)->setCompleted( true );
221 hide();
222 emit todoCompleted(((Todo*)mIncidence));
223 return;
224
209 } else 225 } else
210 date = mIncidence->dtStart().date(); 226 date = mIncidence->dtStart().date();
211 globalFlagBlockAgenda = 1; 227 globalFlagBlockAgenda = 1;
212 emit showAgendaView( false ); 228 emit showAgendaView( false );
213 globalFlagBlockAgenda = 2; 229 globalFlagBlockAgenda = 2;
214 emit jumpToTime( date ); 230 emit jumpToTime( date );
215 } 231 }
216} 232}
217void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) 233void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
218{ 234{
219 switch ( e->key() ) { 235 switch ( e->key() ) {
220 236
221 case Qt::Key_A : 237 case Qt::Key_A :
222 case Qt::Key_L : 238 case Qt::Key_L :
223 showIncidence(); 239 showIncidence();
224 break; 240 break;
225 case Qt::Key_E : 241 case Qt::Key_E :
226 case Qt::Key_R : 242 case Qt::Key_R :
227 editIncidence(); 243 editIncidence();
228 break; 244 break;
229 case Qt::Key_C: 245 case Qt::Key_C:
230 case Qt::Key_Escape: 246 case Qt::Key_Escape:
231 close(); 247 close();
232 break; 248 break;
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 21cb3ee..b6b4103 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -34,37 +34,38 @@ class KOEventViewer;
34 34
35class KOEventViewerDialog : public KDialogBase { 35class KOEventViewerDialog : public KDialogBase {
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 KOEventViewerDialog(QWidget *parent=0,const char *name=0); 38 KOEventViewerDialog(QWidget *parent=0,const char *name=0);
39 virtual ~KOEventViewerDialog(); 39 virtual ~KOEventViewerDialog();
40 40
41 void setEvent(Event *event); 41 void setEvent(Event *event);
42 void addEvent(Event *event); 42 void addEvent(Event *event);
43 void setTodo(Todo *event); 43 void setTodo(Todo *event);
44 void setJournal(Journal *journal); 44 void setJournal(Journal *journal);
45 void setIncidence(Incidence *inc); 45 void setIncidence(Incidence *inc);
46 void addIncidence(Incidence *inc); 46 void addIncidence(Incidence *inc);
47 void addText(QString text); 47 void addText(QString text);
48 void showMe(); 48 void showMe();
49 void setSyncMode( bool ); 49 void setSyncMode( bool );
50 void setColorMode( int m ); 50 void setColorMode( int m );
51 int executeS( bool ); 51 int executeS( bool );
52 public slots: 52 public slots:
53 void updateConfig(); 53 void updateConfig();
54 signals: 54 signals:
55 void editIncidence( Incidence* ); 55 void editIncidence( Incidence* );
56 void jumpToTime( const QDate &); 56 void jumpToTime( const QDate &);
57 void showAgendaView( bool ); 57 void showAgendaView( bool );
58 void todoCompleted(Todo*);
58private slots: 59private slots:
59 void editIncidence(); 60 void editIncidence();
60 void showIncidence(); 61 void showIncidence();
61 62
62 private: 63 private:
63 bool mSyncMode; 64 bool mSyncMode;
64 int mSyncResult; 65 int mSyncResult;
65 KOEventViewer *mEventViewer; 66 KOEventViewer *mEventViewer;
66 Incidence* mIncidence; 67 Incidence* mIncidence;
67 void keyPressEvent ( QKeyEvent * e ); 68 void keyPressEvent ( QKeyEvent * e );
68}; 69};
69 70
70#endif 71#endif
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 6f76e2c..3c251fb 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -45,63 +45,63 @@ using namespace KCal;
45 creation and selection. 45 creation and selection.
46*/ 46*/
47class KOViewManager : public QObject 47class KOViewManager : public QObject
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 public: 50 public:
51 KOViewManager( CalendarView * ); 51 KOViewManager( CalendarView * );
52 virtual ~KOViewManager(); 52 virtual ~KOViewManager();
53 53
54 /** changes the view to be the currently selected view */ 54 /** changes the view to be the currently selected view */
55 void showView(KOrg::BaseView *, bool fullScreen = false ); 55 void showView(KOrg::BaseView *, bool fullScreen = false );
56 void updateWNview(); 56 void updateWNview();
57 void readSettings(KConfig *config); 57 void readSettings(KConfig *config);
58 void writeSettings(KConfig *config); 58 void writeSettings(KConfig *config);
59 bool showsNextDays(); 59 bool showsNextDays();
60 /** Read which view was shown last from config file */ 60 /** Read which view was shown last from config file */
61 void readCurrentView(KConfig *); 61 void readCurrentView(KConfig *);
62 /** Write which view is currently shown to config file */ 62 /** Write which view is currently shown to config file */
63 void writeCurrentView(KConfig *); 63 void writeCurrentView(KConfig *);
64 64
65 KOrg::BaseView *currentView(); 65 KOrg::BaseView *currentView();
66 66
67 void setDocumentId( const QString & ); 67 void setDocumentId( const QString & );
68 68
69 void updateView();
70 void updateView( const QDate &start, const QDate &end ); 69 void updateView( const QDate &start, const QDate &end );
71 70
72 void raiseCurrentView( bool fullScreen = false ); 71 void raiseCurrentView( bool fullScreen = false );
73 72
74 void addView(KOrg::BaseView *); 73 void addView(KOrg::BaseView *);
75 74
76 Incidence *currentSelection(); 75 Incidence *currentSelection();
77 QDate currentSelectionDate(); 76 QDate currentSelectionDate();
78 77
79 KOAgendaView *agendaView() const { return mAgendaView; } 78 KOAgendaView *agendaView() const { return mAgendaView; }
80 79
81 signals: 80 signals:
82 void printWNV(); 81 void printWNV();
83 public slots: 82 public slots:
83 void updateView();
84 void showWhatsNextView(); 84 void showWhatsNextView();
85 void showListView(); 85 void showListView();
86 void showAgendaView( bool fullScreen = false ); 86 void showAgendaView( bool fullScreen = false );
87 void showDayView(); 87 void showDayView();
88 void showWorkWeekView(); 88 void showWorkWeekView();
89 void showWeekView(); 89 void showWeekView();
90 void showNextXView(); 90 void showNextXView();
91 void showMonthView(); 91 void showMonthView();
92 void showTodoView(); 92 void showTodoView();
93 void showJournalView(); 93 void showJournalView();
94 void showTimeSpanView(); 94 void showTimeSpanView();
95 95
96 private: 96 private:
97 CalendarView *mMainView; 97 CalendarView *mMainView;
98 98
99 int mCurrentAgendaView; 99 int mCurrentAgendaView;
100 KOAgendaView *mAgendaView; 100 KOAgendaView *mAgendaView;
101 KOListView *mListView; 101 KOListView *mListView;
102 KOMonthView *mMonthView; 102 KOMonthView *mMonthView;
103 KOTodoView *mTodoView; 103 KOTodoView *mTodoView;
104 KOWhatsNextView *mWhatsNextView; 104 KOWhatsNextView *mWhatsNextView;
105 KOJournalView *mJournalView; 105 KOJournalView *mJournalView;
106 KOTimeSpanView *mTimeSpanView; 106 KOTimeSpanView *mTimeSpanView;
107 107