korganizer

koeditorgeneral.cpp
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 
25 
26 #include <tqwidget.h>
27 #include <tqtooltip.h>
28 #include <tqlayout.h>
29 #include <tqvbox.h>
30 #include <tqhbox.h>
31 #include <tqbuttongroup.h>
32 #include <tqvgroupbox.h>
33 #include <tqdatetime.h>
34 #include <tqlineedit.h>
35 #include <tqlabel.h>
36 #include <tqcheckbox.h>
37 #include <tqpushbutton.h>
38 #include <tqcombobox.h>
39 #include <tqspinbox.h>
40 #include <tqwhatsthis.h>
41 
42 #include <tdeglobal.h>
43 #include <kdialog.h>
44 #include <kdebug.h>
45 #include <tdelocale.h>
46 #include <kiconloader.h>
47 #include <tdemessagebox.h>
48 #include <tdefiledialog.h>
49 #include <ksqueezedtextlabel.h>
50 #include <kstandarddirs.h>
51 #include <ktextedit.h>
52 #include <krestrictedline.h>
53 
54 #include <libkcal/todo.h>
55 #include <libkcal/event.h>
56 #include <libkcal/incidenceformatter.h>
57 #include <libkcal/resourcecached.h>
58 
59 #include <libtdepim/kdateedit.h>
60 #include <libtdepim/categoryselectdialog.h>
61 
62 #include "koprefs.h"
63 #include "koglobals.h"
64 
65 #include "koeditorgeneral.h"
66 #include "koeditoralarms.h"
67 #include "koeditorattachments.h"
68 #include "koeditorgeneral.moc"
69 #include "kohelper.h"
70 
71 KOEditorGeneral::KOEditorGeneral( TQObject *parent, const char* name) :
72  TQObject( parent, name ), mAttachments(0)
73 {
74  mType = "Event";
75  ResourceCached::setEditorWindowOpen(true);
76  mAlarmList.setAutoDelete( true );
77 }
78 
79 KOEditorGeneral::~KOEditorGeneral()
80 {
81  ResourceCached::setEditorWindowOpen(false);
82 }
83 
84 
85 FocusLineEdit::FocusLineEdit( TQWidget *parent )
86  : TQLineEdit( parent ), mSkipFirst( true )
87 {
88 }
89 
90 void FocusLineEdit::focusInEvent ( TQFocusEvent *e )
91 {
92  if ( !mSkipFirst ) {
93  emit focusReceivedSignal();
94  } else {
95  mSkipFirst = false;
96  }
97  TQLineEdit::focusInEvent( e );
98 }
99 
100 
101 void KOEditorGeneral::initHeader( TQWidget *parent,TQBoxLayout *topLayout)
102 {
103  TQGridLayout *headerLayout = new TQGridLayout();
104  headerLayout->setSpacing( topLayout->spacing() );
105  topLayout->addLayout( headerLayout );
106 
107  TQString whatsThis = i18n("Sets the Title of this event or to-do.");
108  TQLabel *summaryLabel = new TQLabel( i18n("T&itle:"), parent );
109  TQWhatsThis::add( summaryLabel, whatsThis );
110  TQFont f = summaryLabel->font();
111  f.setBold( true );
112  summaryLabel->setFont(f);
113  headerLayout->addWidget(summaryLabel,1,0);
114 
115  mSummaryEdit = new FocusLineEdit( parent );
116  TQWhatsThis::add( mSummaryEdit, whatsThis );
117  connect( mSummaryEdit, TQ_SIGNAL( focusReceivedSignal() ),
118  TQ_SIGNAL( focusReceivedSignal() ) );
119  headerLayout->addWidget(mSummaryEdit,1,1);
120  summaryLabel->setBuddy( mSummaryEdit );
121 
122  mAttendeeSummaryLabel = new TQLabel( parent );
123  updateAttendeeSummary( 0 );
124  headerLayout->addWidget( mAttendeeSummaryLabel, 1, 2 );
125 
126  whatsThis = i18n("Sets where the event or to-do will take place.");
127  TQLabel *locationLabel = new TQLabel( i18n("&Location:"), parent );
128  TQWhatsThis::add( locationLabel, whatsThis );
129  headerLayout->addWidget(locationLabel,2,0);
130 
131  mLocationEdit = new TQLineEdit( parent );
132  TQWhatsThis::add( mLocationEdit, whatsThis );
133  headerLayout->addMultiCellWidget( mLocationEdit, 2, 2, 1, 2 );
134  locationLabel->setBuddy( mLocationEdit );
135 
136  TQBoxLayout *thirdLineLayout = new TQHBoxLayout();
137  headerLayout->addMultiCellLayout( thirdLineLayout, 3, 3, 0, 2 );
138 
139  mResourceLabel = new TQLabel( parent );
140  mResourceLabel->hide();
141  thirdLineLayout->addWidget( mResourceLabel );
142 
143  whatsThis = i18n("Allows you to select the categories that this event or to-do belongs to.");
144  TQLabel *categoriesLabel = new TQLabel( i18n("Categories:"), parent );
145  TQWhatsThis::add( categoriesLabel, whatsThis );
146  thirdLineLayout->addWidget( categoriesLabel );
147  mCategoriesLabel = new KSqueezedTextLabel( parent );
148  TQWhatsThis::add( mCategoriesLabel, whatsThis );
149  mCategoriesLabel->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
150  thirdLineLayout->addWidget( mCategoriesLabel );
151 
152  mCategoriesButton = new TQPushButton( parent );
153  mCategoriesButton->setText(i18n("Select..."));
154  TQWhatsThis::add( mCategoriesButton, whatsThis );
155  connect(mCategoriesButton,TQ_SIGNAL(clicked()),TQ_SLOT(selectCategories()));
156  thirdLineLayout->addWidget( mCategoriesButton );
157 }
158 
159 void KOEditorGeneral::initSecrecy(TQWidget *parent, TQBoxLayout *topLayout)
160 {
161  TQBoxLayout *secrecyLayout = new TQHBoxLayout( topLayout );
162 
163  TQLabel *secrecyLabel = new TQLabel(i18n("Acc&ess:"),parent);
164  TQString whatsThis = i18n("Sets whether the access to this event or to-do "
165  "is restricted. Please note that KOrganizer "
166  "currently does not use this setting, so the "
167  "implementation of the restrictions will depend "
168  "on the groupware server. This means that events "
169  "or to-dos marked as private or confidential may "
170  "be visible to others.");
171  TQWhatsThis::add( secrecyLabel, whatsThis );
172  secrecyLayout->addWidget(secrecyLabel);
173 
174  mSecrecyCombo = new TQComboBox(parent);
175  TQWhatsThis::add( mSecrecyCombo, whatsThis );
176  mSecrecyCombo->insertStringList(Incidence::secrecyList());
177  secrecyLayout->addWidget(mSecrecyCombo);
178  secrecyLabel->setBuddy( mSecrecyCombo );
179 }
180 
181 void KOEditorGeneral::initDescription(TQWidget *parent,TQBoxLayout *topLayout)
182 {
183  mDescriptionEdit = new KTextEdit(parent);
184  TQWhatsThis::add( mDescriptionEdit,
185  i18n("Sets the description for this event or to-do. This "
186  "will be displayed in a reminder if one is set, "
187  "as well as in a tooltip when you hover over the "
188  "event.") );
189  mDescriptionEdit->append("");
190  mDescriptionEdit->setReadOnly(false);
191  mDescriptionEdit->setOverwriteMode(false);
192  mDescriptionEdit->setWordWrap( KTextEdit::WidgetWidth );
193  mDescriptionEdit->setTabChangesFocus( true );;
194  topLayout->addWidget(mDescriptionEdit, 4);
195 }
196 
197 void KOEditorGeneral::initAlarm( TQWidget *parent, TQBoxLayout *topLayout )
198 {
199  TQBoxLayout *alarmLayout = new TQHBoxLayout( topLayout );
200 
201  mAlarmButton = new TQCheckBox( parent );
202  TQWhatsThis::add( mAlarmButton, i18n( "Enable reminders for this event or to-do." ) );
203  TQToolTip::add( mAlarmButton, i18n( "Enable reminders" ) );
204  alarmLayout->addWidget( mAlarmButton );
205 
206  mAlarmAdvancedButton = new TQPushButton( parent );
207  mAlarmAdvancedButton->setIconSet( KOGlobals::self()->smallIconSet( "bell", 16 ) );
208  TQWhatsThis::add( mAlarmAdvancedButton,
209  i18n( "Push this button to create an advanced set of reminders "
210  "for this event or to-do." ) );
211  TQToolTip::add( mAlarmAdvancedButton, i18n( "Set an advanced reminder" ) );
212  connect( mAlarmAdvancedButton, TQ_SIGNAL(clicked()), TQ_SLOT(editAlarms()) );
213  alarmLayout->addWidget( mAlarmAdvancedButton );
214 
215  mSimpleAlarmBox = new TQHBox( parent );
216  alarmLayout->addWidget( mSimpleAlarmBox );
217 
218  TQString whatsThis, toolTip;
219  if ( mType == "Event" ) {
220  whatsThis = i18n( "Set the time before the event starts when the reminder will be triggered." );
221  toolTip = i18n( "Set the start time trigger offset" );
222  } else {
223  whatsThis = i18n( "Set the time before the to-do is due when the reminder will be triggered." );
224  toolTip = i18n( "Set the due time trigger offset" );
225  }
226  mAlarmTimeEdit = new TQSpinBox( 0, 99999, 1, mSimpleAlarmBox, "alarmTimeEdit" );
227  mAlarmTimeEdit->setValue( 0 );
228  TQWhatsThis::add( mAlarmTimeEdit, whatsThis );
229  TQToolTip::add( mAlarmTimeEdit, toolTip );
230 
231  mAlarmIncrCombo = new TQComboBox( false, mSimpleAlarmBox );
232  mAlarmIncrCombo->insertItem( i18n("minute(s)") );
233  mAlarmIncrCombo->insertItem( i18n("hour(s)") );
234  mAlarmIncrCombo->insertItem( i18n("day(s)") );
235  TQWhatsThis::add( mAlarmIncrCombo, whatsThis );
236  TQToolTip::add( mAlarmIncrCombo, toolTip );
237 
238  mAlarmInfoLabel = new TQLabel( parent );
239  if ( mType == "Event" ) {
240  mAlarmInfoLabel->setText( i18n( "before the start" ) );
241  } else {
242  mAlarmInfoLabel->setText( i18n( "before the due time" ) );
243  }
244  alarmLayout->addWidget( mAlarmInfoLabel );
245 
246  mAlarmAdvancedButton->setEnabled( false );
247  mAlarmTimeEdit->setEnabled( false );
248  mAlarmIncrCombo->setEnabled( false );
249  mAlarmInfoLabel->setEnabled( false );
250  connect( mAlarmButton, TQ_SIGNAL(toggled(bool)), mAlarmAdvancedButton, TQ_SLOT(setEnabled(bool)) );
251  connect( mAlarmButton, TQ_SIGNAL(toggled(bool)), mAlarmTimeEdit, TQ_SLOT(setEnabled(bool)) );
252  connect( mAlarmButton, TQ_SIGNAL(toggled(bool)), mAlarmIncrCombo, TQ_SLOT(setEnabled(bool)) );
253  connect( mAlarmButton, TQ_SIGNAL(toggled(bool)), mAlarmInfoLabel, TQ_SLOT(setEnabled(bool)) );
254 }
255 
256 void KOEditorGeneral::initAttachments(TQWidget *parent,TQBoxLayout *topLayout)
257 {
258  mAttachments = new KOEditorAttachments( KDialog::spacingHint(), parent );
259  connect( mAttachments, TQ_SIGNAL( openURL( const KURL & ) ) ,
260  this, TQ_SIGNAL( openURL( const KURL & ) ) );
261  topLayout->addWidget( mAttachments, 1 );
262 }
263 
264 void KOEditorGeneral::setType( const TQCString &type )
265 {
266  // must be "Event", "Todo", "Journal", etc.
267  mType = type;
268 }
269 
270 void KOEditorGeneral::addAttachments( const TQStringList &attachments,
271  const TQStringList &mimeTypes,
272  bool inlineAttachments )
273 {
274  TQStringList::ConstIterator it;
275  uint i = 0;
276  for ( it = attachments.begin(); it != attachments.end(); ++it, ++i ) {
277  if ( !(*it).isEmpty() ) {
278  TQString mimeType;
279  if ( mimeTypes.count() > i ) {
280  mimeType = mimeTypes[ i ];
281  }
282  mAttachments->addUriAttachment( *it, mimeType, TQString(), inlineAttachments );
283  }
284  }
285 }
286 
287 void KOEditorGeneral::selectCategories()
288 {
289  KPIM::CategorySelectDialog *categoryDialog = new KPIM::CategorySelectDialog( KOPrefs::instance(), mCategoriesButton );
290  KOGlobals::fitDialogToScreen( categoryDialog );
291  categoryDialog->setSelected( mCategories );
292 
293  connect(categoryDialog, TQ_SIGNAL(editCategories()), this, TQ_SIGNAL(openCategoryDialog()));
294  connect(this, TQ_SIGNAL(updateCategoryConfig()), categoryDialog, TQ_SLOT(updateCategoryConfig()));
295 
296  if ( categoryDialog->exec() ) {
297  setCategories( categoryDialog->selectedCategories() );
298  }
299  delete categoryDialog;
300 }
301 
302 
303 void KOEditorGeneral::editAlarms()
304 {
305  if ( mAlarmIsSimple ) {
306  mAlarmList.clear();
307  Alarm *al = alarmFromSimplePage( 0 );
308  if ( al ) {
309  mAlarmList.append( al );
310  }
311  }
312 
313  KOEditorAlarms *dlg = new KOEditorAlarms( mType, &mAlarmList, mAlarmAdvancedButton );
314  if ( dlg->exec() != KDialogBase::Cancel ) {
315  if ( mType == "Event" ) {
316  Event *e = new Event;
317  Alarm::List::ConstIterator it;
318  for( it = mAlarmList.begin(); it != mAlarmList.end(); ++it ) {
319  Alarm *a = (*it)->clone();
320  a->setParent( e );
321  e->addAlarm( a );
322  }
323  updateAlarmWidgets( e );
324  delete e;
325  } else {
326  Todo *t = new Todo;
327  Alarm::List::ConstIterator it;
328  for( it = mAlarmList.begin(); it != mAlarmList.end(); ++it ) {
329  Alarm *a = (*it)->clone();
330  a->setParent( t );
331  t->addAlarm( a );
332  }
333  updateAlarmWidgets( t );
334  delete t;
335  }
336  }
337 }
338 
339 void KOEditorGeneral::enableAlarm( bool enable )
340 {
341  mAlarmAdvancedButton->setEnabled( enable );
342 }
343 
344 void KOEditorGeneral::toggleAlarm( bool on )
345 {
346  mAlarmButton->setChecked( on );
347 }
348 
349 void KOEditorGeneral::setCategories( const TQStringList &categories )
350 {
351  mCategoriesLabel->setText( categories.join(",") );
352  mCategories = categories;
353 }
354 
355 void KOEditorGeneral::setDefaults(bool /*allDay*/)
356 {
357  mAlarmList.clear();
358  updateDefaultAlarmTime();
359  updateAlarmWidgets( 0 );
360 
361  mSecrecyCombo->setCurrentItem( Incidence::SecrecyPublic );
362  mAttachments->setDefaults();
363 }
364 
365 void KOEditorGeneral::updateDefaultAlarmTime()
366 {
367  int reminderTime = KOPrefs::instance()->mReminderTime;
368  int index = KOPrefs::instance()->mReminderTimeUnits;
369  if ( index < 0 || index > 2 ) {
370  index = 0;
371  }
372  mAlarmTimeEdit->setValue( reminderTime );
373  mAlarmIncrCombo->setCurrentItem( index );
374 }
375 
376 bool KOEditorGeneral::isSimpleAlarm( Alarm *alarm ) const
377 {
378  // Check if its the trivial type of alarm, which can be
379  // configured with a simply spin box...
380 
381  bool simple = false;
382  if ( alarm->type() == Alarm::Display && alarm->text().isEmpty() &&
383  alarm->repeatCount() == 0 && !alarm->hasTime() ) {
384  if ( mType == "Event" &&
385  alarm->hasStartOffset() && alarm->startOffset().asSeconds() <= 0 ) {
386  simple = true;
387  }
388  if ( mType == "Todo" &&
389  alarm->hasEndOffset() && alarm->endOffset().asSeconds() <= 0 ) {
390  simple = true;
391  }
392  }
393  return simple;
394 }
395 
396 static TQString etc = i18n( "elipsis", "..." );
397 void KOEditorGeneral::updateAlarmWidgets( Incidence *incidence )
398 {
399  uint maxLen = 75; //TODO: compute from the font and dialog width
400 
401  if ( incidence ) {
402  mAlarmButton->setChecked( incidence->isAlarmEnabled() );
403  }
404 
405  if ( mAlarmList.isEmpty() ) {
406  mAlarmIsSimple = true;
407  mSimpleAlarmBox->show();
408  bool on;
409  if ( mType == "Event" ) {
410  on = KOPrefs::instance()->defaultEventReminders();
411  } else if ( mType == "Todo" ) {
412  on = KOPrefs::instance()->defaultTodoReminders();
413  } else {
414  on = false;
415  }
416  mAlarmButton->setChecked( on );
417  mAlarmAdvancedButton->setEnabled( on );
418  } else if ( mAlarmList.count() > 1 ) {
419  mAlarmIsSimple = false;
420  mAlarmAdvancedButton->setEnabled( true );
421  mSimpleAlarmBox->hide();
422  if ( incidence ) {
423  TQString remStr = IncidenceFormatter::reminderStringList( incidence ).join( ", " );
424  if ( remStr.length() > maxLen ) {
425  maxLen -= etc.length();
426  remStr = remStr.left( maxLen );
427  remStr += etc;
428  }
429  mAlarmInfoLabel->setText( i18n( "Triggers %1" ).arg( remStr ) );
430  }
431  } else { // alarm count is 1
432  Alarm *alarm = mAlarmList.first();
433  if ( isSimpleAlarm( alarm ) ) {
434  mAlarmIsSimple = true;
435  mSimpleAlarmBox->show();
436  int offset;
437  if ( mType == "Event" ) {
438  offset = alarm->startOffset().asSeconds();
439  mAlarmInfoLabel->setText( i18n( "before the start" ) );
440  }
441  if ( mType == "Todo" ) {
442  if ( alarm->hasStartOffset() ) {
443  offset = alarm->startOffset().asSeconds();
444  mAlarmInfoLabel->setText( i18n( "before the start" ) );
445  } else {
446  offset = alarm->endOffset().asSeconds();
447  mAlarmInfoLabel->setText( i18n( "before the due time" ) );
448  }
449  }
450  offset = offset / -60; // make minutes
451  int useoffset = offset;
452  if ( offset == 0 ) {
453  mAlarmIncrCombo->setCurrentItem( 0 ); // use minute units for 0 offset
454  } else if (offset % (24*60) == 0) { // divides evenly into days?
455  useoffset = offset / (24*60);
456  mAlarmIncrCombo->setCurrentItem(2);
457  } else if (offset % 60 == 0) { // divides evenly into hours?
458  useoffset = offset / 60;
459  mAlarmIncrCombo->setCurrentItem(1);
460  }
461  mAlarmTimeEdit->setValue( useoffset );
462  } else {
463  mAlarmIsSimple = false;
464  mAlarmAdvancedButton->setEnabled( true );
465  mSimpleAlarmBox->hide();
466  if ( incidence ) {
467  TQString remStr = IncidenceFormatter::reminderStringList( incidence ).first();
468  mAlarmInfoLabel->setText( i18n( "Triggers %1" ).arg( remStr ) );
469  }
470  }
471  }
472 }
473 
474 void KOEditorGeneral::readIncidence( Incidence *incidence, Calendar *calendar )
475 {
476  mSummaryEdit->setText( incidence->summary() );
477  mLocationEdit->setText( incidence->location() );
478  mDescriptionEdit->setText( incidence->description() );
479 
480  mSecrecyCombo->setCurrentItem( incidence->secrecy() );
481 
482  // set up alarm stuff
483  mAlarmList.clear();
484  Alarm::List::ConstIterator it;
485  Alarm::List alarms = incidence->alarms();
486  for( it = alarms.begin(); it != alarms.end(); ++it ) {
487  Alarm *al = new Alarm( *(*it) );
488  al->setParent( 0 );
489  mAlarmList.append( al );
490  }
491  updateDefaultAlarmTime();
492  updateAlarmWidgets( incidence );
493 
494  setCategories( incidence->categories() );
495 
496  mAttachments->readIncidence( incidence );
497 
498  TQString resLabel = IncidenceFormatter::resourceString( calendar, incidence );
499  if ( !resLabel.isEmpty() ) {
500  mResourceLabel->setText( i18n( "Calendar: %1" ).arg( resLabel ) );
501  mResourceLabel->show();
502  }
503 }
504 
505 Alarm *KOEditorGeneral::alarmFromSimplePage( Incidence *incidence ) const
506 {
507  if ( mAlarmButton->isChecked() ) {
508  Alarm *alarm = new Alarm( 0 );
509  alarm->setDisplayAlarm( "" );
510  alarm->setEnabled(true);
511  TQString tmpStr = mAlarmTimeEdit->text();
512  int j = mAlarmTimeEdit->value() * -60;
513  if ( mAlarmIncrCombo->currentItem() == 1 ) {
514  j = j * 60;
515  } else if ( mAlarmIncrCombo->currentItem() == 2 ) {
516  j = j * (60 * 24);
517  }
518  if ( mType == "Event" ) {
519  alarm->setStartOffset( j );
520  }
521  if ( mType == "Todo" ) {
522  Todo *todo = static_cast<Todo *>( incidence );
523  if ( todo && todo->hasStartDate() && !todo->hasDueDate() ) {
524  alarm->setStartOffset( j );
525  } else {
526  alarm->setEndOffset( j );
527  }
528  }
529  return alarm;
530  } else {
531  return 0;
532  }
533 }
534 void KOEditorGeneral::writeIncidence( Incidence *incidence )
535 {
536  incidence->setSummary(mSummaryEdit->text());
537  incidence->setLocation(mLocationEdit->text());
538  incidence->setDescription(mDescriptionEdit->text());
539  incidence->setCategories(mCategories);
540  incidence->setSecrecy(mSecrecyCombo->currentItem());
541 
542  // alarm stuff
543  incidence->clearAlarms();
544  if ( mAlarmIsSimple ) {
545  Alarm *al = alarmFromSimplePage( incidence );
546  if ( al ) {
547  al->setParent( incidence );
548  al->setEnabled( mAlarmButton->isChecked() );
549  incidence->addAlarm( al );
550  }
551  } else {
552  // simply assign the list of alarms
553  Alarm::List::ConstIterator it;
554  for( it = mAlarmList.begin(); it != mAlarmList.end(); ++it ) {
555  Alarm *al = new Alarm( *(*it) );
556  al->setParent( incidence );
557  al->setEnabled( mAlarmButton->isChecked() );
558  incidence->addAlarm( al );
559  }
560  }
561  mAttachments->writeIncidence( incidence );
562 }
563 
564 void KOEditorGeneral::setSummary( const TQString &text )
565 {
566  mSummaryEdit->setText( text );
567 }
568 
569 void KOEditorGeneral::setDescription( const TQString &text )
570 {
571  mDescriptionEdit->setText( text );
572 }
573 
574 TQObject *KOEditorGeneral::typeAheadReceiver() const
575 {
576  return mSummaryEdit;
577 }
578 
579 void KOEditorGeneral::updateAttendeeSummary(int count)
580 {
581  if ( count <= 0 )
582  mAttendeeSummaryLabel->setText( i18n("No attendees") );
583  else
584  mAttendeeSummaryLabel->setText( i18n( "One attendee", "%n attendees", count ) );
585 }
bool hasStartOffset() const
TQString text() const
void setEnabled(bool enable)
Alarm * clone()
Duration endOffset() const
bool hasEndOffset() const
void setDisplayAlarm(const TQString &text=TQString())
Duration startOffset() const
void setEndOffset(const Duration &)
bool hasTime() const
void setStartOffset(const Duration &)
Type type() const
void setParent(Incidence *)
int repeatCount() const
int asSeconds() const
void setLocation(const TQString &location)
const Alarm::List & alarms() const
void setSummary(const TQString &summary)
void setSecrecy(int)
int secrecy() const
TQString description() const
TQStringList categories() const
void setDescription(const TQString &description)
bool isAlarmEnabled() const
void setCategories(const TQStringList &categories)
TQString location() const
void addAlarm(Alarm *)
TQString summary() const
bool hasDueDate() const
bool hasStartDate() const