1415
1448
</itemizedlist>
1453
<title>Audio Alarms</title>
1455
<para>Audio alarms play an audio file without displaying any alarm
1458
<para>Set the following options:</para>
1462
<para>Enter the sound file path, or use the button beside the
1463
edit box to display a file selection dialogue.</para>
1467
<para>Tick <guilabel>Repeat</guilabel> to continually repeat the
1468
audio file until the <guilabel>Stop Play</guilabel> option is
1469
selected. To stop playing the file, select the
1470
<menuchoice><guimenu>Actions</guimenu>
1471
<guimenuitem>Stop Play</guimenuitem></menuchoice> menu option, or
1472
<mousebutton>Right</mousebutton> click on the system tray icon
1474
<menuchoice><guimenuitem>Stop Play</guimenuitem></menuchoice>
1475
from the context menu. If you wish, you can set up a global
1476
shortcut key for this action.</para>
1480
<para>Tick <guilabel>Volume</guilabel> and adjust the slider
1481
control if you want to adjust the volume at which the audio file is
1486
<para>If you wish, you can fade the volume. Fading means to start
1487
playing the audio file at one volume and gradually change to the final
1488
volume, over a specified time interval. The final volume is that
1489
entered in <guilabel>Volume</guilabel> above. To enable fade, tick
1490
<guilabel>Fade</guilabel>, and then enter the fade period in seconds
1491
in the <guilabel>Fade time</guilabel> field, and adjust the
1492
<guilabel>Initial volume</guilabel> slider.</para>
4205
<refentry id="scheduleAudio">
4207
<refentrytitle>scheduleAudio</refentrytitle>
4210
<refname>scheduleAudio</refname>
4211
<refpurpose>schedule a new alarm which executes a shell
4212
command.</refpurpose>
4216
bool scheduleAudio(const QString& <replaceable>audioURL</replaceable>,
4217
int <replaceable>volumePercent</replaceable>,
4218
const QString& <replaceable>startDateTime</replaceable>,
4219
int <replaceable>lateCancel</replaceable>,
4220
unsigned <replaceable>flags</replaceable>,
4221
const QString& <replaceable>recurrence</replaceable>,
4222
int <replaceable>subRepeatInterval</replaceable>,
4223
int <replaceable>subRepeatCount</replaceable>)
4226
bool scheduleAudio(const QString& <replaceable>audioURL</replaceable>,
4227
int <replaceable>volumePercent</replaceable>,
4228
const QString& <replaceable>startDateTime</replaceable>,
4229
int <replaceable>lateCancel</replaceable>,
4230
unsigned <replaceable>flags</replaceable>,
4231
int <replaceable>recurType</replaceable>,
4232
int <replaceable>recurInterval</replaceable>,
4233
int <replaceable>recurCount</replaceable>)
4236
bool scheduleAudio(const QString& <replaceable>audioURL</replaceable>,
4237
int <replaceable>volumePercent</replaceable>,
4238
const QString& <replaceable>startDateTime</replaceable>,
4239
int <replaceable>lateCancel</replaceable>,
4240
unsigned <replaceable>flags</replaceable>,
4241
int <replaceable>recurType</replaceable>,
4242
int <replaceable>recurInterval</replaceable>,
4243
const QString& <replaceable>endDateTime</replaceable>)
4247
<title>Parameters</title>
4250
<term><parameter>audioURL</parameter></term>
4252
<para>Specifies the audio file which is to be played.</para>
4257
<term><parameter>volumePercent</parameter></term>
4259
<para>Specifies the volume level to use, as a percentage of full
4260
volume. Specify -1 to use the default volume.</para>
4265
<term><parameter>startDateTime</parameter></term>
4267
<para>Specifies the scheduled date, or date and time, at which the
4268
message should be displayed. For a date-only alarm, the string should
4269
be in the format <replaceable>YYYY-MM-DD [TZ]</replaceable> (as
4270
returned by <methodname>QDate::toString(Qt::ISODate)</methodname>). For
4271
an alarm with a date and time, the string should be in the format
4272
<replaceable>YYYY-MM-DDTHH:MM[:SS] [TZ]</replaceable> (as returned by
4273
<methodname>QDateTime::toString(Qt::ISODate)</methodname>) or
4274
<replaceable>HH:MM[:SS] [Clock]</replaceable> (as returned by
4275
<methodname>QTime::toString(Qt::ISODate)</methodname>). If no date is
4276
specified, today's date is used. Note that any seconds value is
4279
<para>If no time zone is specified, the local system time zone is
4280
assumed. If a time zone specifier <replaceable>TZ</replaceable> is
4281
present, it may be the name of a system time zone (⪚
4282
<userinput>Europe/London</userinput>), <userinput>UTC</userinput>
4283
representing the UTC time zone, or <userinput>Clock</userinput> to use
4284
the local computer clock and ignore time zones.</para>
4289
<term><parameter>lateCancel</parameter></term>
4291
<para>Causes the alarm to be cancelled if it cannot be triggered within
4292
the specified number of minutes after the alarm's scheduled time. If
4293
the value is 0, the alarm will not be cancelled no matter how late it
4294
is triggered.</para>
4299
<term><parameter>flags</parameter></term>
4301
<para>Specifies the logical OR of the desired alarm flags. The flag
4302
bits are those defined in class <classname>KAlarmIface</classname> in
4303
<filename>kalarmiface.h</filename>. Note that not all flag bits are
4304
applicable to command alarms.</para>
4309
<term><parameter>recurrence</parameter></term>
4311
<para>Specifies a regular recurrence for the alarm, using iCalendar
4312
syntax as defined in
4313
<ulink url="http://www.w3.org/2002/12/cal/rfc2445.html">RFC2445</ulink>.
4314
For example, <quote>FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO</quote>
4315
would specify 4 repetitions at 3-monthly intervals on the last Monday
4316
of the month. For a non-recurring alarm, specify an empty
4322
<term><parameter>recurType</parameter></term>
4324
<para>Specifies the recurrence type for the alarm. The permissible
4325
values are MINUTELY, DAILY, WEEKLY, MONTHLY, YEARLY. These
4326
are defined in class <classname>KAlarmIface</classname> in
4327
<filename>kalarmiface.h</filename>. Monthly recurrences are of the
4328
day of the month type, and yearly recurrences are of the date in
4329
the year type, with the date in both cases taken from the
4330
<parameter>startDateTime</parameter> parameter.</para>
4335
<term><parameter>recurInterval</parameter></term>
4337
<para>Specifies the number of periods
4338
(minutes/days/weeks/months/years as specified by
4339
<parameter>recurType</parameter>) between recurrences of the
4345
<term><parameter>recurCount</parameter></term>
4347
<para>Specifies the number of times that the alarm should be
4348
repeated. Specify -1 to repeat the alarm indefinitely.</para>
4353
<term><parameter>endDateTime</parameter></term>
4355
<para>Specifies the end date, or date and time, for recurrences of the
4356
alarm. If <parameter>startDateTime</parameter> includes a time, this
4357
parameter must also include a time; if <parameter>startDateTime</parameter>
4358
contains only a date, this parameter must also contain only a
4359
date. It must not contain a time zone specifier; the same time zone as
4360
for <parameter>startDateTime</parameter> is used to interpret this
4361
parameter's value.</para>
4366
<term><parameter>subRepeatInterval</parameter></term>
4368
<para>Specifies the number of minutes between sub-repetitions of
4369
the alarm. Specify 0 for no sub-repetition. Ignored if no recurrence
4370
is specified.</para>
4375
<term><parameter>subRepeatCount</parameter></term>
4377
<para>Specifies the number of sub-repetitions of the alarm,
4378
including the initial occurrence.</para>
4386
<title>Description</title>
4387
<para><function>scheduleAudio()</function> is a D-Bus call to
4388
schedule the specified audio file to be played at the specified date
4389
and time. Apart from specifying a volume and omitting the message
4390
colour and font parameters, its usage is identical to
4391
<link linkend="scheduleMessage-descrip"><function>scheduleMessage</function></link>
4392
- see the description of that function for further details.</para>
4099
4396
<refentry id="dbus_edit">
4101
4398
<refentrytitle>edit</refentrytitle>