kalarm
editdlg.cpp
Go to the documentation of this file.
101 QString EditAlarmDlg::i18n_chk_ShowInKOrganizer() { return i18nc("@option:check", "Show in KOrganizer"); }
104 EditAlarmDlg* EditAlarmDlg::create(bool Template, Type type, QWidget* parent, GetResourceType getResource)
118 EditAlarmDlg* EditAlarmDlg::create(bool Template, const KAEvent* event, bool newAlarm, QWidget* parent,
123 case KAEvent::ACT_COMMAND: return new EditCommandAlarmDlg(Template, event, newAlarm, parent, getResource, readOnly);
125 case KAEvent::ACT_DISPLAY: return new EditDisplayAlarmDlg(Template, event, newAlarm, parent, getResource, readOnly);
126 case KAEvent::ACT_EMAIL: return new EditEmailAlarmDlg(Template, event, newAlarm, parent, getResource, readOnly);
127 case KAEvent::ACT_AUDIO: return new EditAudioAlarmDlg(Template, event, newAlarm, parent, getResource, readOnly);
142 EditAlarmDlg::EditAlarmDlg(bool Template, KAEvent::SubAction action, QWidget* parent, GetResourceType getResource)
236 setObjectName(mTemplate ? QLatin1String("TemplEditDlg") : QLatin1String("EditDlg")); // used by LikeBack
245 setButtons((mReadOnly ? Cancel|Try|Default : mTemplate ? Ok|Cancel|Try|Default : Ok|Cancel|Try|Help|Default));
323 mDeferChangeButton->setWhatsThis(i18nc("@info:whatsthis", "Change the alarm's deferred time, or cancel the deferral"));
341 connect(mTemplateTimeGroup, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotTemplateTimeType(QAbstractButton*)));
344 mTemplateDefaultTime = new RadioButton(i18nc("@option:radio", "Default time"), templateTimeBox);
347 mTemplateDefaultTime->setWhatsThis(i18nc("@info:whatsthis", "Do not specify a start time for alarms based on this template. "
358 mTemplateUseTime->setWhatsThis(i18nc("@info:whatsthis", "Specify a start time for alarms based on this template."));
374 mTemplateAnyTime->setWhatsThis(i18nc("@info:whatsthis", "Set the <interface>Any time</interface> option for alarms based on this template."));
402 mTimeWidget = new AlarmTimeWidget(i18nc("@title:group", "Time"), AlarmTimeWidget::AT_TIME, mainPage);
451 mShowInKorganizer->setWhatsThis(i18nc("@info:whatsthis", "Check to copy the alarm into KOrganizer's calendar"));
568 mTimeWidget->setDateTime(recurs || event->category() == CalEvent::ARCHIVED ? event->startDateTime()
586 mRecurrenceEdit->set(*event); // must be called after mTimeWidget is set up, to ensure correct date-only enabling
592 KDateTime defaultTime = KDateTime::currentUtcDateTime().addSecs(60).toTimeSpec(Preferences::timeZone());
601 mLateCancel->setMinutes((Preferences::defaultLateCancel() ? 1 : 0), false, TimePeriod::HoursMinutes);
605 mRecurrenceEdit->setDefaults(defaultTime); // must be called after mTimeWidget is set up, to ensure correct date-only enabling
625 void EditAlarmDlg::setRecurrence(const KARecurrence& recur, int subRepeatInterval, int subRepeatCount)
714 || (mTemplateUseTimeAfter->isChecked() && mSavedTemplateAfterTime != mTemplateTimeAfter->value()))
889 KWindowSystem::setOnDesktop(winId(), mDesktop); // ensure it displays on the desktop expected by the user
1007 bool timedRecurrence = mRecurrenceEdit->isTimedRepeatType(); // does it recur other than at login?
1093 if (event.nextOccurrence(now, mAlarmDateTime, KAEvent::ALLOW_FOR_REPETITION) == KAEvent::NO_OCCURRENCE)
1100 if (KAMessageBox::warningContinueCancel(this, i18nc("@info", "The alarm will never occur during working hours"))
1129 KAMessageBox::sorry(this, i18nc("@info", "Reminder period must be less than the recurrence interval, unless <interface>%1</interface> is checked.",
1142 && recurEvent.repetition().intervalMinutes() * recurEvent.repetition().count() >= longestRecurMinutes - reminder)
1144 KAMessageBox::sorry(this, i18nc("@info", "The duration of a repetition within the recurrence must be less than the recurrence interval minus any reminder period"));
1149 && ((mTemplate && mTemplateAnyTime->isChecked()) || (!mTemplate && mAlarmDateTime.isDateOnly())))
1151 KAMessageBox::sorry(this, i18nc("@info", "For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm"));
1322 DateTime start = mSavedEvent->recurs() ? (mExpiredRecurrence ? DateTime() : mSavedEvent->mainDateTime())
1352 AutoQPointer<DeferAlarmDlg> deferDlg = new DeferAlarmDlg((deferred ? mDeferDateTime : DateTime(now.addSecs(60).toTimeSpec(start.timeSpec()))),
1370 mDeferTimeLabel->setText(mDeferDateTime.isValid() ? mDeferDateTime.formatLocale() : QString());
1395 if (!mReadOnly && mRecurPageShown && mRecurrenceEdit->repeatType() == RecurrenceEdit::AT_LOGIN)
virtual void setReadOnly(bool readOnly)
virtual void setEnabled(bool enabled)
void setMinDateTimeIsCurrent()
Definition: alarmtimewidget.cpp:396
static QString i18n_TimeAfterPeriod()
Definition: alarmtimewidget.cpp:50
void setHeight(int height)
void setWidget(QWidget *widget)
Type type() const
Definition: editdlgtypes.h:147
Definition: editdlg.h:66
bool isHidden() const
int width() const
virtual QSize sizeHint() const
static int isWritableEnabled(const Akonadi::Collection &, CalEvent::Type)
Return whether a collection is both enabled and fully writable for a given alarm type, i.e.
Definition: collectionmodel.cpp:968
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
QSize adjustSize(bool force=false)
virtual void setReadOnly(bool readOnly)
virtual CheckBox * type_createConfirmAckCheckbox(QWidget *parent)
Definition: editdlg.h:120
Definition: recurrenceedit.h:64
static QString i18n_chk_FirstRecurrenceOnly()
Definition: reminder.cpp:49
void updateEvent(KAEvent &, bool adjustStart)
Write recurrence settings into an event.
Definition: recurrenceedit.cpp:944
virtual QByteArray text(quint32 serialNumber) const =0
Definition: editdlg_p.h:33
virtual bool checkText(QString &result, bool showErrorMessage=true) const =0
void setStartDate(const QDate &, const QDate &today)
Definition: recurrenceedit.cpp:686
virtual QSize sizeHint() const
Definition: alarmtimewidget.h:46
Definition: alarmtimewidget.h:41
AlarmResource * resourceForEvent(const QString &eventID) const
Definition: alarmcalendar.cpp:2117
void setFrameStyle(int style)
Definition: deferdlg.h:38
void setMinDateTime(const KDateTime &=KDateTime())
Definition: alarmtimewidget.cpp:409
virtual QSize sizeHint() const
KAEvent * templateEvent(const QString &templateName)
Definition: alarmcalendar.cpp:1868
void setSpacing(int spacing)
Definition: templatepickdlg.h:38
bool isNull() const
void setActiveWindow(QWidget *active)
void clear()
void setBuddy(QWidget *buddy)
virtual void type_executedTry(const QString &text, void *obj)
Definition: editdlg.h:118
the KAlarm application object
EditAlarmDlg(bool Template, KAEvent::SubAction, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlg.cpp:142
void setEnabled(bool)
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
int count(const T &value) const
void append(const T &value)
void installEventFilter(QObject *filterObj)
virtual QSize sizeHint() const
void setSized()
virtual void slotButtonClicked(int button)
Definition: editdlg.cpp:979
virtual void setReadOnly(bool readOnly)
void setFocus()
static Akonadi::Collection destination(CalEvent::Type, QWidget *promptParent=0, bool noPrompt=false, bool *cancelled=0)
Find the collection to be used to store an event of a given type.
Definition: collectionmodel.cpp:1180
bool isEmpty() const
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())=0
QWidget * focusWidget()
int removeAll(const T &value)
main application window
static EditAlarmDlg * create(bool Template, Type, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlg.cpp:104
void addButton(QAbstractButton *button)
void setText(const QString &)
void hide()
Definition: latecancel.h:33
QScrollBar * verticalScrollBar() const
void setMargin(int margin)
void addWidget(QWidget *w)
Definition: recurrenceedit.h:59
int value() const
const QSize & size() const
void setFixedSize(const QSize &s)
void setValue(int)
virtual bool type_stateChanged() const =0
Definition: recurrenceedit.h:64
virtual void setValue(int minutes)
KDateTime getDateTime(int *minsFromNow=0, bool checkExpired=true, bool showErrorMessage=true, QWidget **errorWidget=0) const
Definition: alarmtimewidget.cpp:280
void setChecked(bool)
Definition: editdlgtypes.h:199
bool setDate(int year, int month, int day)
virtual void setReadOnly(bool readOnly)
virtual void type_showOptions(bool more)=0
void setDefaults(const KDateTime &from)
Set widgets to default values.
Definition: recurrenceedit.cpp:735
void setWhatsThis(const QString &)
const KAEvent * selectedTemplate() const
Definition: templatepickdlg.cpp:96
void setRecurrence(const KARecurrence &, int subRepeatInterval, int subRepeatCount)
Definition: editdlg.cpp:625
miscellaneous functions
void addStretch(int stretch)
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
Definition: editdlg.h:60
virtual void setValue(int minutes)
virtual QString type_caption() const =0
Definition: editdlg.h:67
void setRepeatAtLogin()
Initialise with repeat-at-login selected, instead of calling set().
Definition: recurrenceedit.cpp:797
virtual void type_initValues(const KAEvent *)=0
virtual QSize sizeHint() const
int height() const
Definition: recurrenceedit.h:64
Definition: editdlgtypes.h:57
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
QString fromLatin1(const char *str, int size)
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)=0
void * execAlarm(KAEvent &, const KAAlarm &, bool reschedule, bool allowDefer=true, bool noPreAction=false)
Definition: kalarmapp.cpp:1884
void setSpacing(int)
KAEvent::List events(CalEvent::Types s=CalEvent::EMPTY) const
Definition: alarmcalendar.h:96
QWidget * checkData(const KDateTime &startDateTime, QString &errorMessage) const
Definition: recurrenceedit.cpp:410
void show()
QDate addDays(int ndays) const
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)=0
static QString i18n_chk_ShowInKOrganizer()
Definition: editdlg.cpp:101
void setDefaultEndDate(const QDate &)
Definition: recurrenceedit.cpp:710
static QString shiftWhatsThis()
void setMinutes(int Minutes, bool dateOnly, TimePeriod::Units defaultUnits)
Definition: latecancel.cpp:126
Definition: editdlg.h:68
virtual QSize sizeHint() const
QTime time() const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QAbstractButton * checkedButton() const
void setSpacing(int spacing)
height
virtual bool type_validate(bool trial)=0
void set(const KAEvent &)
Initialise according to a specified event.
Definition: recurrenceedit.cpp:806
Definition: editdlgtypes.h:274
void addLayout(QLayout *layout, int stretch)
void selectTimeFromNow(int minutes=0)
Definition: alarmtimewidget.cpp:264
virtual Reminder * createReminder(QWidget *parent)
Definition: editdlg.h:119
void setSubRepetition(int reminderMinutes, bool dateOnly)
Definition: recurrenceedit.cpp:557
singleShot
void setEndDateTime(const KDateTime &)
Definition: recurrenceedit.cpp:716
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.