#include <accountviewitem.h>
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< Account > | getAccount () 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. |
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.
AccountViewItem::AccountViewItem | ( | bool | active, | |
const QString & | name, | |||
const QString & | server, | |||
const QString & | user, | |||
int | numberMails, | |||
long | totalSize, | |||
QPointer< Account > | account | |||
) |
Contructor.
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.
bool AccountViewItem::isActive | ( | ) | const |
Returns whether the account is active.
true
- account is active; false
- account isn't active Definition at line 28 of file accountviewitem.cpp.
QString AccountViewItem::getName | ( | ) | const |
QString AccountViewItem::getServer | ( | ) | const |
Returns ther server host name.
Definition at line 38 of file accountviewitem.cpp.
QString AccountViewItem::getUser | ( | ) | const |
int AccountViewItem::getNumberMails | ( | ) | const |
Returns the number of mails.
Definition at line 48 of file accountviewitem.cpp.
QString AccountViewItem::getTotalSizeUnit | ( | ) | const |
Returns the total size of mails with appended unit.
Definition at line 53 of file accountviewitem.cpp.
long int AccountViewItem::getTotalSize | ( | ) | const |
Returns the total size of mails.
Definition at line 135 of file accountviewitem.cpp.
QPointer< Account > AccountViewItem::getAccount | ( | ) | const |
Returns the pointer to the 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.
other | other account | |
property | the account property which will be compared |
Definition at line 80 of file accountviewitem.cpp.