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(),
1619 void EditAudioAlarmDlg::type_setEvent(KAEvent& event, const KDateTime& dt, const QString& text, int lateCancel, bool trial)
1623 event.set(dt, QString(), QColor(), QColor(), QFont(), KAEvent::AUDIO, lateCancel, getAlarmFlags());
1731 mTypeScript->setWhatsThis(i18nc("@info:whatsthis", "Check to enter the contents of a script instead of a shell command line"));
1742 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:1564
void clear()
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
virtual void setReadOnly(bool readOnly)
void setHeight(int height)
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:1636
void getVolume(float &volume, float &fadeVolume, int &fadeSeconds) const
Definition: sounddlg.cpp:366
static QString i18n_chk_EnterScript()
Definition: editdlgtypes.cpp:724
static QString i18n_chk_ConfirmAck()
Definition: editdlgtypes.cpp:108
const QMimeData * mimeData() const
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:1311
void changed()
void setNoSelect()
virtual QSize sizeHint() const
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:1583
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:151
void setColor(ColorGroup group, ColorRole role, const QColor &color)
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:554
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:1538
virtual QByteArray text(quint32 serialNumber) const =0
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())
Definition: editdlgtypes.cpp:401
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:1066
QStyle * style() const
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const =0
void setReadOnly(bool readOnly)
Sets whether the widget can be changed the user.
Definition: soundpicker.cpp:111
Definition: editdlgtypes.cpp:82
virtual QSize sizeHint() const
static bool authorised()
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
virtual QSize minimumSizeHint() const
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:1646
virtual void type_executedTry(const QString &text, void *obj)
Definition: editdlgtypes.cpp:1677
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:2383
virtual void type_showOptions(bool more)
Definition: editdlgtypes.cpp:859
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:1169
QString from() const
void addSpacing(int size)
virtual QSize sizeHint() const
virtual bool type_stateChanged() const
Definition: editdlgtypes.cpp:908
QString homePath()
QString text() const
void setIcon(const QIcon &icon)
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
virtual void type_setEvent(KAEvent &, const KDateTime &, const QString &text, int lateCancel, bool trial)
Definition: editdlgtypes.cpp:1619
void clear()
void setBuddy(QWidget *buddy)
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:485
void set(const QString &file, float volume, float fadeVolume=-1, int fadeSeconds=0, int repeatPause=-1)
Definition: sounddlg.cpp:306
void setEnabled(bool)
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
static int checkAttachment(QString &attachment, KUrl *=0)
Definition: kamail.cpp:596
void append(const T &value)
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
void setReminder(int minutes, bool onceOnly)
Definition: editdlgtypes.cpp:450
bool isDir() const
virtual bool type_stateChanged() const
Definition: editdlgtypes.cpp:1293
Definition: editdlgtypes.cpp:82
void setFocus()
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
bool isEmpty() const
QString absoluteFilePath() const
bool isEmpty() const
QString trimmed() const
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: editdlgtypes.cpp:1860
displays an alarm message
main application window
QString to() const
QString subject() const
Definition: specialactions.h:36
Definition: sounddlg.h:41
bool setCurrent(const QString &path)
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: emailidcombo.h:31
void hide()
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
void setMargin(int margin)
virtual void setReadOnly(bool readOnly)
static bool canDecode(const QMimeData *md)
void ignore()
void setEnabled(bool enabled)
bool exists() const
virtual void saveState(const KAEvent *)
Definition: editdlgtypes.cpp:894
void setFixedSize(const QSize &s)
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:1248
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:1597
virtual bool type_validate(bool trial)
Definition: editdlgtypes.cpp:947
EditDisplayAlarmDlg(bool Template, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlgtypes.cpp:118
void setChecked(bool)
QString & replace(int position, int n, QChar after)
virtual void setReadOnly(bool readOnly)
virtual KAEvent::Flags getAlarmFlags() const
Definition: editdlgtypes.cpp:1322
void setWhatsThis(const 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
QStandardItem * itemFromIndex(const QModelIndex &index) const
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
void setColumnStretch(int column, int stretch)
Definition: soundpicker.h:35
Definition: editdlg_p.h:58
virtual QSize sizeHint() const
int height() const
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:833
void setAudio(const QString &file, float volume=-1)
Definition: editdlgtypes.cpp:1556
bool isWritable() const
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))
void scriptToggled(bool)
virtual QString type_caption() const
Definition: editdlgtypes.cpp:142
void setButton(int id)
void show()
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:880
virtual KAEvent::Flags getAlarmFlags() const
Definition: editdlgtypes.cpp:936
void setToolTip(const QString &)
virtual void type_showOptions(bool more)
Definition: editdlgtypes.cpp:366
virtual void type_initValues(const KAEvent *)
Definition: editdlgtypes.cpp:281
static QString shiftWhatsThis()
virtual QSize sizeHint() const
virtual void type_init(QWidget *parent, QVBoxLayout *frameLayout)
Definition: editdlgtypes.cpp:763
QString absolutePath() const
EditCommandAlarmDlg(bool Template, QWidget *parent=0, GetResourceType=RES_PROMPT)
Definition: editdlgtypes.cpp:736
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void setReadOnly(bool ro, bool noHighlight=false)
Definition: fontcolourbutton.h:45
QAbstractButton * checkedButton() const
virtual bool checkText(QString &result, bool showErrorMessage=true) const
Definition: editdlgtypes.cpp:1467
static QString i18n_chk_ExecInTermWindow()
Definition: editdlgtypes.cpp:726
bool setStretchFactor(QWidget *widget, int stretch)
void setSpacing(int spacing)
Definition: editdlg_p.h:46
void addLayout(QLayout *layout, int stretch)
virtual void setAction(KAEvent::SubAction, const AlarmText &=AlarmText())
Definition: editdlgtypes.cpp:870
virtual void setReadOnly(bool readOnly)
Definition: editdlgtypes.cpp:1574
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-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.