AccountViewItem Class Reference

This class is used by AccountViewModel to hold a list of the accounts. More...

#include <accountviewitem.h>

List of all members.

Public Member Functions

 AccountViewItem (bool active, const QString &name, const QString &server, const QString &user, int numberMails, long totalSize, QPointer< Account > account)
 Contructor.
bool isActive () const
 Returns whether the account is active.
QString getName () const
 Returns the account name.
QString getServer () const
 Returns ther server host name.
QString getUser () const
 Returns the user.
int getNumberMails () const
 Returns the number of mails.
QString getTotalSizeUnit () const
 Returns the total size of mails with appended unit.
long getTotalSize () const
 Returns the total size of mails.
QPointer< AccountgetAccount () const
 Returns the pointer to the account.
int compare (const AccountViewItem &other, AccountSort_Type property)
 Compares this account with other and returns an integer less than, equal to, or greater than zero if this account is less than, equal to, or greater than other.


Detailed Description

This class is used by AccountViewModel to hold a list of the accounts.

It can't use a list of pointers to a account because this pointers can be invalid for a short time after an account was removed. When the account view refreshes in this time the app crashed.

Definition at line 37 of file accountviewitem.h.


Constructor & Destructor Documentation

AccountViewItem::AccountViewItem ( bool  active,
const QString &  name,
const QString &  server,
const QString &  user,
int  numberMails,
long  totalSize,
QPointer< Account account 
)

Contructor.

Parameters:
active true - the account is active; false - the account is not active
name Name of the account
server server
user user
numberMails number of mails
totalSize total size of all mails
account pointer to the associated account

Definition at line 23 of file accountviewitem.cpp.


Member Function Documentation

bool AccountViewItem::isActive (  )  const

Returns whether the account is active.

Returns:
true - account is active; false - account isn't active

Definition at line 28 of file accountviewitem.cpp.

QString AccountViewItem::getName (  )  const

Returns the account name.

Returns:
account name

Definition at line 33 of file accountviewitem.cpp.

QString AccountViewItem::getServer (  )  const

Returns ther server host name.

Returns:
server host

Definition at line 38 of file accountviewitem.cpp.

QString AccountViewItem::getUser (  )  const

Returns the user.

Returns:
user

Definition at line 75 of file accountviewitem.cpp.

int AccountViewItem::getNumberMails (  )  const

Returns the number of mails.

Returns:
number of mails

Definition at line 48 of file accountviewitem.cpp.

QString AccountViewItem::getTotalSizeUnit (  )  const

Returns the total size of mails with appended unit.

Returns:
total size of mails

Definition at line 53 of file accountviewitem.cpp.

long int AccountViewItem::getTotalSize (  )  const

Returns the total size of mails.

Returns:
total size of mails

Definition at line 135 of file accountviewitem.cpp.

QPointer< Account > AccountViewItem::getAccount (  )  const

Returns the pointer to the account.

Returns:
pointer to the associated account

Definition at line 43 of file accountviewitem.cpp.

int AccountViewItem::compare ( const AccountViewItem other,
AccountSort_Type  property 
)

Compares this account with other and returns an integer less than, equal to, or greater than zero if this account is less than, equal to, or greater than other.

Parameters:
other other account
property the account property which will be compared

Definition at line 80 of file accountviewitem.cpp.


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

Generated on Tue May 18 19:43:53 2010 for KShowmail by  doxygen 1.5.6