kalarm
editdlgtypes.cpp
Go to the documentation of this file.
91 PickLogFileRadio(QPushButton* b, LineEdit* e, const QString& text, ButtonGroup* group, QWidget* parent)
95 return KAlarm::browseFile(i18nc("@title:window", "Choose Log File"), mDefaultDir, fileEdit()->text(), QString(),
108 QString EditDisplayAlarmDlg::i18n_chk_ConfirmAck() { return i18nc("@option:check", "Confirm acknowledgment"); }
118 EditDisplayAlarmDlg::EditDisplayAlarmDlg(bool Template, QWidget* parent, GetResourceType getResource)
128 EditDisplayAlarmDlg::EditDisplayAlarmDlg(bool Template, const KAEvent* event, bool newAlarm, QWidget* parent,
144 return isTemplate() ? (isNewAlarm() ? i18nc("@title:window", "New Display Alarm Template") : i18nc("@title:window", "Edit Display Alarm Template"))
145 : (isNewAlarm() ? i18nc("@title:window", "New Display Alarm") : i18nc("@title:window", "Edit Display Alarm"));
184 "<list><item><interface>%1</interface>: the alarm will display the text message you type in.</item>"
185 "<item><interface>%2</interface>: the alarm will display the contents of a text or image file.</item>"
186 "<item><interface>%3</interface>: the alarm will display the output from a command.</item></list></para>",
194 mTextMessageEdit->setWhatsThis(i18nc("@info:whatsthis", "Enter the text of the alarm message. It may be multi-line."));
204 mFileMessageEdit->setWhatsThis(i18nc("@info:whatsthis", "Enter the name or URL of a text or image file to display."));
213 mFileBrowseButton->setWhatsThis(i18nc("@info:whatsthis", "Select a text or image file to display."));
240 if (ShellProcess::authorised()) // don't display if shell commands not allowed (e.g. kiosk mode)
261 static const QString reminderText = i18nc("@info:whatsthis", "Enter how long in advance of or after the main alarm to display a reminder alarm.");
262 return new Reminder(i18nc("@info:whatsthis", "Check to additionally display a reminder in advance of or after the main alarm time(s)."),
263 i18nc("@info:whatsthis", "<para>Enter how long in advance of or after the main alarm to display a reminder alarm.</para><para>%1</para>", TimeSpinBox::shiftWhatsThis()),
264 i18nc("@info:whatsthis", "Select whether the reminder should be triggered before or after the main alarm"),
274 confirmAck->setWhatsThis(i18nc("@info:whatsthis", "Check to be prompted for confirmation when you acknowledge the alarm."));
320 mSpecialActionsButton->setActions(event->preAction(), event->postAction(), event->extraActionOptions());
345 reminder()->enableOnceOnly(isTimedRecurrence()); // must be called after mRecurrenceEdit is set up
355 mSpecialActionsButton->setActions(Preferences::defaultPreAction(), Preferences::defaultPostAction(), opts);
446 void EditDisplayAlarmDlg::setAudio(Preferences::SoundType type, const QString& file, float volume, int repeatPause)
554 void EditDisplayAlarmDlg::type_setEvent(KAEvent& event, const KDateTime& dt, const QString& text, int lateCancel, bool trial)
564 event.set(dt, text, mFontColourButton->bgColour(), mFontColourButton->fgColour(), mFontColourButton->font(),
575 event.setAudioFile(mSoundPicker->file().prettyUrl(), volume, fadeVolume, fadeSecs, repeatPause);
649 QString file = KAlarm::browseFile(i18nc("@title:window", "Choose Text or Image File to Display"),
703 if (!KAlarm::showFileErrMessage(alarmtext, err, KAlarm::FileErr_BlankDisplay, const_cast<EditDisplayAlarmDlg*>(this)))
724 QString EditCommandAlarmDlg::i18n_chk_EnterScript() { return i18nc("@option:check", "Enter a script"); }
725 QString EditCommandAlarmDlg::i18n_radio_ExecInTermWindow() { return i18nc("@option:radio", "Execute in terminal window"); }
726 QString EditCommandAlarmDlg::i18n_chk_ExecInTermWindow() { return i18nc("@option:check", "Execute in terminal window"); }
736 EditCommandAlarmDlg::EditCommandAlarmDlg(bool Template, QWidget* parent, GetResourceType getResource)
743 EditCommandAlarmDlg::EditCommandAlarmDlg(bool Template, const KAEvent* event, bool newAlarm, QWidget* parent,
756 return isTemplate() ? (isNewAlarm() ? i18nc("@title:window", "New Command Alarm Template") : i18nc("@title:window", "Edit Command Alarm Template"))
757 : (isNewAlarm() ? i18nc("@title:window", "New Command Alarm") : i18nc("@title:window", "Edit Command Alarm"));
785 mCmdExecInTerm->setWhatsThis(i18nc("@info:whatsthis", "Check to execute the command in a terminal window"));
792 (new QWidget(box))->setFixedWidth(mCmdExecInTerm->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth)); // indent the edit box
795 mCmdLogFileEdit->setWhatsThis(i18nc("@info:whatsthis", "Enter the name or path of the log file."));
808 mCmdLogToFile = new PickLogFileRadio(browseButton, mCmdLogFileEdit, i18nc("@option:radio", "Log to file"), mCmdOutputGroup, mCmdOutputBox);
810 mCmdLogToFile->setWhatsThis(i18nc("@info:whatsthis", "Check to log the command output to a local file. The output will be appended to any existing contents of the file."));
849 mCmdLogFileEdit->setText(Preferences::defaultCmdLogFile()); // set file name before setting radio button
925 void EditCommandAlarmDlg::type_setEvent(KAEvent& event, const KDateTime& dt, const QString& text, int lateCancel, bool trial)
928 event.set(dt, text, QColor(), QColor(), QFont(), KAEvent::COMMAND, lateCancel, getAlarmFlags());
973 KAMessageBox::sorry(this, i18nc("@info", "Log file must be the name or path of a local file, with write permission."));
1027 QString EditEmailAlarmDlg::i18n_chk_CopyEmailToSelf() { return i18nc("@option:check", "Copy email to self"); }
1037 EditEmailAlarmDlg::EditEmailAlarmDlg(bool Template, QWidget* parent, GetResourceType getResource)
1045 EditEmailAlarmDlg::EditEmailAlarmDlg(bool Template, const KAEvent* event, bool newAlarm, QWidget* parent,
1059 return isTemplate() ? (isNewAlarm() ? i18nc("@title:window", "New Email Alarm Template") : i18nc("@title:window", "Edit Email Alarm Template"))
1060 : (isNewAlarm() ? i18nc("@title:window", "New Email Alarm") : i18nc("@title:window", "Edit Email Alarm"));
1068 setButtonWhatsThis(Try, i18nc("@info:whatsthis", "Send the email to the specified addressees now"));
1086 mEmailFromList->setWhatsThis(i18nc("@info:whatsthis", "Your email identity, used to identify you as the sender when sending email alarms."));
1098 mEmailToEdit->setWhatsThis(i18nc("@info:whatsthis", "Enter the addresses of the email recipients. Separate multiple addresses by "
1109 mEmailAddressButton->setWhatsThis(i18nc("@info:whatsthis", "Select email addresses from your address book."));
1144 mEmailAttachList->setWhatsThis(i18nc("@info:whatsthis", "Files to send as attachments to the email."));
1150 mEmailAddAttachButton->setWhatsThis(i18nc("@info:whatsthis", "Add an attachment to the email."));
1155 mEmailRemoveButton->setWhatsThis(i18nc("@info:whatsthis", "Remove the highlighted attachment from the email."));
1161 mEmailBcc->setWhatsThis(i18nc("@info:whatsthis", "If checked, the email will be blind copied to you."));
1311 void EditEmailAlarmDlg::type_setEvent(KAEvent& event, const KDateTime& dt, const QString& text, int lateCancel, bool trial)
1368 KAMessageBox::error(this, i18nc("@info", "Invalid email attachment: <filename>%1</filename>", att));
1372 if (trial && KAMessageBox::warningContinueCancel(this, i18nc("@info", "Do you really want to send the email now to the specified recipient(s)?"),
1373 i18nc("@action:button", "Confirm Email"), KGuiItem(i18nc("@action:button", "Send"))) != KMessageBox::Continue)
1399 msg = QLatin1String("<qt>") + i18nc("@info", "Email sent to:<nl/>%1<nl/>Bcc: <email>%2</email>",
1402 msg = QLatin1String("<qt>") + i18nc("@info", "Email sent to:<nl/>%1", to) + QLatin1String("</qt>");
1414 AutoQPointer<Akonadi::EmailAddressSelectionDialog> dlg = new Akonadi::EmailAddressSelectionDialog(this);
1434 QString url = KAlarm::browseFile(i18nc("@title:window", "Choose File to Attach"), mAttachDefaultDir, QString(),
1487 EditAudioAlarmDlg::EditAudioAlarmDlg(bool Template, QWidget* parent, GetResourceType getResource)
1495 EditAudioAlarmDlg::EditAudioAlarmDlg(bool Template, const KAEvent* event, bool newAlarm, QWidget* parent,
1512 return isTemplate() ? (isNewAlarm() ? i18nc("@title:window", "New Audio Alarm Template") : i18nc("@title:window", "Edit Audio Alarm Template"))
1513 : (isNewAlarm() ? i18nc("@title:window", "New Audio Alarm") : i18nc("@title:window", "Edit Audio Alarm"));
1542 mSoundConfig->set(event->audioFile(), event->soundVolume(), event->fadeVolume(), event->fadeSeconds(),
1618 void EditAudioAlarmDlg::type_setEvent(KAEvent& event, const KDateTime& dt, const QString& text, int lateCancel, bool trial)
1622 event.set(dt, QString(), QColor(), QColor(), QFont(), KAEvent::AUDIO, lateCancel, getAlarmFlags());
1730 mTypeScript->setWhatsThis(i18nc("@info:whatsthis", "Check to enter the contents of a script instead of a shell command line"));
1741 mScriptEdit->setWhatsThis(i18nc("@info:whatsthis", "Enter the contents of a script to execute"));
virtual KAEvent::Flags getAlarmFlags() const
Definition: editdlgtypes.cpp:586
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())
Definition: editdlgtypes.cpp:1563
virtual void setReadOnly(bool readOnly)
KUrl file() const
If the 'file' option is selected, returns the URL of the chosen file.
Definition: soundpicker.cpp:173
virtual KAEvent::Flags getAlarmFlags() const
Definition: editdlgtypes.cpp:1635
void getVolume(float &volume, float &fadeVolume, int &fadeSeconds) const
Definition: sounddlg.cpp:367
static QString i18n_chk_EnterScript()
Definition: editdlgtypes.cpp:724
static QString i18n_chk_ConfirmAck()
Definition: editdlgtypes.cpp:108
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:1311
void changed()
void setNoSelect()
virtual void setText(const QString &str)
static QString i18n_chk_CopyEmailToSelf()
Definition: editdlgtypes.cpp:1027
void setAudio(Preferences::SoundType, const QString &file=QString(), float volume=-1, int repeatPause=-1)
Definition: editdlgtypes.cpp:446
virtual QString type_caption() const
Definition: editdlgtypes.cpp:754
virtual void saveState(const KAEvent *)
Definition: editdlgtypes.cpp:1582
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:151
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:554
Definition: kalarmconfig.h:23
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:1538
virtual QByteArray text(quint32 serialNumber) const =0
Definition: kalarmconfig.h:23
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())
Definition: editdlgtypes.cpp:401
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:1066
void setReadOnly(bool readOnly)
Sets whether the widget can be changed the user.
Definition: soundpicker.cpp:111
Definition: editdlgtypes.cpp:82
static bool authorised()
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
radio button with an associated file picker
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:460
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:1519
virtual bool checkText(QString &result, bool showErrorMessage=true) const
Definition: editdlgtypes.cpp:1645
virtual void type_executedTry(const QString &text, void *obj)
Definition: editdlgtypes.cpp:1676
virtual void saveState(const KAEvent *)
Definition: editdlgtypes.cpp:1274
virtual Reminder * createReminder(QWidget *parent)
Definition: editdlgtypes.cpp:259
float volume(float &fadeVolume, int &fadeSeconds) const
Returns the volume and fade characteristics for playing a sound file.
Definition: soundpicker.cpp:182
void commandMessage(ShellProcess *, QWidget *parent)
Definition: kalarmapp.cpp:2337
virtual void type_showOptions(bool more)
Definition: editdlgtypes.cpp:859
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:1169
QString from() const
virtual bool type_stateChanged() const
Definition: editdlgtypes.cpp:908
QString text() const
EditAudioAlarmDlg(bool Template, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlgtypes.cpp:1487
virtual bool type_stateChanged() const
Definition: editdlgtypes.cpp:512
Definition: editdlgtypes.cpp:82
Definition: kalarmconfig.h:22
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:1618
the KAlarm application object
virtual QString type_caption() const
Definition: editdlgtypes.cpp:1057
static CheckBox * createConfirmAckCheckbox(QWidget *parent)
Definition: editdlgtypes.cpp:271
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:925
static QString convertAddresses(const QString &addresses, QList< KCal::Person > &)
Definition: kamail.cpp:481
void set(const QString &file, float volume, float fadeVolume=-1, int fadeSeconds=0, int repeatPause=-1)
Definition: sounddlg.cpp:307
static int checkAttachment(QString &attachment, KUrl *=0)
Definition: kamail.cpp:592
Definition: preferences.h:40
void set(Preferences::SoundType type, const QString &filename, float volume, float fadeVolume, int fadeSeconds, int repeatPause)
Initialises the widget's state.
Definition: soundpicker.cpp:210
static bool defaultAutoClose()
Get Auto-close window after late-cancellation time.
Definition: kalarmconfig.h:1039
void setReminder(int minutes, bool onceOnly)
Definition: editdlgtypes.cpp:450
virtual bool type_stateChanged() const
Definition: editdlgtypes.cpp:1293
Definition: editdlgtypes.cpp:82
virtual void type_executedTry(const QString &text, void *obj)
Definition: editdlgtypes.cpp:986
virtual bool checkText(QString &result, bool showErrorMessage=true) const
Definition: editdlgtypes.cpp:1013
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: editdlgtypes.cpp:1859
displays an alarm message
main application window
QString to() const
QString subject() const
Definition: specialactions.h:36
Definition: sounddlg.h:41
void setEmailFields(uint fromID, const QList< KCal::Person > &, const QString &subject, const QStringList &attachments)
Definition: editdlgtypes.cpp:1224
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())
Definition: editdlgtypes.cpp:1203
virtual void saveState(const KAEvent *)
Definition: editdlgtypes.cpp:482
void addButton(QAbstractButton *button)
Definition: kalarmconfig.h:23
Definition: emailidcombo.h:31
KAEvent::ExtraActionOptions options() const
Definition: specialactions.h:44
virtual bool type_validate(bool trial)
Definition: editdlgtypes.cpp:1333
virtual bool checkText(QString &result, bool showErrorMessage=true) const
Definition: editdlgtypes.cpp:673
virtual void setReadOnly(bool readOnly)
static bool canDecode(const QMimeData *md)
static bool defaultExecPreActionOnDeferral()
Get Execute pre-alarm action for deferred alarms.
Definition: kalarmconfig.h:1458
virtual void saveState(const KAEvent *)
Definition: editdlgtypes.cpp:894
static bool defaultDontShowPreActionError()
Get Do not notify pre-alarm action errors.
Definition: kalarmconfig.h:1512
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:1248
Definition: kalarmconfig.h:22
EditEmailAlarmDlg(bool Template, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlgtypes.cpp:1037
int repeatPause() const
Returns pause in seconds between repetitions of the sound file, or -1 if no repeat or 'file' option i...
Definition: soundpicker.cpp:202
virtual bool type_stateChanged() const
Definition: editdlgtypes.cpp:1596
virtual bool type_validate(bool trial)
Definition: editdlgtypes.cpp:947
EditDisplayAlarmDlg(bool Template, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlgtypes.cpp:118
virtual void setReadOnly(bool readOnly)
virtual KAEvent::Flags getAlarmFlags() const
Definition: editdlgtypes.cpp:1322
static int warningContinueCancel(QWidget *parent, ButtonCode defaultButton, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const QString &dontAskAgainName=QString())
virtual QString type_caption() const
Definition: editdlgtypes.cpp:1510
void setActions(const QString &pre, const QString &post, KAEvent::ExtraActionOptions)
Definition: specialactions.cpp:63
Definition: fontcolourbutton.h:32
static QString i18n_radio_ExecInTermWindow()
Definition: editdlgtypes.cpp:725
miscellaneous functions
static bool defaultCancelOnPreActionError()
Get Cancel alarm on pre-alarm action error.
Definition: kalarmconfig.h:1485
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
Definition: editdlg.h:61
Definition: soundpicker.h:35
Definition: editdlg_p.h:58
Definition: kalarmconfig.h:22
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:833
void setAudio(const QString &file, float volume=-1)
Definition: editdlgtypes.cpp:1555
Definition: kalarmconfig.h:22
void scriptToggled(bool)
virtual QString type_caption() const
Definition: editdlgtypes.cpp:142
void setButton(int id)
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:880
virtual KAEvent::Flags getAlarmFlags() const
Definition: editdlgtypes.cpp:936
virtual void type_showOptions(bool more)
Definition: editdlgtypes.cpp:366
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:281
static QString shiftWhatsThis()
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:763
EditCommandAlarmDlg(bool Template, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlgtypes.cpp:736
virtual void setReadOnly(bool ro, bool noHighlight=false)
Definition: fontcolourbutton.h:45
virtual bool checkText(QString &result, bool showErrorMessage=true) const
Definition: editdlgtypes.cpp:1467
static QString i18n_chk_ExecInTermWindow()
Definition: editdlgtypes.cpp:726
Definition: editdlg_p.h:46
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())
Definition: editdlgtypes.cpp:870
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:1573
Definition: reminder.h:32
static void information(QWidget *parent, const QString &text, const QString &caption=QString(), const QString &dontShowAgainName=QString(), Options options=Options(Notify|WindowModal))
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.