writemail.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 176 行
H
176 行
/******************************************************************************** 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 WRITEMAIL_H#define WRITEMAIL_H#include <QMainWindow>#include <QAction>#include <QLabel>#include <QToolButton>#include <QLayout>#include <QLineEdit>#include <QTextEdit>#include <QListView>#include <QComboBox>#include <QSize>#include <QStringList>#include <QList>#include <QListWidget>//#include <qtopia/pim/private/contactfieldselector_p.h>#include "email.h"#include "addatt.h"#ifdef QTOPIA_PHONE#include "composer.h"#else#include "pdacomposer.h"#endifclass AccountList;class FileSelector;class QLineEdit;class QStackedWidget;class QHBox;#ifdef QTOPIA_PHONEclass DetailsPage;#endifclass SelectListWidget : public QListWidget{ Q_OBJECTpublic: SelectListWidget( QDialog* parent ); bool keyBackPressed();protected: void keyPressEvent(QKeyEvent *e);private: QDialog *mParent; bool mKeyBackPressed;};class WriteMail : public QMainWindow{ Q_OBJECTpublic: WriteMail( QWidget* parent, const char* name, Qt::WFlags fl = 0 ); ~WriteMail(); void reply(const Email &, int type); void modify(Email *previousMail); void setRecipients(const QString &emails, const QString &numbers); void setRecipient(const QString &recipient); bool hasRecipients() const; void setBody(const QString &text); bool hasContent();#ifdef QTOPIA_PHONE void setSmsRecipient(const QString &recipient);#endif void setAccountList(AccountList *list);#ifdef QTOPIA_PHONE void setComposer( const QString &id ); void setComposerFocus(); QString composer() const;#endif bool isComplete() const; bool changed() const;#ifdef QTOPIA_PHONE bool keyPressAccepted();#endifpublic slots: bool tryAccept(); void reset(); void discard();signals: void autosaveMail(const Email &); void saveAsDraft(const Email &); void enqueueMail(const Email &); void discardMail();public slots: void newMail( const QString &cmpsr = QString(), bool detailsOnly = false ); void attach( const QContent &dl ); void attach( const QString &fileName );protected slots: void previousStage(); void nextStage(); void composeStage(); void detailsStage(); void sendStage(); void updateUI(); bool selectComposer(); void enqueue(); void draft(); void messageChanged();protected: void keyPressEvent(QKeyEvent *);private: bool buildMail(); void init(); void readConfig(); void saveConfig(); Email mail; #ifdef QTOPIA_PHONE ComposerInterface#else PDAComposer#endif *m_composerInterface;#ifdef QTOPIA_PHONE QWidget *m_composerWidget; DetailsPage *m_detailsPage; QAction *m_previousAction;#else QAction *m_ccAction, *m_bccAction, *m_fromAction, *m_wrapAction;#endif QAction *m_cancelAction, *m_draftAction; QStackedWidget* widgetStack; QMainWindow *m_mainWindow; AccountList *accountList;#ifdef QTOPIA_PHONE bool keyEventAccepted;#endif bool hasMessageChanged; bool _detailsOnly;};#endif // WRITEMAIL_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?