You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.9 KiB
97 lines
2.9 KiB
// -*- mode: C++; c-file-style: "gnu" -*- |
|
|
|
#ifndef KMReaderMainWin_h |
|
#define KMReaderMainWin_h |
|
|
|
#include "secondarywindow.h" |
|
|
|
#include <kurl.h> |
|
#include <KMime/Message> |
|
|
|
#include <boost/scoped_ptr.hpp> |
|
#include <akonadi/item.h> |
|
#include <akonadi/collection.h> |
|
#include <QModelIndex> |
|
class KMReaderWin; |
|
class KAction; |
|
class KFontAction; |
|
class KFontSizeAction; |
|
class KJob; |
|
template <typename T, typename S> class QMap; |
|
|
|
namespace KMail { |
|
class MessageActions; |
|
} |
|
|
|
namespace KMime { |
|
class Message; |
|
class Content; |
|
} |
|
Q_DECLARE_METATYPE(QModelIndex) |
|
|
|
class KMReaderMainWin : public KMail::SecondaryWindow |
|
{ |
|
Q_OBJECT |
|
|
|
public: |
|
KMReaderMainWin( bool htmlOverride, bool htmlLoadExtOverride, char *name = 0 ); |
|
explicit KMReaderMainWin( char *name = 0 ); |
|
KMReaderMainWin( KMime::Content* aMsgPart, bool aHTML, const QString &encoding, char *name = 0 ); |
|
virtual ~KMReaderMainWin(); |
|
|
|
void setUseFixedFont( bool useFixedFont ); |
|
|
|
/** |
|
* take ownership of and show @param msg |
|
* |
|
* The last two parameters, serNumOfOriginalMessage and nodeIdOffset, are needed when @p msg |
|
* is derived from another message, e.g. the user views an encapsulated message in this window. |
|
* Then, the reader needs to know about that original message, so those to parameters are passed |
|
* onto setOriginalMsg() of KMReaderWin. |
|
*/ |
|
void showMessage( const QString & encoding, const Akonadi::Item &msg, const Akonadi::Collection & parentCollection = Akonadi::Collection()); |
|
|
|
void showMessage( const QString & encoding, KMime::Message::Ptr message); |
|
void showMessagePopup(const Akonadi::Item&msg ,const KUrl&aUrl,const KUrl &imageUrl,const QPoint& aPoint, bool contactAlreadyExists, bool uniqueContactFound); |
|
|
|
private slots: |
|
void slotMessagePopup(const Akonadi::Item& ,const KUrl&,const KUrl &imageUrl,const QPoint& ); |
|
void slotContactSearchJobForMessagePopupDone(KJob*); |
|
void slotTrashMsg(); |
|
void slotForwardInlineMsg(); |
|
void slotForwardAttachedMsg(); |
|
void slotRedirectMsg(); |
|
void slotFontAction(const QString &); |
|
void slotSizeAction(int); |
|
void slotCustomReplyToMsg( const QString &tmpl ); |
|
void slotCustomReplyAllToMsg( const QString &tmpl ); |
|
void slotCustomForwardMsg( const QString &tmpl ); |
|
|
|
void slotEditToolbars(); |
|
void slotConfigChanged(); |
|
void slotUpdateToolbars(); |
|
|
|
/// This closes the window if the setting to close the window after replying or |
|
/// forwarding is set. |
|
void slotReplyOrForwardFinished(); |
|
void slotCopyItem(QAction*); |
|
void slotCopyResult( KJob * job ); |
|
|
|
private: |
|
Akonadi::Collection parentCollection() const; |
|
void initKMReaderMainWin(); |
|
void setupAccel(); |
|
KAction *copyActionMenu(QMenu *menu); |
|
|
|
KMReaderWin *mReaderWin; |
|
Akonadi::Item mMsg; |
|
// a few actions duplicated from kmmainwidget |
|
KAction *mTrashAction, *mSaveAtmAction; |
|
KFontAction *mFontAction; |
|
KFontSizeAction *mFontSizeAction; |
|
KMail::MessageActions *mMsgActions; |
|
Akonadi::Collection mParentCollection; |
|
|
|
}; |
|
|
|
#endif /*KMReaderMainWin_h*/
|
|
|