summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/mainwindow.cpp2
3 files changed, 4 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 2012e92..eac2f29 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3929,263 +3929,265 @@ void CalendarView::processIncidenceSelection( Incidence *incidence )
3929 emit organizerEventsSelected(false); 3929 emit organizerEventsSelected(false);
3930 } 3930 }
3931 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3931 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3932 KOPrefs::instance()->email() ) ) { 3932 KOPrefs::instance()->email() ) ) {
3933 emit groupEventsSelected( true ); 3933 emit groupEventsSelected( true );
3934 } else { 3934 } else {
3935 emit groupEventsSelected(false); 3935 emit groupEventsSelected(false);
3936 } 3936 }
3937 return; 3937 return;
3938 } else { 3938 } else {
3939 emit todoSelected( false ); 3939 emit todoSelected( false );
3940 emit organizerEventsSelected(false); 3940 emit organizerEventsSelected(false);
3941 emit groupEventsSelected(false); 3941 emit groupEventsSelected(false);
3942 } 3942 }
3943 return; 3943 return;
3944 } 3944 }
3945 3945
3946 /* if ( incidence && incidence->typeID() == todoID ) { 3946 /* if ( incidence && incidence->typeID() == todoID ) {
3947 emit todoSelected( true ); 3947 emit todoSelected( true );
3948 } else { 3948 } else {
3949 emit todoSelected( false ); 3949 emit todoSelected( false );
3950 }*/ 3950 }*/
3951} 3951}
3952 3952
3953 3953
3954void CalendarView::checkClipboard() 3954void CalendarView::checkClipboard()
3955{ 3955{
3956#ifndef KORG_NODND 3956#ifndef KORG_NODND
3957 if (ICalDrag::canDecode(QApplication::clipboard()->data())) { 3957 if (ICalDrag::canDecode(QApplication::clipboard()->data())) {
3958 emit pasteEnabled(true); 3958 emit pasteEnabled(true);
3959 } else { 3959 } else {
3960 emit pasteEnabled(false); 3960 emit pasteEnabled(false);
3961 } 3961 }
3962#endif 3962#endif
3963} 3963}
3964 3964
3965void CalendarView::showDates(const DateList &selectedDates) 3965void CalendarView::showDates(const DateList &selectedDates)
3966{ 3966{
3967 // kdDebug() << "CalendarView::selectDates()" << endl; 3967 // kdDebug() << "CalendarView::selectDates()" << endl;
3968 3968
3969 3969
3970 if ( !mBlockShowDates ) { 3970 if ( !mBlockShowDates ) {
3971 if ( mViewManager->currentView() ) { 3971 if ( mViewManager->currentView() ) {
3972 updateView( selectedDates.first(), selectedDates.last() ); 3972 updateView( selectedDates.first(), selectedDates.last() );
3973 } else { 3973 } else {
3974 mViewManager->showAgendaView(); 3974 mViewManager->showAgendaView();
3975 } 3975 }
3976 } 3976 }
3977 3977
3978 QDate date = selectedDates.first(); 3978 QDate date = selectedDates.first();
3979 if ( ! date.isValid() ) { 3979 if ( ! date.isValid() ) {
3980 topLevelWidget()->setCaption(""); 3980 topLevelWidget()->setCaption("");
3981 return; 3981 return;
3982 } 3982 }
3983 3983
3984 QString selDates; 3984 QString selDates;
3985 selDates = KGlobal::locale()->formatDate( date, true); 3985 selDates = KGlobal::locale()->formatDate( date, true);
3986 if (selectedDates.first() < selectedDates.last() ) 3986 if (selectedDates.first() < selectedDates.last() )
3987 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); 3987 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
3988 else { 3988 else {
3989 QString addString; 3989 QString addString;
3990 if ( date == QDateTime::currentDateTime().date() ) 3990 if ( date == QDateTime::currentDateTime().date() )
3991 addString = i18n("Today"); 3991 addString = i18n("Today");
3992 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 3992 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
3993 addString = i18n("Tomorrow"); 3993 addString = i18n("Tomorrow");
3994 else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) 3994 else if ( date == QDateTime::currentDateTime().date().addDays(-1) )
3995 addString = i18n("Yesterday"); 3995 addString = i18n("Yesterday");
3996 else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) 3996 else if ( date == QDateTime::currentDateTime().date().addDays(-2) )
3997 addString = i18n("Day before yesterday"); 3997 addString = i18n("Day before yesterday");
3998 else if ( date == QDateTime::currentDateTime().date().addDays(2) ) 3998 else if ( date == QDateTime::currentDateTime().date().addDays(2) )
3999 addString = i18n("Day after tomorrow"); 3999 addString = i18n("Day after tomorrow");
4000 if ( !addString.isEmpty() ) { 4000 if ( !addString.isEmpty() ) {
4001 topLevelWidget()->setCaption( addString+", " + selDates ); 4001 topLevelWidget()->setCaption( addString+", " + selDates );
4002 return; 4002 return;
4003 } 4003 }
4004 } 4004 }
4005 topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); 4005 topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
4006 4006
4007} 4007}
4008 4008
4009QPtrList<CalFilter> CalendarView::filters() 4009QPtrList<CalFilter> CalendarView::filters()
4010{ 4010{
4011 return mFilters; 4011 return mFilters;
4012 4012
4013} 4013}
4014void CalendarView::editFilters() 4014void CalendarView::editFilters()
4015{ 4015{
4016 // kdDebug() << "CalendarView::editFilters()" << endl; 4016 // kdDebug() << "CalendarView::editFilters()" << endl;
4017 4017
4018 CalFilter *filter = mFilters.first(); 4018 CalFilter *filter = mFilters.first();
4019 while(filter) { 4019 while(filter) {
4020 kdDebug() << " Filter: " << filter->name() << endl; 4020 kdDebug() << " Filter: " << filter->name() << endl;
4021 filter = mFilters.next(); 4021 filter = mFilters.next();
4022 } 4022 }
4023 4023
4024 mDialogManager->showFilterEditDialog(&mFilters); 4024 mDialogManager->showFilterEditDialog(&mFilters);
4025 updateFilter();
4025} 4026}
4026void CalendarView::toggleFilter() 4027void CalendarView::toggleFilter()
4027{ 4028{
4028 showFilter(! mCalEditView->isVisible()); 4029 showFilter(! mCalEditView->isVisible());
4029} 4030}
4030 4031
4031KOFilterView *CalendarView::filterView() 4032KOFilterView *CalendarView::filterView()
4032{ 4033{
4033 return mFilterView; 4034 return mFilterView;
4034} 4035}
4035void CalendarView::selectFilter( int fil ) 4036void CalendarView::selectFilter( int fil )
4036{ 4037{
4037 mFilterView->setSelectedFilter( fil ); 4038 mFilterView->setSelectedFilter( fil );
4038} 4039}
4039void CalendarView::showFilter(bool visible) 4040void CalendarView::showFilter(bool visible)
4040{ 4041{
4041#if 1 4042#if 1
4042 if (visible) { 4043 if (visible) {
4043 mCalEditView->readConfig(); 4044 mCalEditView->readConfig();
4044 mCalEditView->show(); 4045 mCalEditView->show();
4045 QValueList<int> sizes; 4046 QValueList<int> sizes;
4046 sizes = mLeftFrame->sizes(); 4047 sizes = mLeftFrame->sizes();
4047 if ( sizes.count() == 4 && sizes[3] < 20 ) { 4048 if ( sizes.count() == 4 && sizes[3] < 20 ) {
4048 sizes.clear(); 4049 sizes.clear();
4049 sizes << 100; 4050 sizes << 100;
4050 sizes << 0; 4051 sizes << 0;
4051 sizes << 0; 4052 sizes << 0;
4052 sizes << 100; 4053 sizes << 100;
4053 mLeftFrame->setSizes(sizes); 4054 mLeftFrame->setSizes(sizes);
4054 } 4055 }
4055#if 0 4056#if 0
4056 sizes = mLeftFrame->sizes(); 4057 sizes = mLeftFrame->sizes();
4057 int ccc = 0; 4058 int ccc = 0;
4058 while ( ccc < sizes.count()) { 4059 while ( ccc < sizes.count()) {
4059 qDebug("size %d %d ", ccc, sizes[ccc]); 4060 qDebug("size %d %d ", ccc, sizes[ccc]);
4060 ++ccc; 4061 ++ccc;
4061 } 4062 }
4062#endif 4063#endif
4063 4064
4064 } 4065 }
4065 else { 4066 else {
4066 mCalEditView->hide(); 4067 mCalEditView->hide();
4067 } 4068 }
4068#else 4069#else
4069 if (visible) mFilterView->show(); 4070 if (visible) mFilterView->show();
4070 else mFilterView->hide(); 4071 else mFilterView->hide();
4071#endif 4072#endif
4072} 4073}
4073void CalendarView::toggleFilerEnabled( ) 4074void CalendarView::toggleFilerEnabled( )
4074{ 4075{
4075 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); 4076 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
4076 if ( !mFilterView->filtersEnabled() ) 4077 if ( !mFilterView->filtersEnabled() )
4077 topLevelWidget()->setCaption( i18n("Filter disabled ") ); 4078 topLevelWidget()->setCaption( i18n("Filter disabled ") );
4078 4079
4079} 4080}
4080void CalendarView::updateFilter() 4081void CalendarView::updateFilter()
4081{ 4082{
4082 CalFilter *filter = mFilterView->selectedFilter(); 4083 CalFilter *filter = mFilterView->selectedFilter();
4083 if (filter) { 4084 if (filter) {
4084 QString mess; 4085 QString mess;
4085 if (mFilterView->filtersEnabled()) { 4086 if (mFilterView->filtersEnabled()) {
4086 mess = i18n("Filter selected: ")+filter->name(); 4087 mess = i18n("Filter selected: ")+filter->name();
4087 filter->setEnabled(true); 4088 filter->setEnabled(true);
4088 } 4089 }
4089 else filter->setEnabled(false); 4090 else filter->setEnabled(false);
4090 mCalendar->setFilter(filter); 4091 mCalendar->setFilter(filter);
4091 updateView(); 4092 updateView();
4092 if ( !mess.isEmpty() ) 4093 if ( !mess.isEmpty() )
4093 topLevelWidget()->setCaption( mess ); 4094 topLevelWidget()->setCaption( mess );
4094 4095
4095 } 4096 }
4097 emit filtersUpdated();
4096} 4098}
4097 4099
4098void CalendarView::filterEdited() 4100void CalendarView::filterEdited()
4099{ 4101{
4100 mFilterView->updateFilters(); 4102 mFilterView->updateFilters();
4101 updateFilter(); 4103 updateFilter();
4102 writeSettings(); 4104 writeSettings();
4103} 4105}
4104 4106
4105 4107
4106void CalendarView::takeOverEvent() 4108void CalendarView::takeOverEvent()
4107{ 4109{
4108 Incidence *incidence = currentSelection(); 4110 Incidence *incidence = currentSelection();
4109 4111
4110 if (!incidence) return; 4112 if (!incidence) return;
4111 4113
4112 incidence->setOrganizer(KOPrefs::instance()->email()); 4114 incidence->setOrganizer(KOPrefs::instance()->email());
4113 incidence->recreate(); 4115 incidence->recreate();
4114 incidence->setReadOnly(false); 4116 incidence->setReadOnly(false);
4115 4117
4116 updateView(); 4118 updateView();
4117} 4119}
4118 4120
4119void CalendarView::takeOverCalendar() 4121void CalendarView::takeOverCalendar()
4120{ 4122{
4121 // TODO: Create Calendar::allIncidences() function and use it here 4123 // TODO: Create Calendar::allIncidences() function and use it here
4122 4124
4123 clearAllViews(); 4125 clearAllViews();
4124 QPtrList<Event> events = mCalendar->events(); 4126 QPtrList<Event> events = mCalendar->events();
4125 for(uint i=0; i<events.count(); ++i) { 4127 for(uint i=0; i<events.count(); ++i) {
4126 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 4128 events.at(i)->setOrganizer(KOPrefs::instance()->email());
4127 events.at(i)->recreate(); 4129 events.at(i)->recreate();
4128 events.at(i)->setReadOnly(false); 4130 events.at(i)->setReadOnly(false);
4129 } 4131 }
4130 4132
4131 QPtrList<Todo> todos = mCalendar->todos(); 4133 QPtrList<Todo> todos = mCalendar->todos();
4132 for(uint i=0; i<todos.count(); ++i) { 4134 for(uint i=0; i<todos.count(); ++i) {
4133 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 4135 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
4134 todos.at(i)->recreate(); 4136 todos.at(i)->recreate();
4135 todos.at(i)->setReadOnly(false); 4137 todos.at(i)->setReadOnly(false);
4136 } 4138 }
4137 4139
4138 QPtrList<Journal> journals = mCalendar->journals(); 4140 QPtrList<Journal> journals = mCalendar->journals();
4139 for(uint i=0; i<journals.count(); ++i) { 4141 for(uint i=0; i<journals.count(); ++i) {
4140 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 4142 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
4141 journals.at(i)->recreate(); 4143 journals.at(i)->recreate();
4142 journals.at(i)->setReadOnly(false); 4144 journals.at(i)->setReadOnly(false);
4143 } 4145 }
4144 4146
4145 updateView(); 4147 updateView();
4146} 4148}
4147 4149
4148void CalendarView::showIntro() 4150void CalendarView::showIntro()
4149{ 4151{
4150 kdDebug() << "To be implemented." << endl; 4152 kdDebug() << "To be implemented." << endl;
4151} 4153}
4152 4154
4153QWidgetStack *CalendarView::viewStack() 4155QWidgetStack *CalendarView::viewStack()
4154{ 4156{
4155 return mRightFrame; 4157 return mRightFrame;
4156} 4158}
4157 4159
4158QWidget *CalendarView::leftFrame() 4160QWidget *CalendarView::leftFrame()
4159{ 4161{
4160 return ( QWidget *)mLeftFrame; 4162 return ( QWidget *)mLeftFrame;
4161} 4163}
4162 4164
4163DateNavigator *CalendarView::dateNavigator() 4165DateNavigator *CalendarView::dateNavigator()
4164{ 4166{
4165 return mNavigator; 4167 return mNavigator;
4166} 4168}
4167 4169
4168KDateNavigator* CalendarView::dateNavigatorWidget() 4170KDateNavigator* CalendarView::dateNavigatorWidget()
4169{ 4171{
4170 return mDateNavigator->navigatorView(); 4172 return mDateNavigator->navigatorView();
4171} 4173}
4172void CalendarView::toggleDateNavigatorWidget() 4174void CalendarView::toggleDateNavigatorWidget()
4173{ 4175{
4174 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; 4176 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ;
4175 4177
4176 if (!KOPrefs::instance()->mShowDateNavigator ) 4178 if (!KOPrefs::instance()->mShowDateNavigator )
4177 mDateNavigator->hide(); 4179 mDateNavigator->hide();
4178 else 4180 else
4179 mDateNavigator->show(); 4181 mDateNavigator->show();
4180} 4182}
4181void CalendarView::addView(KOrg::BaseView *view) 4183void CalendarView::addView(KOrg::BaseView *view)
4182{ 4184{
4183 mViewManager->addView(view); 4185 mViewManager->addView(view);
4184} 4186}
4185 4187
4186void CalendarView::showView(KOrg::BaseView *view) 4188void CalendarView::showView(KOrg::BaseView *view)
4187{ 4189{
4188 mViewManager->showView(view, mLeftFrame->isVisible()); 4190 mViewManager->showView(view, mLeftFrame->isVisible());
4189} 4191}
4190 4192
4191Incidence *CalendarView::currentSelection() 4193Incidence *CalendarView::currentSelection()
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index d836fee..be18e8f 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -101,192 +101,193 @@ class MissedAlarmTextBrowser : public QTextBrowser {
101}; 101};
102 102
103 103
104class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface 104class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface
105{ 105{
106 Q_OBJECT 106 Q_OBJECT
107 public: 107 public:
108 /** 108 /**
109 Constructs a new calendar view widget. 109 Constructs a new calendar view widget.
110 110
111 @param calendar calendar document 111 @param calendar calendar document
112 @param parent parent window 112 @param parent parent window
113 @param name Qt internal widget object name 113 @param name Qt internal widget object name
114 */ 114 */
115 CalendarView( CalendarResources *calendar, QWidget *parent = 0, 115 CalendarView( CalendarResources *calendar, QWidget *parent = 0,
116 const char *name = 0 ); 116 const char *name = 0 );
117 CalendarView( Calendar *calendar, QWidget *parent = 0, 117 CalendarView( Calendar *calendar, QWidget *parent = 0,
118 const char *name = 0 ); 118 const char *name = 0 );
119 virtual ~CalendarView(); 119 virtual ~CalendarView();
120 120
121 Calendar *calendar() { return mCalendar; } 121 Calendar *calendar() { return mCalendar; }
122 122
123 KOViewManager *viewManager(); 123 KOViewManager *viewManager();
124 KODialogManager *dialogManager(); 124 KODialogManager *dialogManager();
125 125
126 QDate startDate(); 126 QDate startDate();
127 QDate endDate(); 127 QDate endDate();
128 128
129 QWidgetStack *viewStack(); 129 QWidgetStack *viewStack();
130 QWidget *leftFrame(); 130 QWidget *leftFrame();
131 131
132 DateNavigator *dateNavigator(); 132 DateNavigator *dateNavigator();
133 KDateNavigator *dateNavigatorWidget(); 133 KDateNavigator *dateNavigatorWidget();
134 134
135 void addView(KOrg::BaseView *); 135 void addView(KOrg::BaseView *);
136 void showView(KOrg::BaseView *); 136 void showView(KOrg::BaseView *);
137 KOEventViewerDialog* getEventViewerDialog(); 137 KOEventViewerDialog* getEventViewerDialog();
138 Incidence *currentSelection(); 138 Incidence *currentSelection();
139 139
140 signals: 140 signals:
141 void save (); 141 void save ();
142 void saveStopTimer (); 142 void saveStopTimer ();
143 void tempDisableBR(bool); 143 void tempDisableBR(bool);
144 /** This todo has been modified */ 144 /** This todo has been modified */
145 void todoModified(Todo *, int); 145 void todoModified(Todo *, int);
146 146
147 /** when change is made to options dialog, the topwidget will catch this 147 /** when change is made to options dialog, the topwidget will catch this
148 * and emit this signal which notifies all widgets which have registered 148 * and emit this signal which notifies all widgets which have registered
149 * for notification to update their settings. */ 149 * for notification to update their settings. */
150 void configChanged(); 150 void configChanged();
151 /** emitted when the topwidget is closing down, so that any attached 151 /** emitted when the topwidget is closing down, so that any attached
152 child windows can also close. */ 152 child windows can also close. */
153 void closingDown(); 153 void closingDown();
154 /** emitted right before we die */ 154 /** emitted right before we die */
155 void closed(QWidget *); 155 void closed(QWidget *);
156 156
157 /** Emitted when state of modified flag changes */ 157 /** Emitted when state of modified flag changes */
158 void modifiedChanged(bool); 158 void modifiedChanged(bool);
159 void signalmodified(); 159 void signalmodified();
160 160
161 /** Emitted when state of read-only flag changes */ 161 /** Emitted when state of read-only flag changes */
162 void readOnlyChanged(bool); 162 void readOnlyChanged(bool);
163 163
164 /** Emitted when the unit of navigation changes */ 164 /** Emitted when the unit of navigation changes */
165 void changeNavStringPrev(const QString &); 165 void changeNavStringPrev(const QString &);
166 void changeNavStringNext(const QString &); 166 void changeNavStringNext(const QString &);
167 167
168 /** Emitted when state of events selection has changed and user is organizer*/ 168 /** Emitted when state of events selection has changed and user is organizer*/
169 void organizerEventsSelected(bool); 169 void organizerEventsSelected(bool);
170 /** Emitted when state of events selection has changed and user is attendee*/ 170 /** Emitted when state of events selection has changed and user is attendee*/
171 void groupEventsSelected(bool); 171 void groupEventsSelected(bool);
172 /** 172 /**
173 Emitted when an incidence gets selected. If the selection is cleared the 173 Emitted when an incidence gets selected. If the selection is cleared the
174 signal is emitted with 0 as argument. 174 signal is emitted with 0 as argument.
175 */ 175 */
176 void incidenceSelected( Incidence * ); 176 void incidenceSelected( Incidence * );
177 /** Emitted, when a todoitem is selected or deselected. */ 177 /** Emitted, when a todoitem is selected or deselected. */
178 void todoSelected( bool ); 178 void todoSelected( bool );
179 179
180 /** 180 /**
181 Emitted, when clipboard content changes. Parameter indicates if paste 181 Emitted, when clipboard content changes. Parameter indicates if paste
182 is possible or not. 182 is possible or not.
183 */ 183 */
184 void pasteEnabled(bool); 184 void pasteEnabled(bool);
185 185
186 /** Emitted, when the number of incoming messages has changed. */ 186 /** Emitted, when the number of incoming messages has changed. */
187 void numIncomingChanged(int); 187 void numIncomingChanged(int);
188 188
189 /** Emitted, when the number of outgoing messages has changed. */ 189 /** Emitted, when the number of outgoing messages has changed. */
190 void numOutgoingChanged(int); 190 void numOutgoingChanged(int);
191 191
192 /** Send status message, which can e.g. be displayed in the status bar. */ 192 /** Send status message, which can e.g. be displayed in the status bar. */
193 void statusMessage(const QString &); 193 void statusMessage(const QString &);
194 194
195 void calendarViewExpanded( bool ); 195 void calendarViewExpanded( bool );
196 void updateSearchDialog(); 196 void updateSearchDialog();
197 void filtersUpdated();
197 198
198 199
199 public slots: 200 public slots:
200 void checkAlarms(); 201 void checkAlarms();
201 void slotprintSelInc(); 202 void slotprintSelInc();
202 void showNextAlarms(); 203 void showNextAlarms();
203 void showOpenError(); 204 void showOpenError();
204 void watchSavedFile(); 205 void watchSavedFile();
205 void recheckTimerAlarm(); 206 void recheckTimerAlarm();
206 void checkNextTimerAlarm(); 207 void checkNextTimerAlarm();
207 void addAlarm(const QDateTime &qdt, const QString &noti ); 208 void addAlarm(const QDateTime &qdt, const QString &noti );
208 void addSuspendAlarm(const QDateTime &qdt, const QString &noti ); 209 void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
209 void removeAlarm(const QDateTime &qdt, const QString &noti ); 210 void removeAlarm(const QDateTime &qdt, const QString &noti );
210 211
211 /** options dialog made a changed to the configuration. we catch this 212 /** options dialog made a changed to the configuration. we catch this
212 * and notify all widgets which need to update their configuration. */ 213 * and notify all widgets which need to update their configuration. */
213 void updateConfig(); 214 void updateConfig();
214 215
215 void insertBirthdays(const QString& uid, const QStringList& birthdayList, 216 void insertBirthdays(const QString& uid, const QStringList& birthdayList,
216 const QStringList& anniversaryList, const QStringList& realNameList, 217 const QStringList& anniversaryList, const QStringList& realNameList,
217 const QStringList& emailList, const QStringList& assembledNameList, 218 const QStringList& emailList, const QStringList& assembledNameList,
218 const QStringList& uidList); 219 const QStringList& uidList);
219 220
220 /** 221 /**
221 Load calendar from file \a filename. If \a merge is true, load 222 Load calendar from file \a filename. If \a merge is true, load
222 calendar into existing one, if it is false, clear calendar, before 223 calendar into existing one, if it is false, clear calendar, before
223 loading. Return true, if calendar could be successfully loaded. 224 loading. Return true, if calendar could be successfully loaded.
224 */ 225 */
225 bool openCalendar(QString filename, bool merge=false); 226 bool openCalendar(QString filename, bool merge=false);
226 bool loadCalendars(); 227 bool loadCalendars();
227 bool saveCalendars(); 228 bool saveCalendars();
228 bool restoreCalendarSettings(); 229 bool restoreCalendarSettings();
229 bool addCalendar( KopiCalendarFile * ); 230 bool addCalendar( KopiCalendarFile * );
230 void addCalendarId( int id ); 231 void addCalendarId( int id );
231 bool syncCalendar(QString filename,int mode = 0 ); 232 bool syncCalendar(QString filename,int mode = 0 );
232 233
233 /** 234 /**
234 Save calendar data to file. Return true if calendar could be 235 Save calendar data to file. Return true if calendar could be
235 successfully saved. 236 successfully saved.
236 */ 237 */
237 bool saveCalendar(QString filename); 238 bool saveCalendar(QString filename);
238 239
239 /** 240 /**
240 Close calendar. Clear calendar data and reset views to display an empty 241 Close calendar. Clear calendar data and reset views to display an empty
241 calendar. 242 calendar.
242 */ 243 */
243 void closeCalendar(); 244 void closeCalendar();
244 245
245 /** Archive old events of calendar */ 246 /** Archive old events of calendar */
246 void archiveCalendar(); 247 void archiveCalendar();
247 248
248 void showIncidence(); 249 void showIncidence();
249 void editIncidence(); 250 void editIncidence();
250 void editIncidenceDescription(); 251 void editIncidenceDescription();
251 void deleteIncidence(); 252 void deleteIncidence();
252 void cloneIncidence(); 253 void cloneIncidence();
253 void moveIncidence(); 254 void moveIncidence();
254 void beamIncidence(); 255 void beamIncidence();
255 void toggleCancelIncidence(); 256 void toggleCancelIncidence();
256 257
257 /** create an editeventwin with supplied date/time, and if bool is true, 258 /** create an editeventwin with supplied date/time, and if bool is true,
258 * make the event take all day. */ 259 * make the event take all day. */
259 void newEvent(QDateTime, QDateTime, bool allDay ); 260 void newEvent(QDateTime, QDateTime, bool allDay );
260 void newEvent(QDateTime, QDateTime); 261 void newEvent(QDateTime, QDateTime);
261 void newEvent(QDateTime fh); 262 void newEvent(QDateTime fh);
262 void newEvent(QDate dt); 263 void newEvent(QDate dt);
263 /** create new event without having a date hint. Takes current date as 264 /** create new event without having a date hint. Takes current date as
264 default hint. */ 265 default hint. */
265 void newEvent(); 266 void newEvent();
266 void newFloatingEvent(); 267 void newFloatingEvent();
267 268
268 /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ 269 /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/
269 void showIncidence(Incidence *); 270 void showIncidence(Incidence *);
270 void showIncidence(QString uid); 271 void showIncidence(QString uid);
271 /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ 272 /** Create an editor for the supplied incidence. It calls the correct editXXX method*/
272 void editIncidence(Incidence *); 273 void editIncidence(Incidence *);
273 /** Delete the supplied incidence. It calls the correct deleteXXX method*/ 274 /** Delete the supplied incidence. It calls the correct deleteXXX method*/
274 void deleteIncidence(Incidence *); 275 void deleteIncidence(Incidence *);
275 void cloneIncidence(Incidence *); 276 void cloneIncidence(Incidence *);
276 void cancelIncidence(Incidence *); 277 void cancelIncidence(Incidence *);
277 /** Create an editor for the supplied event. */ 278 /** Create an editor for the supplied event. */
278 void editEvent(Event *); 279 void editEvent(Event *);
279 /** Delete the supplied event. */ 280 /** Delete the supplied event. */
280 void deleteEvent(Event *); 281 void deleteEvent(Event *);
281 /** Delete the event with the given unique ID. Returns false, if event wasn't 282 /** Delete the event with the given unique ID. Returns false, if event wasn't
282 found. */ 283 found. */
283 bool deleteEvent(const QString &uid); 284 bool deleteEvent(const QString &uid);
284 /** Create a read-only viewer dialog for the supplied event. */ 285 /** Create a read-only viewer dialog for the supplied event. */
285 void showEvent(Event *); 286 void showEvent(Event *);
286 287
287 void editJournal(Journal *); 288 void editJournal(Journal *);
288 void showJournal(Journal *); 289 void showJournal(Journal *);
289 void deleteJournal(Journal *); 290 void deleteJournal(Journal *);
290 /** Create an editor dialog for a todo */ 291 /** Create an editor dialog for a todo */
291 void editTodo(Todo *); 292 void editTodo(Todo *);
292 /** Create a read-only viewer dialog for the supplied todo */ 293 /** Create a read-only viewer dialog for the supplied todo */
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 472a978..13e186d 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1208,193 +1208,193 @@ void MainWindow::initActions()
1208 mView, SLOT( goPrevious() ) ); 1208 mView, SLOT( goPrevious() ) );
1209 action->addTo( navigatorToolBar ); 1209 action->addTo( navigatorToolBar );
1210 } 1210 }
1211 icon = loadPixmap( pathString + "today" ); 1211 icon = loadPixmap( pathString + "today" );
1212 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1212 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1213 if (p-> mShowIconToday) 1213 if (p-> mShowIconToday)
1214 today_action->addTo( navigatorToolBar ); 1214 today_action->addTo( navigatorToolBar );
1215 icon = loadPixmap( pathString + "1rightarrowB" ); 1215 icon = loadPixmap( pathString + "1rightarrowB" );
1216 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1216 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1217 if (p-> mShowIconForward) { 1217 if (p-> mShowIconForward) {
1218 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1218 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1219 connect( action, SIGNAL( activated() ), 1219 connect( action, SIGNAL( activated() ),
1220 mView, SLOT( goNext() ) ); 1220 mView, SLOT( goNext() ) );
1221 action->addTo( navigatorToolBar ); 1221 action->addTo( navigatorToolBar );
1222 } 1222 }
1223 icon = loadPixmap( pathString + "2rightarrowB" ); 1223 icon = loadPixmap( pathString + "2rightarrowB" );
1224 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1224 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1225 if (p-> mShowIconForwardFast) { 1225 if (p-> mShowIconForwardFast) {
1226 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1226 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1227 connect( action, SIGNAL( activated() ), 1227 connect( action, SIGNAL( activated() ),
1228 mView, SLOT( goNextMonth() ) ); 1228 mView, SLOT( goNextMonth() ) );
1229 action->addTo( navigatorToolBar ); 1229 action->addTo( navigatorToolBar );
1230 } 1230 }
1231 1231
1232 1232
1233 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1233 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1234 1234
1235 1235
1236 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); 1236 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1237 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); 1237 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1238 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); 1238 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1239 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); 1239 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1240 1240
1241 if (p-> mShowIconNewEvent) 1241 if (p-> mShowIconNewEvent)
1242 configureToolBarMenu->setItemChecked( 10, true ); 1242 configureToolBarMenu->setItemChecked( 10, true );
1243 if (p->mShowIconNewTodo ) 1243 if (p->mShowIconNewTodo )
1244 configureToolBarMenu->setItemChecked( 20, true ); 1244 configureToolBarMenu->setItemChecked( 20, true );
1245 if (p-> mShowIconSearch) 1245 if (p-> mShowIconSearch)
1246 configureToolBarMenu->setItemChecked( 120, true ); 1246 configureToolBarMenu->setItemChecked( 120, true );
1247 if (p-> mShowIconList) 1247 if (p-> mShowIconList)
1248 configureToolBarMenu->setItemChecked( 30, true ); 1248 configureToolBarMenu->setItemChecked( 30, true );
1249 if (p-> mShowIconDay1) 1249 if (p-> mShowIconDay1)
1250 configureToolBarMenu->setItemChecked( 40, true ); 1250 configureToolBarMenu->setItemChecked( 40, true );
1251 if (p-> mShowIconDay5) 1251 if (p-> mShowIconDay5)
1252 configureToolBarMenu->setItemChecked( 50, true ); 1252 configureToolBarMenu->setItemChecked( 50, true );
1253 if (p-> mShowIconDay6) 1253 if (p-> mShowIconDay6)
1254 configureToolBarMenu->setItemChecked( 75, true ); 1254 configureToolBarMenu->setItemChecked( 75, true );
1255 if (p-> mShowIconDay7) 1255 if (p-> mShowIconDay7)
1256 configureToolBarMenu->setItemChecked( 60, true ); 1256 configureToolBarMenu->setItemChecked( 60, true );
1257 if (p-> mShowIconMonth) 1257 if (p-> mShowIconMonth)
1258 configureToolBarMenu->setItemChecked( 70, true ); 1258 configureToolBarMenu->setItemChecked( 70, true );
1259 if (p-> mShowIconTodoview) 1259 if (p-> mShowIconTodoview)
1260 configureToolBarMenu->setItemChecked( 80, true ); 1260 configureToolBarMenu->setItemChecked( 80, true );
1261 if (p-> mShowIconBackFast) 1261 if (p-> mShowIconBackFast)
1262 configureToolBarMenu->setItemChecked( 200, true ); 1262 configureToolBarMenu->setItemChecked( 200, true );
1263 if (p-> mShowIconBack) 1263 if (p-> mShowIconBack)
1264 configureToolBarMenu->setItemChecked( 210, true ); 1264 configureToolBarMenu->setItemChecked( 210, true );
1265 if (p-> mShowIconToday) 1265 if (p-> mShowIconToday)
1266 configureToolBarMenu->setItemChecked( 130, true ); 1266 configureToolBarMenu->setItemChecked( 130, true );
1267 if (p-> mShowIconForward) 1267 if (p-> mShowIconForward)
1268 configureToolBarMenu->setItemChecked( 220, true ); 1268 configureToolBarMenu->setItemChecked( 220, true );
1269 if (p-> mShowIconForwardFast) 1269 if (p-> mShowIconForwardFast)
1270 configureToolBarMenu->setItemChecked( 230, true ); 1270 configureToolBarMenu->setItemChecked( 230, true );
1271 if (p-> mShowIconNextDays) 1271 if (p-> mShowIconNextDays)
1272 configureToolBarMenu->setItemChecked( 100, true ); 1272 configureToolBarMenu->setItemChecked( 100, true );
1273 if (p-> mShowIconNext) 1273 if (p-> mShowIconNext)
1274 configureToolBarMenu->setItemChecked( 110, true ); 1274 configureToolBarMenu->setItemChecked( 110, true );
1275 if (p-> mShowIconJournal) 1275 if (p-> mShowIconJournal)
1276 configureToolBarMenu->setItemChecked( 90, true ); 1276 configureToolBarMenu->setItemChecked( 90, true );
1277 if (p-> mShowIconWhatsThis) 1277 if (p-> mShowIconWhatsThis)
1278 configureToolBarMenu->setItemChecked( 300, true ); 1278 configureToolBarMenu->setItemChecked( 300, true );
1279 if (p-> mShowIconWeekNum) 1279 if (p-> mShowIconWeekNum)
1280 configureToolBarMenu->setItemChecked( 400, true ); 1280 configureToolBarMenu->setItemChecked( 400, true );
1281 if (!p-> mShowIconStretch) { 1281 if (!p-> mShowIconStretch) {
1282 QLabel* dummy = new QLabel( iconToolBar ); 1282 QLabel* dummy = new QLabel( iconToolBar );
1283 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1283 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1284 dummy->setMinimumWidth( 0 ); 1284 dummy->setMinimumWidth( 0 );
1285 iconToolBar->setStretchableWidget ( dummy ) ; 1285 iconToolBar->setStretchableWidget ( dummy ) ;
1286 } 1286 }
1287 else { 1287 else {
1288 iconToolBar->setHorizontalStretchable (true ); 1288 iconToolBar->setHorizontalStretchable (true );
1289 viewToolBar->setHorizontalStretchable (true ); 1289 viewToolBar->setHorizontalStretchable (true );
1290 navigatorToolBar->setHorizontalStretchable (true ); 1290 navigatorToolBar->setHorizontalStretchable (true );
1291 iconToolBar->setVerticalStretchable (true ); 1291 iconToolBar->setVerticalStretchable (true );
1292 viewToolBar->setVerticalStretchable (true ); 1292 viewToolBar->setVerticalStretchable (true );
1293 navigatorToolBar->setVerticalStretchable (true ); 1293 navigatorToolBar->setVerticalStretchable (true );
1294 configureToolBarMenu->setItemChecked( 5, true ); 1294 configureToolBarMenu->setItemChecked( 5, true );
1295 } 1295 }
1296 if (p-> mShowIconFilter) 1296 if (p-> mShowIconFilter)
1297 configureToolBarMenu->setItemChecked( 7, true ); 1297 configureToolBarMenu->setItemChecked( 7, true );
1298 if (p-> mShowIconOnetoolbar) 1298 if (p-> mShowIconOnetoolbar)
1299 configureToolBarMenu->setItemChecked( 6, true ); 1299 configureToolBarMenu->setItemChecked( 6, true );
1300 1300
1301 1301
1302 if ( filterMenubar ) { 1302 if ( filterMenubar ) {
1303 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); 1303 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) );
1304 connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); 1304 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) );
1305 } 1305 }
1306 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1306 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1307 configureAgenda( p->mHourSize ); 1307 configureAgenda( p->mHourSize );
1308 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1308 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1309} 1309}
1310 1310
1311void MainWindow::exportToPhone( int mode ) 1311void MainWindow::exportToPhone( int mode )
1312{ 1312{
1313 1313
1314 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1314 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1315 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1315 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1316 KOex2phonePrefs ex2phone; 1316 KOex2phonePrefs ex2phone;
1317 1317
1318 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1318 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1319 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1319 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1320 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1320 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1321 if ( mode == 1 ) 1321 if ( mode == 1 )
1322 ex2phone.setCaption(i18n("Export complete calendar")); 1322 ex2phone.setCaption(i18n("Export complete calendar"));
1323 if ( mode == 2 ) 1323 if ( mode == 2 )
1324 ex2phone.setCaption(i18n("Export filtered calendar")); 1324 ex2phone.setCaption(i18n("Export filtered calendar"));
1325 1325
1326 if ( !ex2phone.exec() ) { 1326 if ( !ex2phone.exec() ) {
1327 return; 1327 return;
1328 } 1328 }
1329 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1329 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1330 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1330 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1331 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1331 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1332 1332
1333 int inFuture = 0; 1333 int inFuture = 0;
1334 if ( ex2phone.mWriteBackFuture->isChecked() ) 1334 if ( ex2phone.mWriteBackFuture->isChecked() )
1335 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1335 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1336 QPtrList<Incidence> delSel; 1336 QPtrList<Incidence> delSel;
1337 if ( mode == 1 ) 1337 if ( mode == 1 )
1338 delSel = mCalendar->rawIncidences(); 1338 delSel = mCalendar->rawIncidences();
1339 if ( mode == 2 ) 1339 if ( mode == 2 )
1340 delSel = mCalendar->incidences(); 1340 delSel = mCalendar->incidences();
1341 CalendarLocal* cal = new CalendarLocal(); 1341 CalendarLocal* cal = new CalendarLocal();
1342 cal->setLocalTime(); 1342 cal->setLocalTime();
1343 Incidence *incidence = delSel.first(); 1343 Incidence *incidence = delSel.first();
1344 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1344 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1345 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1345 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1346 while ( incidence ) { 1346 while ( incidence ) {
1347 if ( incidence->typeID() != journalID ) { 1347 if ( incidence->typeID() != journalID ) {
1348 bool add = true; 1348 bool add = true;
1349 if ( inFuture ) { 1349 if ( inFuture ) {
1350 QDateTime dt; 1350 QDateTime dt;
1351 if ( incidence->typeID() == todoID ) { 1351 if ( incidence->typeID() == todoID ) {
1352 Todo * t = (Todo*)incidence; 1352 Todo * t = (Todo*)incidence;
1353 if ( t->hasDueDate() ) 1353 if ( t->hasDueDate() )
1354 dt = t->dtDue(); 1354 dt = t->dtDue();
1355 else 1355 else
1356 dt = cur.addSecs( 62 ); 1356 dt = cur.addSecs( 62 );
1357 } 1357 }
1358 else { 1358 else {
1359 bool ok; 1359 bool ok;
1360 dt = incidence->getNextOccurence( cur, &ok ); 1360 dt = incidence->getNextOccurence( cur, &ok );
1361 if ( !ok ) 1361 if ( !ok )
1362 dt = cur.addSecs( -62 ); 1362 dt = cur.addSecs( -62 );
1363 } 1363 }
1364 if ( dt < cur || dt > end ) { 1364 if ( dt < cur || dt > end ) {
1365 add = false; 1365 add = false;
1366 } 1366 }
1367 } 1367 }
1368 if ( add ) { 1368 if ( add ) {
1369 Incidence *in = incidence->clone(); 1369 Incidence *in = incidence->clone();
1370 cal->addIncidence( in ); 1370 cal->addIncidence( in );
1371 } 1371 }
1372 } 1372 }
1373 incidence = delSel.next(); 1373 incidence = delSel.next();
1374 } 1374 }
1375 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1375 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1376 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1376 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1377 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1377 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1378 1378
1379 setCaption( i18n("Writing to phone...")); 1379 setCaption( i18n("Writing to phone..."));
1380 if ( PhoneFormat::writeToPhone( cal ) ) 1380 if ( PhoneFormat::writeToPhone( cal ) )
1381 setCaption( i18n("Export to phone successful!")); 1381 setCaption( i18n("Export to phone successful!"));
1382 else 1382 else
1383 setCaption( i18n("Error exporting to phone!")); 1383 setCaption( i18n("Error exporting to phone!"));
1384 delete cal; 1384 delete cal;
1385} 1385}
1386 1386
1387 1387
1388void MainWindow::setDefaultPreferences() 1388void MainWindow::setDefaultPreferences()
1389{ 1389{
1390 KOPrefs *p = KOPrefs::instance(); 1390 KOPrefs *p = KOPrefs::instance();
1391 1391
1392 p->mCompactDialogs = true; 1392 p->mCompactDialogs = true;
1393 p->mConfirm = true; 1393 p->mConfirm = true;
1394 // p->mEnableQuickTodo = false; 1394 // p->mEnableQuickTodo = false;
1395 1395
1396} 1396}
1397 1397
1398QString MainWindow::resourcePath() 1398QString MainWindow::resourcePath()
1399{ 1399{
1400 return KGlobal::iconLoader()->iconPath(); 1400 return KGlobal::iconLoader()->iconPath();