summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/bell.pngbin1449 -> 1128 bytes
-rw-r--r--bin/kdepim/korganizer/eye.pngbin1339 -> 1475 bytes
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt3
-rw-r--r--korganizer/kofilterview.cpp28
-rw-r--r--korganizer/kofilterview.h32
5 files changed, 52 insertions, 11 deletions
diff --git a/bin/kdepim/korganizer/bell.png b/bin/kdepim/korganizer/bell.png
index 0b15133..2239c60 100644
--- a/bin/kdepim/korganizer/bell.png
+++ b/bin/kdepim/korganizer/bell.png
Binary files differ
diff --git a/bin/kdepim/korganizer/eye.png b/bin/kdepim/korganizer/eye.png
index fd70996..c2a0251 100644
--- a/bin/kdepim/korganizer/eye.png
+++ b/bin/kdepim/korganizer/eye.png
Binary files differ
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index b60ae7b..578f78d 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1414,28 +1414,31 @@
1414{ "Kx/Pi","Kx/Pi" }, 1414{ "Kx/Pi","Kx/Pi" },
1415{ "Backup","Backup" }, 1415{ "Backup","Backup" },
1416{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, 1416{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" },
1417{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, 1417{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" },
1418{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, 1418{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" },
1419{ "Choose Color","Wähle Farbe" }, 1419{ "Choose Color","Wähle Farbe" },
1420{ " OK "," OK " }, 1420{ " OK "," OK " },
1421{ " Cancel "," Abbrechen " }, 1421{ " Cancel "," Abbrechen " },
1422{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, 1422{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" },
1423{ "Matching items will be removed from list","Passende werden von der Liste entfernt" }, 1423{ "Matching items will be removed from list","Passende werden von der Liste entfernt" },
1424{ "Search on displayed list only","Suche auf der dargestellten Liste" }, 1424{ "Search on displayed list only","Suche auf der dargestellten Liste" },
1425{ "List will be cleared before search","Liste wird vor der Suche gelöscht" }, 1425{ "List will be cleared before search","Liste wird vor der Suche gelöscht" },
1426{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, 1426{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" },
1427{ "%1\nis running!","%1\nist am Laufen!" }, 1427{ "%1\nis running!","%1\nist am Laufen!" },
1428{ "Additional Comment:","Zusätzlicher Kommentar:" }, 1428{ "Additional Comment:","Zusätzlicher Kommentar:" },
1429{ "Stop and save","Stopp und Speichern" }, 1429{ "Stop and save","Stopp und Speichern" },
1430{ "Continue running","Weiter laufen lassen" }, 1430{ "Continue running","Weiter laufen lassen" },
1431{ "Stop - do not save","Stopp - nicht Speichern" }, 1431{ "Stop - do not save","Stopp - nicht Speichern" },
1432{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, 1432{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" },
1433{ "Time mismatch!","Zeiten stimmen nicht!" }, 1433{ "Time mismatch!","Zeiten stimmen nicht!" },
1434{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, 1434{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" },
1435{ "Yes, stop todo","Ja, stoppe Todo" }, 1435{ "Yes, stop todo","Ja, stoppe Todo" },
1436{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, 1436{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" },
1437{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, 1437{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" },
1438{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." },
1439{ "","" },
1440{ "","" },
1438{ "","" }, 1441{ "","" },
1439{ "","" }, 1442{ "","" },
1440{ "","" }, 1443{ "","" },
1441{ "","" }, \ No newline at end of file 1444{ "","" }, \ No newline at end of file
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ce2880a..9709324 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -124,50 +124,50 @@ KOCalEditView::KOCalEditView(QWidget* parent,
124KOCalEditView::~KOCalEditView() 124KOCalEditView::~KOCalEditView()
125{ 125{
126 // no need to delete child widgets, Qt does it all for us 126 // no need to delete child widgets, Qt does it all for us
127} 127}
128void KOCalEditView::selectCal(int id ,bool b) 128void KOCalEditView::selectCal(int id ,bool b)
129{ 129{
130 KOPrefs::instance()->getCalendar( id )->isEnabled = b; 130 KOPrefs::instance()->getCalendar( id )->isEnabled = b;
131 emit calendarEnabled ( id, b ); 131 emit calendarEnabled ( id, b );
132 emit needsUpdate(); 132 emit needsUpdate();
133 133
134} 134}
135void KOCalEditView::selectStdCal( int id, bool b ) 135void KOCalEditView::selectStdCal( int id, bool b )
136{ 136{
137 137
138 if ( !b ) { 138 if ( !b ) {
139 KOCalCheckButton* it = (KOCalCheckButton*) sender(); 139 KOCalCheckButton* it = (KOCalCheckButton*) sender();
140 if ( it ) { 140 if ( it ) {
141 it->blockSignals( true ); 141 it->blockSignals( true );
142 it->setChecked( true ); 142 it->setChecked( true );
143 it->blockSignals( false ); 143 it->blockSignals( false );
144 return; 144 return;
145 } 145 }
146 return; 146 return;
147 } 147 }
148 KOCalCheckButton* sen = (KOCalCheckButton*) sender(); 148 KOCalRadioButton* sen = (KOCalRadioButton*) sender();
149 KOCalCheckButton* it = mStdandardB.first(); 149 KOCalRadioButton* it = mStdandardB.first();
150 while ( it ) { 150 while ( it ) {
151 if ( it->isChecked() ) { 151 if ( it->isChecked() ) {
152 if ( it != sen ) { 152 if ( it != sen ) {
153 it->blockSignals( true ); 153 it->blockSignals( true );
154 it->setChecked( false ); 154 it->setChecked( false );
155 it->blockSignals( false ); 155 it->blockSignals( false );
156 break; 156 break;
157 } 157 }
158 } 158 }
159 it = mStdandardB.next(); 159 it = mStdandardB.next();
160 } 160 }
161 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 161 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
162 while ( kkf ) { 162 while ( kkf ) {
163 kkf->isStandard = false; 163 kkf->isStandard = false;
164 kkf = KOPrefs::instance()->mCalendars.next(); 164 kkf = KOPrefs::instance()->mCalendars.next();
165 } 165 }
166 KOPrefs::instance()->getCalendar( id )->isStandard = true; 166 KOPrefs::instance()->getCalendar( id )->isStandard = true;
167 emit setCalendarDefault ( id ); 167 emit setCalendarDefault ( id );
168} 168}
169 169
170void KOCalEditView::selectCalAlarm(int id ,bool b ) 170void KOCalEditView::selectCalAlarm(int id ,bool b )
171{ 171{
172 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; 172 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b;
173 emit alarmEnabled ( id , b ); 173 emit alarmEnabled ( id , b );
@@ -215,49 +215,51 @@ void KOCalEditView::infoCal( int id )
215 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 215 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
216 } 216 }
217 } 217 }
218 else 218 else
219 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 219 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
220} 220}
221void KOCalEditView::readConfig() 221void KOCalEditView::readConfig()
222{ 222{
223 223
224 mStdandardB.clear(); 224 mStdandardB.clear();
225 mEnabledB.clear(); 225 mEnabledB.clear();
226 mAlarmB.clear(); 226 mAlarmB.clear();
227 mROB.clear(); 227 mROB.clear();
228 228
229 if ( mw ) delete mw; 229 if ( mw ) delete mw;
230 mw = new QWidget ( viewport() ); 230 mw = new QWidget ( viewport() );
231 addChild(mw); 231 addChild(mw);
232 int ii = 0; 232 int ii = 0;
233 mainLayout = new QGridLayout ( mw , 2, 8 ); 233 mainLayout = new QGridLayout ( mw , 2, 8 );
234 mainLayout->setMargin( 2 ); 234 mainLayout->setMargin( 2 );
235 mainLayout->setSpacing( 2 ); 235 mainLayout->setSpacing( 2 );
236 QPushButton * addBut = new QPushButton ( mw ); 236 QPushButton * addBut = new QPushButton ( mw );
237 addBut->setFocusPolicy(NoFocus); 237 addBut->setFocusPolicy(NoFocus);
238 mainLayout->addWidget( addBut,0,0 ); 238 mainLayout->addWidget( addBut,0,0 );
239 addBut->setPixmap ( SmallIcon("greenhook16")); 239 addBut->setText( "D");
240 connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo()));
241 //addBut->setPixmap ( SmallIcon("greenhook16"));
240 addBut->setMaximumWidth( addBut->sizeHint().height() ); 242 addBut->setMaximumWidth( addBut->sizeHint().height() );
241 int max = addBut->sizeHint().height(); 243 int max = addBut->sizeHint().height();
242 addBut = new QPushButton ( mw ); 244 addBut = new QPushButton ( mw );
243 addBut->setFocusPolicy(NoFocus); 245 addBut->setFocusPolicy(NoFocus);
244 mainLayout->addWidget( addBut,0,++ii ); 246 mainLayout->addWidget( addBut,0,++ii );
245 addBut->setPixmap ( SmallIcon("eye")); 247 addBut->setPixmap ( SmallIcon("eye"));
246 connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); 248 connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
247 addBut->setMaximumWidth( addBut->sizeHint().height() ); 249 addBut->setMaximumWidth( addBut->sizeHint().height() );
248 250
249 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); 251 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw );
250 mainLayout->addWidget( lab,0,++ii ); 252 mainLayout->addWidget( lab,0,++ii );
251 //lab = new QLabel ( i18n(" "), mw ); 253 //lab = new QLabel ( i18n(" "), mw );
252 //mainLayout->addWidget( lab,0,++ii ); 254 //mainLayout->addWidget( lab,0,++ii );
253 //lab->setFixedWidth( 1 ); 255 //lab->setFixedWidth( 1 );
254 addBut = new QPushButton ( mw ); 256 addBut = new QPushButton ( mw );
255 addBut->setFocusPolicy(NoFocus); 257 addBut->setFocusPolicy(NoFocus);
256 mainLayout->addWidget( addBut,0,++ii ); 258 mainLayout->addWidget( addBut,0,++ii );
257 addBut->setPixmap ( SmallIcon("bell")); 259 addBut->setPixmap ( SmallIcon("bell"));
258 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); 260 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
259 addBut->setMaximumWidth( addBut->sizeHint().height() ); 261 addBut->setMaximumWidth( addBut->sizeHint().height() );
260 262
261 addBut = new QPushButton ( mw ); 263 addBut = new QPushButton ( mw );
262 addBut->setFocusPolicy(NoFocus); 264 addBut->setFocusPolicy(NoFocus);
263 mainLayout->addWidget( addBut,0,++ii ); 265 mainLayout->addWidget( addBut,0,++ii );
@@ -269,56 +271,56 @@ void KOCalEditView::readConfig()
269 271
270 addBut = new QPushButton ( mw ); 272 addBut = new QPushButton ( mw );
271 addBut->setFocusPolicy(NoFocus); 273 addBut->setFocusPolicy(NoFocus);
272 mainLayout->addWidget( addBut,0,++ii ); 274 mainLayout->addWidget( addBut,0,++ii );
273 addBut->setPixmap ( SmallIcon("plus")); 275 addBut->setPixmap ( SmallIcon("plus"));
274 connect(addBut,SIGNAL(clicked()),SLOT(addCal())); 276 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
275 277
276 lab = new QLabel ( " ", mw ); 278 lab = new QLabel ( " ", mw );
277 mainLayout->addWidget( lab,0,++ii ); 279 mainLayout->addWidget( lab,0,++ii );
278 280
279 281
280#if 0 282#if 0
281 addBut = new QPushButton ( mw ); 283 addBut = new QPushButton ( mw );
282 mainLayout->addWidget( addBut,0,6 ); 284 mainLayout->addWidget( addBut,0,6 );
283 addBut->setPixmap ( SmallIcon("minus")); 285 addBut->setPixmap ( SmallIcon("minus"));
284 connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); 286 connect(addBut,SIGNAL(clicked()),SLOT(deleteAll()));
285 addBut->setMaximumWidth( addBut->sizeHint().height() ); 287 addBut->setMaximumWidth( addBut->sizeHint().height() );
286#endif 288#endif
287 289
288 290
289 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 291 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
290 int row = 1; 292 int row = 1;
291 while ( kkf ) { 293 while ( kkf ) {
292 int iii = 0; 294 int iii = 0;
293 KOCalCheckButton* cb = new KOCalCheckButton( mw ); 295 KOCalRadioButton* rb = new KOCalRadioButton( mw );
294 mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); 296 mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb );
295 cb->setChecked( kkf->isStandard ); 297 rb->setChecked( kkf->isStandard );
296 cb->setNum( kkf->mCalNumber ); 298 rb->setNum( kkf->mCalNumber );
297 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); 299 connect (rb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) );
298 if ( kkf->mErrorOnLoad || kkf->isReadOnly ) 300 if ( kkf->mErrorOnLoad || kkf->isReadOnly )
299 cb->setEnabled( false ); 301 rb->setEnabled( false );
300 cb = new KOCalCheckButton( mw ); 302 KOCalCheckButton* cb = new KOCalCheckButton( mw );
301 mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); 303 mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb );
302 cb->setChecked( kkf->isEnabled ); 304 cb->setChecked( kkf->isEnabled );
303 cb->setNum( kkf->mCalNumber ); 305 cb->setNum( kkf->mCalNumber );
304 if ( kkf->mErrorOnLoad ) 306 if ( kkf->mErrorOnLoad )
305 cb->setEnabled( false ); 307 cb->setEnabled( false );
306 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); 308 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) );
307 KOCalButton* name = new KOCalButton( mw ); 309 KOCalButton* name = new KOCalButton( mw );
308 name->setNum( kkf->mCalNumber ); 310 name->setNum( kkf->mCalNumber );
309 name->setText( kkf->mName ); 311 name->setText( kkf->mName );
310 mainLayout->addWidget( name,row,++iii ); 312 mainLayout->addWidget( name,row,++iii );
311 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); 313 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) );
312 //lab = new QLabel (" ", mw ); 314 //lab = new QLabel (" ", mw );
313 //mainLayout->addWidget( lab,row,++iii ); 315 //mainLayout->addWidget( lab,row,++iii );
314 cb = new KOCalCheckButton( mw ); 316 cb = new KOCalCheckButton( mw );
315 mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); 317 mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb );
316 cb->setChecked( kkf->isAlarmEnabled ); 318 cb->setChecked( kkf->isAlarmEnabled );
317 cb->setNum( kkf->mCalNumber ); 319 cb->setNum( kkf->mCalNumber );
318 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); 320 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) );
319 if ( kkf->mErrorOnLoad ) 321 if ( kkf->mErrorOnLoad )
320 cb->setEnabled( false ); 322 cb->setEnabled( false );
321 cb = new KOCalCheckButton( mw ); 323 cb = new KOCalCheckButton( mw );
322 mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); 324 mainLayout->addWidget( cb,row,++iii );mROB.append( cb );
323 cb->setChecked( kkf->isReadOnly ); 325 cb->setChecked( kkf->isReadOnly );
324 cb->setNum( kkf->mCalNumber ); 326 cb->setNum( kkf->mCalNumber );
@@ -326,48 +328,54 @@ void KOCalEditView::readConfig()
326 if ( kkf->mErrorOnLoad ) 328 if ( kkf->mErrorOnLoad )
327 cb->setEnabled( false ); 329 cb->setEnabled( false );
328 if ( row > 1) { 330 if ( row > 1) {
329 KColorButton *colb = new KColorButton( mw ); 331 KColorButton *colb = new KColorButton( mw );
330 mainLayout->addWidget( colb,row,++iii ); 332 mainLayout->addWidget( colb,row,++iii );
331 colb->setID( kkf->mCalNumber ); 333 colb->setID( kkf->mCalNumber );
332 colb->setColor( kkf->mDefaultColor ); 334 colb->setColor( kkf->mDefaultColor );
333 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); 335 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) );
334 KOCalButton* calb = new KOCalButton( mw ); 336 KOCalButton* calb = new KOCalButton( mw );
335 mainLayout->addWidget( calb,row,++iii ); 337 mainLayout->addWidget( calb,row,++iii );
336 calb->setNum( kkf->mCalNumber ); 338 calb->setNum( kkf->mCalNumber );
337 calb->setPixmap ( SmallIcon("minus")); 339 calb->setPixmap ( SmallIcon("minus"));
338 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); 340 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) );
339 int hei = calb->sizeHint().height(); 341 int hei = calb->sizeHint().height();
340 //calb->setMaximumSize( hei*9/10, hei*9/10 ); 342 //calb->setMaximumSize( hei*9/10, hei*9/10 );
341 } 343 }
342 ++row; 344 ++row;
343 kkf = KOPrefs::instance()->mCalendars.next(); 345 kkf = KOPrefs::instance()->mCalendars.next();
344 } 346 }
345 lab = new QLabel ( "", mw ); 347 lab = new QLabel ( "", mw );
346 mainLayout->addWidget( lab,row,0 ); 348 mainLayout->addWidget( lab,row,0 );
347 mw->show(); 349 mw->show();
348 350
349} 351}
352
353
354void KOCalEditView::defaultInfo()
355{
356 KMessageBox::information( this, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
357}
350void KOCalEditView::addCal() 358void KOCalEditView::addCal()
351{ 359{
352 bool tryagain = true; 360 bool tryagain = true;
353 QString name, file; 361 QString name, file;
354 while ( tryagain ) { 362 while ( tryagain ) {
355 KONewCalPrefs prefs ( this ); 363 KONewCalPrefs prefs ( this );
356 prefs.nameE->setText( name ); 364 prefs.nameE->setText( name );
357 prefs.url->setURL( file ); 365 prefs.url->setURL( file );
358 if ( ! prefs.exec() ) 366 if ( ! prefs.exec() )
359 return; 367 return;
360 name = prefs.calName(); 368 name = prefs.calName();
361 file = prefs.calFileName(); 369 file = prefs.calFileName();
362 tryagain = false; 370 tryagain = false;
363 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 371 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
364 while ( kkf ) { 372 while ( kkf ) {
365 if ( kkf->mName == name ) { 373 if ( kkf->mName == name ) {
366 KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) ); 374 KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) );
367 name = ""; 375 name = "";
368 tryagain = true; 376 tryagain = true;
369 break; 377 break;
370 } 378 }
371 if ( kkf->mFileName == file ) { 379 if ( kkf->mFileName == file ) {
372 KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) ); 380 KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) );
373 tryagain = true; 381 tryagain = true;
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 5495d60..b57a6e9 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -4,48 +4,49 @@
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOFILTERVIEW_H 23#ifndef KOFILTERVIEW_H
24#define KOFILTERVIEW_H 24#define KOFILTERVIEW_H
25 25
26#include <qstring.h> 26#include <qstring.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qradiobutton.h>
28#include <qlayout.h> 29#include <qlayout.h>
29#include <qlabel.h> 30#include <qlabel.h>
30#include <qdialog.h> 31#include <qdialog.h>
31#include <qscrollview.h> 32#include <qscrollview.h>
32#include <qpushbutton.h> 33#include <qpushbutton.h>
33#include <kconfig.h> 34#include <kconfig.h>
34#include "kofilterview_base.h" 35#include "kofilterview_base.h"
35 36
36#include <libkcal/calfilter.h> 37#include <libkcal/calfilter.h>
37 38
38#include <kurlrequester.h> 39#include <kurlrequester.h>
39#include <klineedit.h> 40#include <klineedit.h>
40#include <kglobal.h> 41#include <kglobal.h>
41#include <kmessagebox.h> 42#include <kmessagebox.h>
42 43
43class QGridLayout; 44class QGridLayout;
44 45
45using namespace KCal; 46using namespace KCal;
46 47
47class KONewCalPrefs : public QDialog 48class KONewCalPrefs : public QDialog
48{ 49{
49 Q_OBJECT 50 Q_OBJECT
50 public: 51 public:
51 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) : 52 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) :
@@ -127,92 +128,121 @@ class KOCalCheckButton : public QCheckBox
127 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : 128 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
128 QCheckBox( parent, name) 129 QCheckBox( parent, name)
129 { 130 {
130 connect( this, SIGNAL( toggled ( bool ) ), 131 connect( this, SIGNAL( toggled ( bool ) ),
131 SLOT( bottonClicked( bool ) )); 132 SLOT( bottonClicked( bool ) ));
132 mNumber = -1; 133 mNumber = -1;
133 setFocusPolicy(NoFocus); 134 setFocusPolicy(NoFocus);
134 //setMaximumWidth( 10 ); 135 //setMaximumWidth( 10 );
135 136
136 } 137 }
137 void setNum ( int num ) {mNumber = num; } 138 void setNum ( int num ) {mNumber = num; }
138 signals: 139 signals:
139 void selectNum ( int, bool ); 140 void selectNum ( int, bool );
140private: 141private:
141 int mNumber; 142 int mNumber;
142 void keyPressEvent ( QKeyEvent * e ) 143 void keyPressEvent ( QKeyEvent * e )
143 { 144 {
144 e->ignore(); 145 e->ignore();
145 } 146 }
146 147
147private slots : 148private slots :
148 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } 149 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
149}; 150};
150 151
152class KOCalRadioButton : public QRadioButton
153{
154 Q_OBJECT
155 public:
156 KOCalRadioButton( QWidget *parent=0, const char *name=0 ) :
157 QRadioButton( parent, name)
158 {
159 connect( this, SIGNAL( toggled ( bool ) ),
160 SLOT( bottonClicked( bool ) ));
161 mNumber = -1;
162 setFocusPolicy(NoFocus);
163 //setMaximumWidth( 10 );
164
165 }
166 void setNum ( int num ) {mNumber = num; }
167 signals:
168 void selectNum ( int, bool );
169private:
170 int mNumber;
171 void keyPressEvent ( QKeyEvent * e )
172 {
173 e->ignore();
174 }
175
176private slots :
177 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
178};
179
151 180
152 181
153class KOFilterView : public KOFilterView_base 182class KOFilterView : public KOFilterView_base
154{ 183{
155 Q_OBJECT 184 Q_OBJECT
156 public: 185 public:
157 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 186 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
158 ~KOFilterView(); 187 ~KOFilterView();
159 188
160 void updateFilters(); 189 void updateFilters();
161 190
162 bool filtersEnabled(); 191 bool filtersEnabled();
163 void setFiltersEnabled(bool); 192 void setFiltersEnabled(bool);
164 CalFilter *selectedFilter(); 193 CalFilter *selectedFilter();
165 void setSelectedFilter(QString); 194 void setSelectedFilter(QString);
166 void setSelectedFilter( int ); 195 void setSelectedFilter( int );
167 196
168 signals: 197 signals:
169 void filterChanged(); 198 void filterChanged();
170 void editFilters(); 199 void editFilters();
171 200
172 private: 201 private:
173 QPtrList<CalFilter> *mFilters; 202 QPtrList<CalFilter> *mFilters;
174}; 203};
175 204
176class KOCalEditView : public QScrollView 205class KOCalEditView : public QScrollView
177{ 206{
178 Q_OBJECT 207 Q_OBJECT
179 public: 208 public:
180 KOCalEditView( QWidget* parent=0,const char* name=0); 209 KOCalEditView( QWidget* parent=0,const char* name=0);
181 ~KOCalEditView(); 210 ~KOCalEditView();
182 211
183 public slots: 212 public slots:
184 void addCal(); 213 void addCal();
185 void enableAll(); 214 void enableAll();
186 void enableAlarm(); 215 void enableAlarm();
187 void disableRO(); 216 void disableRO();
188 void deleteAll(); 217 void deleteAll();
189 void selectStdCal(int,bool ); 218 void selectStdCal(int,bool );
190 void selectCal(int,bool ); 219 void selectCal(int,bool );
191 void selectCalAlarm(int,bool ); 220 void selectCalAlarm(int,bool );
192 void selectReadOnly(int,bool ); 221 void selectReadOnly(int,bool );
193 void setColor(const QColor &,int) ; 222 void setColor(const QColor &,int) ;
194 void deleteCal(int) ; 223 void deleteCal(int) ;
195 void infoCal(int) ; 224 void infoCal(int) ;
196 void readConfig(); 225 void readConfig();
226 void defaultInfo();
197 signals: 227 signals:
198 void alarmEnabled ( int cal, bool enable ); 228 void alarmEnabled ( int cal, bool enable );
199 void calendarEnabled ( int cal, bool enable ); 229 void calendarEnabled ( int cal, bool enable );
200 void calendarReadonly ( int cal, bool readonly ); 230 void calendarReadonly ( int cal, bool readonly );
201 void setCalendarDefault ( int cal ); 231 void setCalendarDefault ( int cal );
202 void removeCalendar ( int cal ); 232 void removeCalendar ( int cal );
203 void calendarAdded( int ); 233 void calendarAdded( int );
204 void needsUpdate(); 234 void needsUpdate();
205 235
206 private: 236 private:
207 QWidget *mw; 237 QWidget *mw;
208 void toggleList ( QPtrList<KOCalCheckButton> ); 238 void toggleList ( QPtrList<KOCalCheckButton> );
209 QPtrList<KOCalCheckButton> mStdandardB; 239 QPtrList<KOCalRadioButton> mStdandardB;
210 QPtrList<KOCalCheckButton> mEnabledB; 240 QPtrList<KOCalCheckButton> mEnabledB;
211 QPtrList<KOCalCheckButton> mAlarmB; 241 QPtrList<KOCalCheckButton> mAlarmB;
212 QPtrList<KOCalCheckButton> mROB; 242 QPtrList<KOCalCheckButton> mROB;
213 QGridLayout* mainLayout; 243 QGridLayout* mainLayout;
214}; 244};
215 245
216 246
217 247
218#endif // KOFILTERVIEW_H 248#endif // KOFILTERVIEW_H