- Main Page
- Namespaces
- Classes
- Files
- Directories

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# ShowRecord Class Reference

List which contains all mails of an account. More...

`#include <showrecord.h>`

List of all members.

## Public Member Functions
| ShowRecord ()
| ~ShowRecord ()
void | saveOptions (TQDomDocument &doc, TQDomElement &parent)
void | readStoredMails (TQDomElement &parent)
void | applyHeaderFilter (HeaderFilter *filter, TQString account, MailNumberList_Type &deleteList, MailToDownloadMap_Type &downloadList, FilterLog *log=NULL)
bool | hasSelectedMails ()
Types::MailNumberList_Type | getSelectedMails ()
void | removeMail (int number)
TQStringList | getSelectedSubjects () const
TQString | getSenderOf (int number) const
TQString | getDateOf (int number) const
TQString | getSizeOf (int number) const
TQString | getSubjectOf (int number) const
TQString | decodeMailBody (TQByteArray body, int number, bool preferHTML) const
bool | hasMail (TQString uid)
bool | isNew (TQString uid) const
void | appendNewMail (int number, TQString uid, bool isNew)
void | printMailList ()
void | setSize (int number, long size)
Types::MailNumberList_Type | getNewMails ()
void | setHeader (int number, TQString header)
TQStringList | getUIDsOfOldMails ()
TQString | getHeaderOf (TQString uid)
void | setHeader (TQString uid, TQString header)
int | getNumberNewMails ()
int | getNumberMails ()
long | getTotalSize ()
void | fillMailListView (KshowmailView *view, TQString &account)
int | showSelectedHeaders (TQString &account)
void | writeToMoveLog (FilterLog *log, int number, TQString account, TQString mailbox)
void | writeToDeleteLog (FilterLog *log, int number, TQString account)
void | setMarkAtNextViewRefresh (int number)
## Static Public Attributes
static const int | continueShowHeaders
static const int | cancelShowHeaders

## Detailed Description

List which contains all mails of an account.

The mails are objects of ShowRecordElem. Inherits TQPtrList.

See also:
  ShowRecordElem

Author:
  Eggert Ehmke

  Ulrich Weigelt

## Constructor & Destructor Documentation

ShowRecord::ShowRecord | ( |  | ) |

Constructor

ShowRecord::~ShowRecord | ( |  | ) |

Destructor Does nothing.

## Member Function Documentation

void ShowRecord::saveOptions | ( | TQDomDocument & | doc,
|  | TQDomElement & | parent |
| ) |  |  |

Saves all stored mails into the given DOM document inside the given account element.

Parameters:

  | doc | DOM document in that all options are stored
  | parent | account element

void ShowRecord::readStoredMails | ( | TQDomElement & | parent | ) |

Reads out all mails stored inside the given account element, creates objects from class ShowRecordElem and stores them in this list. All old items will be removed.

Parameters:

  | parent | account element (DOM element)

void ShowRecord::applyHeaderFilter | ( | HeaderFilter * | filter,
|  | TQString | account,
|  | MailNumberList_Type & | deleteList,
|  | MailToDownloadMap_Type & | downloadList,
|  | FilterLog * | log = `NULL` |
| ) |  |  |

Apply the filters to the mails in this list.

Parameters:

  | filter | pointer to the header filter
  | account | name of this account
  | deleteList | reference to a list in which this methode writes the numbers of mails to delete
  | downloadList | reference to a list in which this methode writes the number of mails to download
  | log | pointer to the filter log

bool ShowRecord::hasSelectedMails | ( |  | ) |

Returns whether there are mails in this list which are selected in the list view.

Returns:
  TRUE - there are selected mails

  FALSE - there aren't selected mails

MailNumberList_Type ShowRecord::getSelectedMails | ( |  | ) |

Returns the numbers of all selected mails.

Returns:
  numbers of selected mails.

void ShowRecord::removeMail | ( | int | number | ) |

Removes the mail which has the given number.

Parameters:

  | number | number of the mail which will be removed

TQStringList ShowRecord::getSelectedSubjects | ( |  | ) | const

Returns the subjects of the selected mails.

Returns:
  subjects of selected mails

TQString ShowRecord::getSenderOf | ( | int | number | ) | const

Returns the sender of the mail with the given number.

Parameters:

  | number | mail number

Returns:
  sender

TQString ShowRecord::getDateOf | ( | int | number | ) | const

Returns the date of sent of the mail with the given number.

Parameters:

  | number | mail number

Returns:
  date

TQString ShowRecord::getSizeOf | ( | int | number | ) | const

Returns the size of the mail with the given number.

Parameters:

  | number | mail number

Returns:
  size

TQString ShowRecord::getSubjectOf | ( | int | number | ) | const

Returns the subject of the mail with the given number.

Parameters:

  | number | mail number

Returns:
  subject

TQString ShowRecord::decodeMailBody | ( | TQByteArray | body,
|  | int | number,
|  | bool | preferHTML |
| ) |  |  | const

Decodes the given mail body by the appropriate mail object. The mail object (ShowRecordElem) has to do this job, because it has stored the mail header and therefore it knows the content type and encoding of the mail. It decodes just the text or html part of the body. The rest of it will be rejected.

Parameters:

  | body | the encoded mail (including header)
  | number | number of the downloaded mail
  | preferHTML | decode HTML part if present

Returns:
  decoded mail body

bool ShowRecord::hasMail | ( | TQString | uid | ) |

Returns whether there is mail with the given uid in the list.

Parameters:

  | uid | UID of the mail

Returns:
  TRUE - mail is in the list

  FALSE - mail is not in the list

bool ShowRecord::isNew | ( | TQString | uid | ) | const

Returns whether the given mail is new.

Parameters:

  | uid | UID of the mail

Returns:
  TRUE - mail is new

  FALSE - mail is not new or mail doesn't exist

void ShowRecord::appendNewMail | ( | int | number,
|  | TQString | uid,
|  | bool | isNew |
| ) |  |  |

Appends a new mail to the list.

Parameters:

  | number | number of the mail on the server
  | uid | Unique ID of the mail
  | isNew | TRUE - mail is new; FALSE - mail is not new

void ShowRecord::printMailList | ( |  | ) |

Just for debugging. Prints a list of all contained mails to stdout.

void ShowRecord::setSize | ( | int | number,
|  | long | size |
| ) |  |  |

Sets the size of a mail.

Parameters:

  | number | number of the mail
  | size | mail size

Types::MailNumberList_Type ShowRecord::getNewMails | ( |  | ) |

Returns the numbers of mails which are marked as new.

Returns:
  numbers of the new mails

void ShowRecord::setHeader | ( | int | number,
|  | TQString | header |
| ) |  |  |

Sets the header of the given mail.

Parameters:

  | number | number of the mail
  | header | the header

TQStringList ShowRecord::getUIDsOfOldMails | ( |  | ) |

Returns a list of the UIDs of all old mails.

Returns:
  UIDs of all old mails

TQString ShowRecord::getHeaderOf | ( | TQString | uid | ) |

Returns the header of the mail with the given UID.

Parameters:

  | uid | UID

Returns:
  mail header

void ShowRecord::setHeader | ( | TQString | uid,
|  | TQString | header |
| ) |  |  |

Sets the header of the mail with the given UID.

Parameters:

  | uid | UID
  | header | mail header

int ShowRecord::getNumberNewMails | ( |  | ) |

Returns the number of new mails.

Returns:
  number of new mails

int ShowRecord::getNumberMails | ( |  | ) |

Returns the number of mails.

Returns:
  number of mails

long ShowRecord::getTotalSize | ( |  | ) |

Returns the total size of all mails.

Returns:
  total size

void ShowRecord::fillMailListView | ( | KshowmailView * | view,
|  | TQString & | account |
| ) |  |  |

Creates for every mail a list view item and insert it into the mail list view.

Parameters:

  | view | pointer to the application view
  | account | account name

int ShowRecord::showSelectedHeaders | ( | TQString & | account | ) |

Shows the headers of all selected mails.

Parameters:

  | account | account name

Returns:
  continueShowHeaders - the user has always clicked OK. The invoking function will show the next header

  cancelShowHeaders - the user has clicked Cancel. The invoking function will not show the next header.

void ShowRecord::writeToMoveLog | ( | FilterLog * | log,
|  | int | number,
|  | TQString | account,
|  | TQString | mailbox |
| ) |  |  |

Writes the mail into the Move Log.

Parameters:

  | log | pointer to the log
  | number | number of the mail
  | account | name of the account
  | mailbox | name of the mailbox

void ShowRecord::writeToDeleteLog | ( | FilterLog * | log,
|  | int | number,
|  | TQString | account |
| ) |  |  |

Writes the mail into the Delete Log.

Parameters:

  | log | pointer to the log
  | number | number of the mail
  | account | name of the account

void ShowRecord::setMarkAtNextViewRefresh | ( | int | number | ) |

The given mail will be marked at the next view refresh.

Parameters:

  | number | number of the mail

## Member Data Documentation

int const ShowRecord::continueShowHeaders`[static]`

Returned by showSelectedHeaders() if the user has always clicked OK.

int const ShowRecord::cancelShowHeaders`[static]`

Returned by showSelectedHeaders() if the user has clicked Cancel.

The documentation for this class was generated from the following files:

- Daten/Documents/programmieren/kshowmail/kshowmail/kshowmail/showrecord.h
- Daten/Documents/programmieren/kshowmail/kshowmail/kshowmail/showrecord.cpp