00001 /* 00002 Copyright 2010 Ulrich Weigelt <ulrich.weigelt@gmx.de> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License as 00006 published by the Free Software Foundation; either version 2 of 00007 the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef ACCOUNTVIEWITEM_H 00019 #define ACCOUNTVIEWITEM_H 00020 00021 class AccountViewItem; 00022 00023 //Qt Header 00024 #include <QString> 00025 #include <QPointer> 00026 00027 //KShowmail headers 00028 #include "account.h" 00029 00037 class AccountViewItem 00038 { 00039 00040 public: 00041 00052 AccountViewItem( bool active, const QString& name, const QString& server, const QString& user, int numberMails, long totalSize, QPointer<Account> account ); 00053 00058 bool isActive() const; 00059 00064 QString getName() const; 00065 00070 QString getServer() const; 00071 00076 QString getUser() const; 00077 00082 int getNumberMails() const; 00083 00088 QString getTotalSizeUnit() const; 00089 00094 long getTotalSize() const; 00095 00100 QPointer<Account> getAccount() const; 00101 00109 int compare( const AccountViewItem& other, AccountSort_Type property ); 00110 00111 00112 private: 00113 00117 bool active; 00118 00122 QString name; 00123 00127 QString server; 00128 00132 QString user; 00133 00137 int numberMails; 00138 00142 long totalSize; 00143 00147 QPointer<Account> account; 00148 }; 00149 00150 #endif // ACCOUNTVIEWITEM_H