kpilot/lib
PilotDateEntry Class Reference
#include <pilotDateEntry.h>
Inheritance diagram for PilotDateEntry:

Detailed Description
This class is a wrapper for pilot-link's datebook entries (struct Appointment).
Definition at line 48 of file pilotDateEntry.h.
Public Member Functions | |
PilotDateEntry (struct AppointmentAppInfo &appInfo) | |
PilotDateEntry (struct AppointmentAppInfo &appInfo, PilotRecord *rec) | |
PilotDateEntry (const PilotDateEntry &e) | |
~PilotDateEntry () | |
PilotDateEntry & | operator= (const PilotDateEntry &e) |
virtual QString | getTextRepresentation (bool richText=false) |
bool | doesFloat () const |
bool | isEvent () const |
int KDE_DEPRECATED | getEvent () const |
void | setFloats (bool f) |
void KDE_DEPRECATED | setEvent (int event) |
tm | getEventStart () const |
tm * | getEventStart_p () const |
void | setEventStart (struct tm &start) |
QDateTime | dtStart () const |
tm | getEventEnd () const |
tm * | getEventEnd_p () const |
void | setEventEnd (struct tm &end) |
QDateTime | dtEnd () const |
bool | isAlarmEnabled () const |
int KDE_DEPRECATED | getAlarm () const |
void KDE_DEPRECATED | setAlarm (int alarm) |
void | setAlarmEnabled (bool b) |
int | getAdvance () const |
void | setAdvance (int advance) |
int | getAdvanceUnits () const |
void | setAdvanceUnits (int units) |
unsigned int | alarmLeadTime () const |
QDateTime | dtAlarm () const |
repeatTypes | getRepeatType () const |
void | setRepeatType (repeatTypes r) |
int | getRepeatForever () const |
void | setRepeatForever (int f=1) |
tm | getRepeatEnd () const |
void | setRepeatEnd (struct tm tm) |
QDateTime | dtRepeatEnd () const |
int | getRepeatFrequency () const |
void | setRepeatFrequency (int f) |
DayOfMonthType | getRepeatDay () const |
void | setRepeatDay (DayOfMonthType rd) |
const int * | getRepeatDays () const |
void | setRepeatDays (int *rd) |
void | setRepeatDays (QBitArray rba) |
int | getExceptionCount () const |
void | setExceptionCount (int e) |
tm * | getExceptions () const |
void | setExceptions (struct tm *e) |
void | setDescription (const QString &) |
QString | getDescription () const |
void | setNote (const QString &) |
QString | getNote () const |
bool | isMultiDay () const |
QString | getCategoryLabel () const |
bool | setCategory (const QString &label) |
Static Public Attributes | |
static const int KDE_DEPRECATED | APP_BUFFER_SIZE = 0xffff |
Protected Member Functions | |
void | setDescriptionP (const char *desc, int l=-1) |
const char * | getDescriptionP () const |
void | setNoteP (const char *note, int l=-1) |
const char * | getNoteP () const |
void * | pack_ (void *buf, int *size) |
void | unpack (const void *buf, int size=0) |
Constructor & Destructor Documentation
PilotDateEntry::PilotDateEntry | ( | struct AppointmentAppInfo & | appInfo | ) |
Constructor.
Sets the appinfo structure and zeroes out the appointment.
Definition at line 47 of file pilotDateEntry.cc.
PilotDateEntry::PilotDateEntry | ( | struct AppointmentAppInfo & | appInfo, | |
PilotRecord * | rec | |||
) |
Constructor.
Interprets the given record as an appointment.
Definition at line 54 of file pilotDateEntry.cc.
PilotDateEntry::PilotDateEntry | ( | const PilotDateEntry & | e | ) |
PilotDateEntry::~PilotDateEntry | ( | ) | [inline] |
Member Function Documentation
unsigned int PilotDateEntry::alarmLeadTime | ( | ) | const |
Returns the number of seconds "lead time" the alarm should sound before the actual appointment.
This interprets the advance number and units. The value is always positive, 0 if no alarms are enabled.
Definition at line 297 of file pilotDateEntry.cc.
bool PilotDateEntry::doesFloat | ( | ) | const [inline] |
Is this appointment a "floating" appointment?
Floating appointments are those that have a day assigned, but no time in that day (birthday appointments are like that). You can think of these as "events", which don't have a time associated with them for a given day, as opposed to a regular "appointment", which does normally have a time associated with it.
Definition at line 80 of file pilotDateEntry.h.
QDateTime PilotDateEntry::dtAlarm | ( | ) | const [inline] |
Returns the absolute date and time that the alarm should sound for this appointment.
Definition at line 167 of file pilotDateEntry.h.
QDateTime PilotDateEntry::dtEnd | ( | ) | const |
Get the end time of this appointment.
For floating appointments, the time is undefined (perhaps 1 minute past midnight).
Floating appointments are those that have a day assigned, but no time in that day (birthday appointments are like that).
Definition at line 285 of file pilotDateEntry.cc.
QDateTime PilotDateEntry::dtRepeatEnd | ( | ) | const |
Returns the date and time that the repeat ends.
If there is no repeat, returns an invalid date and time.
Definition at line 291 of file pilotDateEntry.cc.
QDateTime PilotDateEntry::dtStart | ( | ) | const |
Get the start time of this appointment.
For floating appointments, the time is undefined (perhaps 1 minute past midnight).
Floating appointments are those that have a day assigned, but no time in that day (birthday appointments are like that).
Definition at line 279 of file pilotDateEntry.cc.
int PilotDateEntry::getAdvance | ( | ) | const [inline] |
Get the numeric part of "alarm: __ (v) minutes" on the pilot -- you set the alarm time in two parts, a number and a unit type to use; unit types are minutes, hours, days and the number is whatever you like.
If alarms are not enabled for this appointment, returns garbage.
- See also:
- alarmLeadTime()
Definition at line 149 of file pilotDateEntry.h.
int PilotDateEntry::getAdvanceUnits | ( | ) | const [inline] |
Returns the units part of the alarm time.
See getAdvance .
Definition at line 154 of file pilotDateEntry.h.
int KDE_DEPRECATED PilotDateEntry::getAlarm | ( | ) | const [inline] |
Does this appointment have an alarm set? See isAlarmEnabled().
Definition at line 134 of file pilotDateEntry.h.
QString PilotDateEntry::getDescription | ( | ) | const |
Gets the description of the appointment.
See setDescription for meaning.
Definition at line 421 of file pilotDateEntry.cc.
int KDE_DEPRECATED PilotDateEntry::getEvent | ( | ) | const [inline] |
struct tm PilotDateEntry::getEventEnd | ( | ) | const [inline] |
Get the end time of this appointment.
See dtEnd() for caveats.
Definition at line 115 of file pilotDateEntry.h.
struct tm* PilotDateEntry::getEventEnd_p | ( | ) | const [inline] |
Get a pointer to the end time of this appointment.
See dtEnd() for caveats.
Definition at line 117 of file pilotDateEntry.h.
struct tm PilotDateEntry::getEventStart | ( | ) | const [inline] |
Get the start time of this appointment.
See dtStart() for caveats.
Definition at line 101 of file pilotDateEntry.h.
struct tm* PilotDateEntry::getEventStart_p | ( | ) | const [inline] |
Get a pointer to the start time of this appointment.
See dtStart() for caveats.
Definition at line 103 of file pilotDateEntry.h.
QString PilotDateEntry::getNote | ( | ) | const |
Gets the note for this appointment.
See setNote for meaning.
Definition at line 416 of file pilotDateEntry.cc.
QString PilotDateEntry::getTextRepresentation | ( | bool | richText = false |
) | [virtual] |
Create a textual representation (human-readable) of this appointment.
If richText
is true, then the text representation uses qt style tags as well.
Reimplemented from PilotAppCategory.
Definition at line 157 of file pilotDateEntry.cc.
bool PilotDateEntry::isAlarmEnabled | ( | ) | const [inline] |
Does this appointment have an alarm set? On the Pilot, an event may have an alarm (or not).
If it has one, it is also enabled and causes the Pilot to beep (or whatever is set in the system preferences).
Definition at line 132 of file pilotDateEntry.h.
bool PilotDateEntry::isEvent | ( | ) | const [inline] |
Is this a non-time-related event as opposed to an appointment that has a time associated with it?.
Definition at line 84 of file pilotDateEntry.h.
PilotDateEntry & PilotDateEntry::operator= | ( | const PilotDateEntry & | e | ) |
void * PilotDateEntry::pack_ | ( | void * | buf, | |
int * | size | |||
) | [protected, virtual] |
Pack whatever data the interpreted record holds into the given buffer, of length size
; return NULL to indicate failure, otherwise buf
.
Set size
to the actual size of data returned. (all of this is dictated by the pilot-link interfaces).
Subclasses must reimplement this to give a specific meaning to the binary blob.
- Parameters:
-
buf Data buffer containing the blob. size Size of the buffer (in bytes). As input, the maximum size of the buffer. As output, the number of bytes used.
Implements PilotAppCategory.
Definition at line 324 of file pilotDateEntry.cc.
void PilotDateEntry::setAdvance | ( | int | advance | ) | [inline] |
Set the numeric part of the alarm setting.
See getAdvance for details.
Definition at line 151 of file pilotDateEntry.h.
void PilotDateEntry::setAdvanceUnits | ( | int | units | ) | [inline] |
Sets the unites part of the alarm time.
See getAdvance .
Definition at line 156 of file pilotDateEntry.h.
void KDE_DEPRECATED PilotDateEntry::setAlarm | ( | int | alarm | ) | [inline] |
void PilotDateEntry::setAlarmEnabled | ( | bool | b | ) | [inline] |
void PilotDateEntry::setDescription | ( | const QString & | ) |
Sets the description of the appointment.
This is the short string entered in the day view on the handheld, and it is called the summary in libkcal.
Definition at line 410 of file pilotDateEntry.cc.
void KDE_DEPRECATED PilotDateEntry::setEvent | ( | int | event | ) | [inline] |
void PilotDateEntry::setEventEnd | ( | struct tm & | end | ) | [inline] |
void PilotDateEntry::setEventStart | ( | struct tm & | start | ) | [inline] |
void PilotDateEntry::setFloats | ( | bool | f | ) | [inline] |
Sets this appointment's floating status.
Floating appointments are those that have a day assigned, but no time in that day (birthday appointments are like that). You can think of these as "events", which don't have a time associated with them for a given day, as opposed to a regular "appointment", which does normally have a time associated with it.
Definition at line 96 of file pilotDateEntry.h.
void PilotDateEntry::setNote | ( | const QString & | ) |
Sets the note for the appointment.
The note is the long text entry that is possible - but clumsy - on the handheld. It is called the description in libkcal.
Definition at line 404 of file pilotDateEntry.cc.
void PilotDateEntry::unpack | ( | const void * | buf, | |
int | size = 0 | |||
) | [inline, protected, virtual] |
Unpack the binary blob buf
of size size
into some structure with meaning.
Implements PilotAppCategory.
Definition at line 242 of file pilotDateEntry.h.
The documentation for this class was generated from the following files: