emailfolderlist.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 120 行
H
120 行
/******************************************************************************** Copyright (C) 2000-2006 TROLLTECH ASA. All rights reserved.**** This file is part of the Phone Edition of the Qtopia Toolkit.**** Licensees holding a valid license agreement from Trolltech or any of its** authorized distributors may use this file in accordance with** the License Agreement provided with the Licensed Software.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for** information about Trolltech's Commercial License Agreements.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.********** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef EMAILFOLDERLIST_H#define EMAILFOLDERLIST_H#include <qobject.h>#include <qstring.h>#include <qlist.h>#include <qfile.h>#include <qtextstream.h>#include <qtopia/mail/emailfolderaccess.h>#include <qtopia/mail/mailmessage.h>#include "email.h"class EmailFolderList;class AccountList;class MailboxList : public QObject{ Q_OBJECTpublic: MailboxList(QObject *parent = 0); ~MailboxList(); void openMailboxes(); void writeDirtyHeaders(); void compact(); QStringList mailboxes() const; EmailFolderList* mailbox(const QString &name) const;signals: void externalEdit(const QString &); void mailAdded(Email *, const QString &); void mailUpdated(Email *, const QString &); void mailRemoved(const QUuid &, const QString &); void stringStatus(QString &);private: QList<EmailFolderList*> _mailboxes;};class EmailFolderList : public QObject{ Q_OBJECTpublic: EmailFolderList(QString mailbox, QObject *parent=0); ~EmailFolderList(); void openMailbox(); bool addMail(const Email &mail); bool removeMail(QUuid id, bool expunge); bool empty(); void writeDirtyHeaders(); void compact(); QString mailbox() const { return e->mailbox(); }; QListIterator<Email*> entryIterator(); Email* email(QUuid id); // If accountList is set then as a side effect the unread count // for all accounts is updated by this call. uint mailCount(const QString &type, AccountList *accountList = 0); QUuid generateUuid(); bool swapMailIn(Email *);signals: void externalEdit(const QString &); void mailAdded(Email *, const QString &); void mailUpdated(Email *, const QString &); void mailRemoved(const QUuid &, const QString &); void stringStatus(QString &);protected slots: void externalChange(); bool swapMailOut();private: Email *emailRef(QUuid id);private: QList<Email*> entryList; uint MaxMem; EmailFolderAccess *e; int _addOrder;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?