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
@@ -1390,52 +1390,55 @@
1390{ "Storage HowTo...","Speicherort HowTo..." }, 1390{ "Storage HowTo...","Speicherort HowTo..." },
1391{ "Timetracking HowTo...","Timetracking HowTo..." }, 1391{ "Timetracking HowTo...","Timetracking HowTo..." },
1392{ "Juni","Juni" }, 1392{ "Juni","Juni" },
1393{ "Juli","Juli" }, 1393{ "Juli","Juli" },
1394{ "ToDo:","ToDo:" }, 1394{ "ToDo:","ToDo:" },
1395{ "Set Calendar","Setze Kalender" }, 1395{ "Set Calendar","Setze Kalender" },
1396{ "Todo: %1","Todo: %1" }, 1396{ "Todo: %1","Todo: %1" },
1397{ ": (Prio ",": (Prio " }, 1397{ ": (Prio ",": (Prio " },
1398{ "Todos","Todos" }, 1398{ "Todos","Todos" },
1399{ "Todo Viewer","Todo Viewer" }, 1399{ "Todo Viewer","Todo Viewer" },
1400{ "Todo ","Todo " }, 1400{ "Todo ","Todo " },
1401{ " Calendar \n Resource "," Kalender \n Resource " }, 1401{ " Calendar \n Resource "," Kalender \n Resource " },
1402{ " Color "," Farbe " }, 1402{ " Color "," Farbe " },
1403{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, 1403{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" },
1404{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, 1404{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" },
1405{ "Add new Calendar","Füge Kalender hinzu" }, 1405{ "Add new Calendar","Füge Kalender hinzu" },
1406{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, 1406{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" },
1407{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, 1407{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" },
1408{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, 1408{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" },
1409{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, 1409{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" },
1410{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, 1410{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." },
1411{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, 1411{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" },
1412{ "Global application font for all apps:","Globale Schriftart:" }, 1412{ "Global application font for all apps:","Globale Schriftart:" },
1413{ "Application Font","Applikationsschriftart" }, 1413{ "Application Font","Applikationsschriftart" },
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
@@ -100,298 +100,306 @@ void KOFilterView::setSelectedFilter(QString filterName)
100 emit filterChanged(); 100 emit filterChanged();
101} 101}
102void KOFilterView::setSelectedFilter( int fil ) 102void KOFilterView::setSelectedFilter( int fil )
103{ 103{
104 if ( fil >= mSelectionCombo->count() ) 104 if ( fil >= mSelectionCombo->count() )
105 return; 105 return;
106 mSelectionCombo->setCurrentItem( fil ); 106 mSelectionCombo->setCurrentItem( fil );
107 emit filterChanged(); 107 emit filterChanged();
108} 108}
109 109
110 110
111 111
112KOCalEditView::KOCalEditView(QWidget* parent, 112KOCalEditView::KOCalEditView(QWidget* parent,
113 const char* name ) 113 const char* name )
114 : QScrollView(parent,name) 114 : QScrollView(parent,name)
115{ 115{
116 mw = 0; 116 mw = 0;
117 setResizePolicy( AutoOneFit ); 117 setResizePolicy( AutoOneFit );
118 setFrameStyle ( QFrame::Panel | QFrame::Plain ); 118 setFrameStyle ( QFrame::Panel | QFrame::Plain );
119 setLineWidth ( 1 ); 119 setLineWidth ( 1 );
120 setMidLineWidth ( 1 ); 120 setMidLineWidth ( 1 );
121 setFocusPolicy(NoFocus); 121 setFocusPolicy(NoFocus);
122} 122}
123 123
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 );
174 emit needsUpdate(); 174 emit needsUpdate();
175} 175}
176void KOCalEditView::selectReadOnly(int id ,bool b ) 176void KOCalEditView::selectReadOnly(int id ,bool b )
177{ 177{
178 KOPrefs::instance()->getCalendar( id )->isReadOnly = b; 178 KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
179 emit calendarReadonly ( id , b ); 179 emit calendarReadonly ( id , b );
180 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) { 180 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) {
181 KOPrefs::instance()->getCalendar( id )->isStandard = false; 181 KOPrefs::instance()->getCalendar( id )->isStandard = false;
182 KOPrefs::instance()->getCalendar( 1 )->isStandard = true; 182 KOPrefs::instance()->getCalendar( 1 )->isStandard = true;
183 emit setCalendarDefault ( 1 ); 183 emit setCalendarDefault ( 1 );
184 } 184 }
185 emit needsUpdate(); 185 emit needsUpdate();
186 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 186 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
187 187
188} 188}
189void KOCalEditView::setColor( const QColor& c, int id ) 189void KOCalEditView::setColor( const QColor& c, int id )
190{ 190{
191 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; 191 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
192 emit needsUpdate(); 192 emit needsUpdate();
193} 193}
194void KOCalEditView::deleteCal( int id ) 194void KOCalEditView::deleteCal( int id )
195{ 195{
196 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); 196 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
197 QString name = kkf->mName; 197 QString name = kkf->mName;
198 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); 198 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
199 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; 199 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
200 if ( kkf->isStandard ) 200 if ( kkf->isStandard )
201 selectStdCal( 1, true ); 201 selectStdCal( 1, true );
202 emit removeCalendar ( id ); 202 emit removeCalendar ( id );
203 KOPrefs::instance()->mCalendars.remove ( kkf ); 203 KOPrefs::instance()->mCalendars.remove ( kkf );
204 emit needsUpdate(); 204 emit needsUpdate();
205 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 205 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
206} 206}
207void KOCalEditView::infoCal( int id ) 207void KOCalEditView::infoCal( int id )
208{ 208{
209 QString name = KOPrefs::instance()->getCalendar( id )->mName; 209 QString name = KOPrefs::instance()->getCalendar( id )->mName;
210 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); 210 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
211 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { 211 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
212 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { 212 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) {
213 emit calendarAdded( id ); 213 emit calendarAdded( id );
214 emit needsUpdate(); 214 emit needsUpdate();
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 );
264 addBut->setPixmap ( SmallIcon("pencil")); 266 addBut->setPixmap ( SmallIcon("pencil"));
265 connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); 267 connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
266 addBut->setMaximumWidth( addBut->sizeHint().height() ); 268 addBut->setMaximumWidth( addBut->sizeHint().height() );
267 lab = new QLabel ( "", mw ); 269 lab = new QLabel ( "", mw );
268 mainLayout->addWidget( lab,0,++ii ); 270 mainLayout->addWidget( lab,0,++ii );
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 );
325 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); 327 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) );
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;
374 file = ""; 382 file = "";
375 break; 383 break;
376 } 384 }
377 kkf = KOPrefs::instance()->mCalendars.next(); 385 kkf = KOPrefs::instance()->mCalendars.next();
378 } 386 }
379 } 387 }
380 QFileInfo fi ( file ); 388 QFileInfo fi ( file );
381 if (!fi.exists() ) { 389 if (!fi.exists() ) {
382 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No ) 390 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No )
383 return; 391 return;
384 QFile fileIn( file ); 392 QFile fileIn( file );
385 if (!fileIn.open( IO_WriteOnly ) ) { 393 if (!fileIn.open( IO_WriteOnly ) ) {
386 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); 394 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) );
387 return; 395 return;
388 } 396 }
389 QTextStream tsIn( &fileIn ); 397 QTextStream tsIn( &fileIn );
390 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 398 tsIn.setCodec( QTextCodec::codecForName("utf8") );
391 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; 399 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n";
392 fileIn.close(); 400 fileIn.close();
393 } 401 }
394 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); 402 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar();
395 kkf->mName = name; 403 kkf->mName = name;
396 kkf->mFileName = file; 404 kkf->mFileName = file;
397 emit calendarAdded( kkf->mCalNumber ); 405 emit calendarAdded( kkf->mCalNumber );
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 5495d60..b57a6e9 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -1,75 +1,76 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
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 ) :
52 QDialog( parent, name, true ) 53 QDialog( parent, name, true )
53 { 54 {
54 setCaption( i18n("Add new Calendar") ); 55 setCaption( i18n("Add new Calendar") );
55 QVBoxLayout* lay = new QVBoxLayout( this ); 56 QVBoxLayout* lay = new QVBoxLayout( this );
56 lay->setSpacing( 3 ); 57 lay->setSpacing( 3 );
57 lay->setMargin( 3 ); 58 lay->setMargin( 3 );
58 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); 59 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
59 lay->addWidget( lab ); 60 lay->addWidget( lab );
60 nameE = new KLineEdit( this ); 61 nameE = new KLineEdit( this );
61 lay->addWidget( nameE ); 62 lay->addWidget( nameE );
62 lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this ); 63 lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this );
63 lay->addWidget( lab ); 64 lay->addWidget( lab );
64 url = new KURLRequester ( this ); 65 url = new KURLRequester ( this );
65 lay->addWidget( url ); 66 lay->addWidget( url );
66 QPushButton * ok = new QPushButton( i18n("OK"), this ); 67 QPushButton * ok = new QPushButton( i18n("OK"), this );
67 lay->addWidget( ok ); 68 lay->addWidget( ok );
68 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 69 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
69 lay->addWidget( cancel ); 70 lay->addWidget( cancel );
70 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) ); 71 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) );
71 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 72 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
72 setMinimumWidth( 220 ); 73 setMinimumWidth( 220 );
73 resize(sizeHint() ); 74 resize(sizeHint() );
74 } 75 }
75 76
@@ -103,116 +104,145 @@ class KOCalButton : public QPushButton
103 QPushButton( parent, name) 104 QPushButton( parent, name)
104 { 105 {
105 connect( this, SIGNAL( clicked() ), 106 connect( this, SIGNAL( clicked() ),
106 SLOT( bottonClicked() )); 107 SLOT( bottonClicked() ));
107 mNumber = -1; 108 mNumber = -1;
108 setFocusPolicy(NoFocus); 109 setFocusPolicy(NoFocus);
109 } 110 }
110 void setNum ( int num ) {mNumber = num; } 111 void setNum ( int num ) {mNumber = num; }
111 signals: 112 signals:
112 void selectNum ( int ); 113 void selectNum ( int );
113private: 114private:
114 int mNumber; 115 int mNumber;
115 void keyPressEvent ( QKeyEvent * e ) 116 void keyPressEvent ( QKeyEvent * e )
116 { 117 {
117 e->ignore(); 118 e->ignore();
118 } 119 }
119 120
120private slots : 121private slots :
121 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } 122 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); }
122}; 123};
123class KOCalCheckButton : public QCheckBox 124class KOCalCheckButton : public QCheckBox
124{ 125{
125 Q_OBJECT 126 Q_OBJECT
126 public: 127 public:
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