kpilot/lib

PilotMemo Class Reference

Inheritance diagram for PilotMemo:

PilotAppCategory PilotRecordBase List of all members.

Detailed Description

Definition at line 39 of file pilotMemo.h.


Public Member Functions

 PilotMemo (void)
 PilotMemo (const QString &s)
 PilotMemo (const PilotRecord *rec)
 PilotMemo (void *buf)
 PilotMemo (void *buf, int attr, recordid_t id, int category)
 ~PilotMemo ()
virtual QString getTextRepresentation (bool richText=false)
QString text (void) const
void setText (const QString &text)
QString getTitle (void) const
PilotRecordpack ()
QString shortTitle () const
QString sensibleTitle () const

Static Public Attributes

static const int MAX_MEMO_LEN = 8192

Protected Member Functions

void * pack_ (void *, int *)
void unpack (const void *, int=0)

Member Function Documentation

QString PilotMemo::getTextRepresentation ( bool  richText = false  )  [virtual]

Returns a text representation of this (interpreted) data.

The text may use Qt rich text tags if rt is true. The default implementation just returns a junk message.

Parameters:
rt Use right text (if needed) if and only if rt is true.

Reimplemented from PilotAppCategory.

Definition at line 93 of file pilotMemo.cc.

PilotRecord * PilotMemo::pack (  )  [virtual]

Returns:
a PilotRecord that contains all of the info of the subclass. Remember to delete the PilotRecord when finished. Calls pack_() to get the work done.

Reimplemented from PilotAppCategory.

Definition at line 54 of file pilotMemo.cc.

void * PilotMemo::pack_ ( void *  ,
int *   
) [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 64 of file pilotMemo.cc.

QString PilotMemo::sensibleTitle (  )  const

Returns a (complete) title if there is one and [unknown] otherwise.

Definition at line 133 of file pilotMemo.cc.

QString PilotMemo::shortTitle (  )  const

Return a "short but sensible" title.

getTitle() returns the first line of the memo, which may be very long and inconvenient. shortTitle() returns about 30 characters.

Definition at line 112 of file pilotMemo.cc.

void PilotMemo::unpack ( const void *  ,
int  = 0 
) [protected, virtual]

Unpack the binary blob buf of size size into some structure with meaning.

Implements PilotAppCategory.

Definition at line 47 of file pilotMemo.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys