Commit 7dcd0e7a authored by David Jarvie's avatar David Jarvie

Provide notification option on command line and via D-Bus

parent 4c70f22f
Pipeline #35458 passed with stage
in 33 minutes and 49 seconds
KAlarm Change Log KAlarm Change Log
=== Version 3.1.0 (KDE Applications 20.12) --- 21 September 2020 === === Version 3.1.0 (KDE Applications 20.12) --- 24 September 2020 ===
+ Add option to show alarm message as a notification instead of in a window [KDE Bug 345922] + Add option to show alarm message as a notification instead of in a window [KDE Bug 345922]
=== Version 3.0.2 (KDE Applications 20.08.2) --- 16 September 2020 === === Version 3.0.2 (KDE Applications 20.08.2) --- 16 September 2020 ===
......
...@@ -139,6 +139,9 @@ QStringList CommandOptions::setOptions(QCommandLineParser* parser, const QString ...@@ -139,6 +139,9 @@ QStringList CommandOptions::setOptions(QCommandLineParser* parser, const QString
= new QCommandLineOption(QStringList{QStringLiteral("m"), QStringLiteral("mail")}, = new QCommandLineOption(QStringList{QStringLiteral("m"), QStringLiteral("mail")},
i18n("Send an email to the given address (repeat as needed)"), i18n("Send an email to the given address (repeat as needed)"),
QStringLiteral("address")); QStringLiteral("address"));
mOptions[NOTIFY]
= new QCommandLineOption(QStringList{QStringLiteral("n"), QStringLiteral("notify")},
i18n("Display alarm message as a notification"));
mOptions[PLAY] mOptions[PLAY]
= new QCommandLineOption(QStringList{QStringLiteral("p"), QStringLiteral("play")}, = new QCommandLineOption(QStringList{QStringLiteral("p"), QStringLiteral("play")},
i18n("Audio file to play once"), i18n("Audio file to play once"),
...@@ -389,6 +392,7 @@ void CommandOptions::process() ...@@ -389,6 +392,7 @@ void CommandOptions::process()
checkEditType(EditAlarmDlg::DISPLAY, REMINDER_ONCE); checkEditType(EditAlarmDlg::DISPLAY, REMINDER_ONCE);
checkEditType(EditAlarmDlg::DISPLAY, ACK_CONFIRM); checkEditType(EditAlarmDlg::DISPLAY, ACK_CONFIRM);
checkEditType(EditAlarmDlg::DISPLAY, AUTO_CLOSE); checkEditType(EditAlarmDlg::DISPLAY, AUTO_CLOSE);
checkEditType(EditAlarmDlg::DISPLAY, NOTIFY);
checkEditType(EditAlarmDlg::EMAIL, SUBJECT); checkEditType(EditAlarmDlg::EMAIL, SUBJECT);
checkEditType(EditAlarmDlg::EMAIL, FROM_ID); checkEditType(EditAlarmDlg::EMAIL, FROM_ID);
checkEditType(EditAlarmDlg::EMAIL, ATTACH); checkEditType(EditAlarmDlg::EMAIL, ATTACH);
...@@ -584,6 +588,20 @@ void CommandOptions::process() ...@@ -584,6 +588,20 @@ void CommandOptions::process()
else if (mParser->isSet(*mOptions.at(AUTO_CLOSE))) else if (mParser->isSet(*mOptions.at(AUTO_CLOSE)))
setErrorRequires(AUTO_CLOSE, LATE_CANCEL); setErrorRequires(AUTO_CLOSE, LATE_CANCEL);
if (mParser->isSet(*mOptions.at(NOTIFY)))
{
if (mParser->isSet(*mOptions.at(COLOUR)))
setErrorIncompatible(NOTIFY, COLOUR);
if (mParser->isSet(*mOptions.at(COLOURFG)))
setErrorIncompatible(NOTIFY, COLOURFG);
if (mParser->isSet(*mOptions.at(ACK_CONFIRM)))
setErrorIncompatible(NOTIFY, ACK_CONFIRM);
if (mParser->isSet(*mOptions.at(PLAY)))
setErrorIncompatible(NOTIFY, PLAY);
if (mParser->isSet(*mOptions.at(AUTO_CLOSE)))
setErrorIncompatible(NOTIFY, AUTO_CLOSE);
}
if (mParser->isSet(*mOptions.at(ACK_CONFIRM))) if (mParser->isSet(*mOptions.at(ACK_CONFIRM)))
mFlags |= KAEvent::CONFIRM_ACK; mFlags |= KAEvent::CONFIRM_ACK;
if (mParser->isSet(*mOptions.at(AUTO_CLOSE))) if (mParser->isSet(*mOptions.at(AUTO_CLOSE)))
...@@ -592,6 +610,8 @@ void CommandOptions::process() ...@@ -592,6 +610,8 @@ void CommandOptions::process()
mFlags |= KAEvent::BEEP; mFlags |= KAEvent::BEEP;
if (mParser->isSet(*mOptions.at(SPEAK))) if (mParser->isSet(*mOptions.at(SPEAK)))
mFlags |= KAEvent::SPEAK; mFlags |= KAEvent::SPEAK;
if (mParser->isSet(*mOptions.at(NOTIFY)))
mFlags |= KAEvent::NOTIFY;
if (mParser->isSet(*mOptions.at(KORGANIZER))) if (mParser->isSet(*mOptions.at(KORGANIZER)))
mFlags |= KAEvent::COPY_KORGANIZER; mFlags |= KAEvent::COPY_KORGANIZER;
if (mParser->isSet(*mOptions.at(DISABLE))) if (mParser->isSet(*mOptions.at(DISABLE)))
...@@ -647,6 +667,8 @@ void CommandOptions::process() ...@@ -647,6 +667,8 @@ void CommandOptions::process()
errors << optionName(REMINDER_ONCE); errors << optionName(REMINDER_ONCE);
if (mParser->isSet(*mOptions.at(SPEAK))) if (mParser->isSet(*mOptions.at(SPEAK)))
errors << optionName(SPEAK); errors << optionName(SPEAK);
if (mParser->isSet(*mOptions.at(NOTIFY)))
errors << optionName(NOTIFY);
if (mParser->isSet(*mOptions.at(SUBJECT))) if (mParser->isSet(*mOptions.at(SUBJECT)))
errors << optionName(SUBJECT); errors << optionName(SUBJECT);
if (mParser->isSet(*mOptions.at(TIME))) if (mParser->isSet(*mOptions.at(TIME)))
......
...@@ -25,148 +25,149 @@ using namespace KAlarmCal; ...@@ -25,148 +25,149 @@ using namespace KAlarmCal;
class CommandOptions class CommandOptions
{ {
public: public:
enum Command enum Command
{ {
CMD_ERROR, // error in command line options CMD_ERROR, // error in command line options
NONE, // no command NONE, // no command
TRAY, // --tray TRAY, // --tray
TRIGGER_EVENT, // --triggerEvent TRIGGER_EVENT, // --triggerEvent
CANCEL_EVENT, // --cancelEvent CANCEL_EVENT, // --cancelEvent
EDIT, // --edit EDIT, // --edit
EDIT_NEW_PRESET, // --edit-new-preset EDIT_NEW_PRESET, // --edit-new-preset
EDIT_NEW, // --edit-new-display, --edit-new-command, --edit-new-email EDIT_NEW, // --edit-new-display, --edit-new-command, --edit-new-email
NEW, // --file, --exec-display, --exec, --mail, message NEW, // --file, --exec-display, --exec, --mail, message
LIST // --list LIST // --list
}; };
QStringList setOptions(QCommandLineParser*, const QStringList& args); QStringList setOptions(QCommandLineParser*, const QStringList& args);
static CommandOptions* firstInstance() { return mFirstInstance; } static CommandOptions* firstInstance() { return mFirstInstance; }
CommandOptions(); CommandOptions();
void parse(); void parse();
void process(); void process();
Command command() const { return mCommand; } Command command() const { return mCommand; }
QString commandName() const { return optionName(mCommandOpt); } QString commandName() const { return optionName(mCommandOpt); }
QString eventId() const { return mEventId; } QString eventId() const { return mEventId; }
QString resourceId() const { return mResourceId; } QString resourceId() const { return mResourceId; }
QString templateName() const { return mTemplateName; } QString templateName() const { return mTemplateName; }
EditAlarmDlg::Type editType() const { return mEditType; } EditAlarmDlg::Type editType() const { return mEditType; }
KAEvent::SubAction editAction() const { return mEditAction; } KAEvent::SubAction editAction() const { return mEditAction; }
QString text() const { return mText; } QString text() const { return mText; }
KADateTime alarmTime() const { return mAlarmTime; } KADateTime alarmTime() const { return mAlarmTime; }
KARecurrence* recurrence() const { return mRecurrence; } KARecurrence* recurrence() const { return mRecurrence; }
int subRepeatCount() const { return mRepeatCount; } int subRepeatCount() const { return mRepeatCount; }
KCalendarCore::Duration subRepeatInterval() const { return mRepeatInterval; } KCalendarCore::Duration subRepeatInterval() const { return mRepeatInterval; }
int lateCancel() const { return mLateCancel; } int lateCancel() const { return mLateCancel; }
QColor bgColour() const { return mBgColour; } QColor bgColour() const { return mBgColour; }
QColor fgColour() const { return mFgColour; } QColor fgColour() const { return mFgColour; }
int reminderMinutes() const { return mReminderMinutes; } int reminderMinutes() const { return mReminderMinutes; }
QString audioFile() const { return mAudioFile; } QString audioFile() const { return mAudioFile; }
float audioVolume() const { return mAudioVolume; } float audioVolume() const { return mAudioVolume; }
KCalendarCore::Person::List addressees() const { return mAddressees; } KCalendarCore::Person::List addressees() const { return mAddressees; }
QStringList attachments() const { return mAttachments; } QStringList attachments() const { return mAttachments; }
QString subject() const { return mSubject; } QString subject() const { return mSubject; }
uint fromID() const { return mFromID; } uint fromID() const { return mFromID; }
KAEvent::Flags flags() const { return mFlags; } KAEvent::Flags flags() const { return mFlags; }
bool disableAll() const { return mDisableAll; } bool disableAll() const { return mDisableAll; }
QString outputText() const { return mError; } QString outputText() const { return mError; }
#ifndef NDEBUG #ifndef NDEBUG
KADateTime simulationTime() const { return mSimulationTime; } KADateTime simulationTime() const { return mSimulationTime; }
#endif #endif
static void printError(const QString& errmsg); static void printError(const QString& errmsg);
private: private:
enum Option enum Option
{ {
ACK_CONFIRM, ACK_CONFIRM,
ATTACH, ATTACH,
AUTO_CLOSE, AUTO_CLOSE,
BCC, BCC,
BEEP, BEEP,
COLOUR, COLOUR,
COLOURFG, COLOURFG,
OptCANCEL_EVENT, OptCANCEL_EVENT,
DISABLE, DISABLE,
DISABLE_ALL, DISABLE_ALL,
EXEC, EXEC,
EXEC_DISPLAY, EXEC_DISPLAY,
OptEDIT, OptEDIT,
EDIT_NEW_DISPLAY, EDIT_NEW_DISPLAY,
EDIT_NEW_COMMAND, EDIT_NEW_COMMAND,
EDIT_NEW_EMAIL, EDIT_NEW_EMAIL,
EDIT_NEW_AUDIO, EDIT_NEW_AUDIO,
OptEDIT_NEW_PRESET, OptEDIT_NEW_PRESET,
FILE, FILE,
FROM_ID, FROM_ID,
INTERVAL, INTERVAL,
KORGANIZER, KORGANIZER,
LATE_CANCEL, LATE_CANCEL,
OptLIST, OptLIST,
LOGIN, LOGIN,
MAIL, MAIL,
PLAY, NOTIFY,
PLAY_REPEAT, PLAY,
RECURRENCE, PLAY_REPEAT,
REMINDER, RECURRENCE,
REMINDER_ONCE, REMINDER,
REPEAT, REMINDER_ONCE,
SPEAK, REPEAT,
SUBJECT, SPEAK,
SUBJECT,
#ifndef NDEBUG #ifndef NDEBUG
TEST_SET_TIME, TEST_SET_TIME,
#endif #endif
TIME, TIME,
OptTRAY, OptTRAY,
OptTRIGGER_EVENT, OptTRIGGER_EVENT,
UNTIL, UNTIL,
VOLUME, VOLUME,
Num_Options, // number of Option values Num_Options, // number of Option values
Opt_Message // special value representing "message" Opt_Message // special value representing "message"
}; };
bool checkCommand(Option, Command, EditAlarmDlg::Type = EditAlarmDlg::NO_TYPE); bool checkCommand(Option, Command, EditAlarmDlg::Type = EditAlarmDlg::NO_TYPE);
void setError(const QString& error); void setError(const QString& error);
void setErrorRequires(Option opt, Option opt2, Option opt3 = Num_Options); void setErrorRequires(Option opt, Option opt2, Option opt3 = Num_Options);
void setErrorParameter(Option); void setErrorParameter(Option);
void setErrorIncompatible(Option opt1, Option opt2); void setErrorIncompatible(Option opt1, Option opt2);
void checkEditType(EditAlarmDlg::Type type, Option opt) void checkEditType(EditAlarmDlg::Type type, Option opt)
{ checkEditType(type, EditAlarmDlg::NO_TYPE, opt); } { checkEditType(type, EditAlarmDlg::NO_TYPE, opt); }
void checkEditType(EditAlarmDlg::Type, EditAlarmDlg::Type, Option); void checkEditType(EditAlarmDlg::Type, EditAlarmDlg::Type, Option);
QString arg(int n); QString arg(int n);
QString optionName(Option, bool shortName = false) const; QString optionName(Option, bool shortName = false) const;
static CommandOptions* mFirstInstance; // the first instance static CommandOptions* mFirstInstance; // the first instance
QCommandLineParser* mParser {nullptr}; QCommandLineParser* mParser {nullptr};
QVector<QCommandLineOption*> mOptions; // all possible command line options QVector<QCommandLineOption*> mOptions; // all possible command line options
QStringList mNonExecArguments; // arguments except for --exec or --exec-display parameters QStringList mNonExecArguments; // arguments except for --exec or --exec-display parameters
QStringList mExecArguments; // arguments for --exec or --exec-display QStringList mExecArguments; // arguments for --exec or --exec-display
QString mError; // error message QString mError; // error message
Command mCommand {NONE}; // the selected command Command mCommand {NONE}; // the selected command
Option mCommandOpt; // option for the selected command Option mCommandOpt; // option for the selected command
QString mEventId; // TRIGGER_EVENT, CANCEL_EVENT, EDIT: event ID QString mEventId; // TRIGGER_EVENT, CANCEL_EVENT, EDIT: event ID
QString mResourceId; // TRIGGER_EVENT, CANCEL_EVENT, EDIT: optional resource ID QString mResourceId; // TRIGGER_EVENT, CANCEL_EVENT, EDIT: optional resource ID
QString mTemplateName; // EDIT_NEW_PRESET: template name QString mTemplateName; // EDIT_NEW_PRESET: template name
EditAlarmDlg::Type mEditType; // NEW, EDIT_NEW_*: alarm edit type EditAlarmDlg::Type mEditType; // NEW, EDIT_NEW_*: alarm edit type
KAEvent::SubAction mEditAction; // NEW: alarm edit sub-type KAEvent::SubAction mEditAction; // NEW: alarm edit sub-type
bool mEditActionSet {false}; // NEW: mEditAction is valid bool mEditActionSet {false}; // NEW: mEditAction is valid
QString mText; // NEW: alarm text QString mText; // NEW: alarm text
KADateTime mAlarmTime; // NEW: alarm time KADateTime mAlarmTime; // NEW: alarm time
KARecurrence* mRecurrence {nullptr}; // NEW: recurrence KARecurrence* mRecurrence {nullptr}; // NEW: recurrence
int mRepeatCount {0}; // NEW: sub-repetition count int mRepeatCount {0}; // NEW: sub-repetition count
KCalendarCore::Duration mRepeatInterval {0}; // NEW: sub-repetition interval KCalendarCore::Duration mRepeatInterval {0}; // NEW: sub-repetition interval
int mLateCancel {0}; // NEW: late-cancellation interval int mLateCancel {0}; // NEW: late-cancellation interval
QColor mBgColour; // NEW: background colour QColor mBgColour; // NEW: background colour
QColor mFgColour; // NEW: foreground colour QColor mFgColour; // NEW: foreground colour
int mReminderMinutes {0}; // NEW: reminder period int mReminderMinutes {0}; // NEW: reminder period
QString mAudioFile; // NEW: audio file path QString mAudioFile; // NEW: audio file path
float mAudioVolume {-1.0f}; // NEW: audio file volume float mAudioVolume {-1.0f}; // NEW: audio file volume
KCalendarCore::Person::List mAddressees; // NEW: email addressees KCalendarCore::Person::List mAddressees; // NEW: email addressees
QStringList mAttachments; // NEW: email attachment file names QStringList mAttachments; // NEW: email attachment file names
QString mSubject; // NEW: email subject QString mSubject; // NEW: email subject
uint mFromID {0}; // NEW: email sender ID uint mFromID {0}; // NEW: email sender ID
KAEvent::Flags mFlags; // NEW: event flags KAEvent::Flags mFlags; // NEW: event flags
bool mDisableAll {false}; // disable all alarm monitoring bool mDisableAll {false}; // disable all alarm monitoring
#ifndef NDEBUG #ifndef NDEBUG
KADateTime mSimulationTime; // system time to be simulated, or invalid if none KADateTime mSimulationTime; // system time to be simulated, or invalid if none
#endif #endif
}; };
......
...@@ -488,6 +488,7 @@ KAEvent::Flags DBusHandler::convertStartFlags(const KADateTime& start, unsigned ...@@ -488,6 +488,7 @@ KAEvent::Flags DBusHandler::convertStartFlags(const KADateTime& start, unsigned
if (flags & EXCL_HOLIDAYS) kaEventFlags |= KAEvent::EXCL_HOLIDAYS; if (flags & EXCL_HOLIDAYS) kaEventFlags |= KAEvent::EXCL_HOLIDAYS;
if (flags & WORK_TIME_ONLY) kaEventFlags |= KAEvent::WORK_TIME_ONLY; if (flags & WORK_TIME_ONLY) kaEventFlags |= KAEvent::WORK_TIME_ONLY;
if (flags & DISABLED) kaEventFlags |= KAEvent::DISABLED; if (flags & DISABLED) kaEventFlags |= KAEvent::DISABLED;
if (flags & NOTIFY) kaEventFlags |= KAEvent::NOTIFY;
if (start.isDateOnly()) kaEventFlags |= KAEvent::ANY_TIME; if (start.isDateOnly()) kaEventFlags |= KAEvent::ANY_TIME;
return kaEventFlags; return kaEventFlags;
} }
......
...@@ -469,6 +469,10 @@ void EditDisplayAlarmDlg::setFgColour(const QColor& colour) ...@@ -469,6 +469,10 @@ void EditDisplayAlarmDlg::setFgColour(const QColor& colour)
mFontColourButton->setFgColour(colour); mFontColourButton->setFgColour(colour);
setColours(colour, mFontColourButton->bgColour()); setColours(colour, mFontColourButton->bgColour());
} }
void EditDisplayAlarmDlg::setNotify(bool notify)
{
mDisplayMethodCombo->setCurrentIndex(notify ? dNOTIFY : dWINDOW);
}
void EditDisplayAlarmDlg::setConfirmAck(bool confirm) void EditDisplayAlarmDlg::setConfirmAck(bool confirm)
{ {
mConfirmAck->setChecked(confirm); mConfirmAck->setChecked(confirm);
......
...@@ -50,6 +50,7 @@ public: ...@@ -50,6 +50,7 @@ public:
void setAction(KAEvent::SubAction, const AlarmText& = AlarmText()) override; void setAction(KAEvent::SubAction, const AlarmText& = AlarmText()) override;
void setBgColour(const QColor&); void setBgColour(const QColor&);
void setFgColour(const QColor&); void setFgColour(const QColor&);
void setNotify(bool);
void setConfirmAck(bool); void setConfirmAck(bool);
void setAutoClose(bool); void setAutoClose(bool);
void setAudio(Preferences::SoundType, const QString& file = QString(), float volume = -1, int repeatPause = -1); void setAudio(Preferences::SoundType, const QString& file = QString(), float volume = -1, int repeatPause = -1);
......
...@@ -499,6 +499,8 @@ int KAlarmApp::activateInstance(const QStringList& args, const QString& workingD ...@@ -499,6 +499,8 @@ int KAlarmApp::activateInstance(const QStringList& args, const QString& workingD
} }
if (options->reminderMinutes()) if (options->reminderMinutes())
dlg->setReminder(options->reminderMinutes(), (options->flags() & KAEvent::REMINDER_ONCE)); dlg->setReminder(options->reminderMinutes(), (options->flags() & KAEvent::REMINDER_ONCE));
if (options->flags() & KAEvent::NOTIFY)
dlg->setNotify(true);
if (options->flags() & KAEvent::CONFIRM_ACK) if (options->flags() & KAEvent::CONFIRM_ACK)
dlg->setConfirmAck(true); dlg->setConfirmAck(true);
if (options->flags() & KAEvent::AUTO_CLOSE) if (options->flags() & KAEvent::AUTO_CLOSE)
......
/* /*
* kalarmiface.h - D-Bus interface to KAlarm * kalarmiface.h - D-Bus interface to KAlarm
* Program: kalarm * Program: kalarm
* SPDX-FileCopyrightText: 2004-2009 David Jarvie <djarvie@kde.org> * SPDX-FileCopyrightText: 2004-2020 David Jarvie <djarvie@kde.org>
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
*/ */
...@@ -17,68 +17,47 @@ ...@@ -17,68 +17,47 @@
class KAlarmIface class KAlarmIface
{ {
public: public:
/** Bit values for the @p flags parameter of "scheduleXxxx()" D-Bus calls. /** Bit values for the @p flags parameter of "scheduleXxxx()" D-Bus calls.
* The bit values may be OR'ed together. * The bit values may be OR'ed together.
* @li REPEAT_AT_LOGIN - repeat the alarm at every login. */
* @li BEEP - sound an audible beep when the alarm is displayed. enum Flags
* @li SPEAK - speak the alarm message when it is displayed. {
* @li REPEAT_SOUND - repeat the sound file while the alarm is displayed. REPEAT_AT_LOGIN = 0x01, //!< repeat the alarm at every login
* @li CONFIRM_ACK - closing the alarm message window requires a confirmation prompt. BEEP = 0x02, //!< sound an audible beep when the alarm is displayed
* @li AUTO_CLOSE - auto-close the alarm window after the late-cancel period. REPEAT_SOUND = 0x08, //!< repeat the sound file while the alarm is displayed
* @li DISPLAY_COMMAND - display command output in the alarm window. CONFIRM_ACK = 0x04, //!< closing the alarm message window requires a confirmation prompt
* @li SCRIPT - the command to execute is a script, not a shell command line. AUTO_CLOSE = 0x10, //!< auto-close the alarm window after the late-cancel period
* @li EXEC_IN_XTERM - execute the command alarm in a terminal window. EMAIL_BCC = 0x20, //!< send a blind copy of the email to the user
* @li EMAIL_BCC - send a blind copy the email to the user. DISABLED = 0x40, //!< set the alarm status to disabled
* @li SHOW_IN_KORG - show the alarm as an event in KOrganizer SCRIPT = 0x80, //!< the command to execute is a script, not a shell command line
* @li EXCL_HOLIDAYS - do not trigger the alarm on holidays EXEC_IN_XTERM = 0x100, //!< execute the command alarm in a terminal window
* @li WORK_TIME_ONLY - do not trigger the alarm outside working hours (or on holidays) SPEAK = 0x200, //!< speak the alarm message when it is displayed
* @li DISABLED - set the alarm status to disabled. SHOW_IN_KORG = 0x400, //!< show the alarm as an event in KOrganizer
*/ DISPLAY_COMMAND = 0x800, //!< display command output in the alarm window
enum Flags EXCL_HOLIDAYS = 0x1000, //!< don't trigger the alarm on holidays
{ WORK_TIME_ONLY = 0x2000, //!< do not trigger the alarm outside working hours (or on holidays)
REPEAT_AT_LOGIN = 0x01, // repeat alarm at every login NOTIFY = 0x4000 //!< display the alarm message as a notification
BEEP = 0x02, // sound audible beep when alarm is displayed };
REPEAT_SOUND = 0x08, // repeat sound file while alarm is displayed
CONFIRM_ACK = 0x04, // closing the alarm message window requires confirmation prompt /** Values for the @p repeatType parameter of "scheduleXxxx()" D-Bus calls. */
AUTO_CLOSE = 0x10, // auto-close alarm window after late-cancel period enum RecurType
EMAIL_BCC = 0x20, // blind copy the email to the user {
DISABLED = 0x40, // alarm is currently disabled MINUTELY = 1, //!< the repeat interval is measured in minutes
SCRIPT = 0x80, // command is a script, not a shell command line DAILY = 2, //!< the repeat interval is measured in days
EXEC_IN_XTERM = 0x100, // execute command alarm in terminal window WEEKLY = 3, //!< the repeat interval is measured in weeks
SPEAK = 0x200, // speak the alarm message when it is displayed MONTHLY = 4, //!< the repeat interval is measured in months
SHOW_IN_KORG = 0x400, // show the alarm as an event in KOrganizer YEARLY = 5 //!< the repeat interval is measured in years
DISPLAY_COMMAND = 0x800, // display command output in alarm window };
EXCL_HOLIDAYS = 0x1000, // don't trigger alarm on holidays
WORK_TIME_ONLY = 0x2000 // trigger only during working hours /** Values for the @p type parameter of "editNew()" D-Bus call. */
}; enum AlarmType
/** Values for the @p repeatType parameter of "scheduleXxxx()" D-Bus calls. {
* @li MINUTELY - the repeat interval is measured in minutes. DISPLAY = 1, //!< create a display alarm
* @li DAILY - the repeat interval is measured in days. COMMAND = 2, //!< create a command alarm
* @li WEEKLY - the repeat interval is measured in weeks. EMAIL = 3, //!< create an email alarm
* @li MONTHLY - the repeat interval is measured in months. AUDIO = 4 //!< create an audio alarm
* @li YEARLY - the repeat interval is measured in years. };
*/
enum RecurType
{
MINUTELY = 1, // the repeat interval is measured in minutes
DAILY = 2, // the repeat interval is measured in days
WEEKLY = 3, // the repeat interval is measured in weeks
MONTHLY = 4, // the repeat interval is measured in months
YEARLY = 5 // the repeat interval is measured in years
};
/** Values for the @p type parameter of "editNew()" D-Bus call.
* @li DISPLAY - create a display alarm.
* @li COMMAND - create a command alarm.
* @li EMAIL - create an email alarm.
*/
enum AlarmType
{
DISPLAY = 1, // display alarm
COMMAND = 2, // command alarm
EMAIL = 3, // email alarm
AUDIO = 4 // audio alarm
};
}; };
#endif // KALARMIFACE_H #endif // KALARMIFACE_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment