kmail

messageactions.h
1/*
2 Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#ifndef KMAIL_MESSAGEACTIONS_H
20#define KMAIL_MESSAGEACTIONS_H
21
22#include "kmcommands.h"
23#include "kmreaderwin.h"
24
25#include <tqobject.h>
26#include <tqvaluelist.h>
27
28class TQWidget;
29class TDEAction;
30class TDEActionMenu;
31class TDEActionCollection;
32class KMMessage;
33
34namespace KMail {
35
39class MessageActions : public TQObject
40{
41 TQ_OBJECT
42
43 public:
44 MessageActions( TDEActionCollection* ac, TQWidget *parent );
45 void setMessageView( KMReaderWin *msgView );
46
47 void setCurrentMessage( KMMessage *msg );
48 void setSelectedSernums( const TQValueList<TQ_UINT32> &sernums );
49 void setSelectedVisibleSernums( const TQValueList<TQ_UINT32> &sernums );
50
51 TDEActionMenu* replyMenu() const { return mReplyActionMenu; }
52 TDEAction* replyListAction() const { return mReplyListAction; }
53 TDEAction* createTodoAction() const { return mCreateTodoAction; }
54
55 TDEActionMenu* messageStatusMenu() const { return mStatusMenu; }
56
57 TDEAction* editAction() const { return mEditAction; }
58
59 signals:
60
61 // This signal is emitted when a reply is triggered and the
62 // action has finished.
63 // This is useful for the stand-alone reader, it might want to close the window in
64 // that case.
65 void replyActionFinished();
66
67 public slots:
68 void editCurrentMessage();
69
70 private:
71 void updateActions();
72 template<typename T> void replyCommand();
73 void setMessageStatus( KMMsgStatus status, bool toggle = false );
74
75 private slots:
76 void slotReplyToMsg();
77 void slotReplyAuthorToMsg();
78 void slotReplyListToMsg();
79 void slotReplyAllToMsg();
80 void slotNoQuoteReplyToMsg();
81 void slotCreateTodo();
82 void slotSetMsgStatusNew();
83 void slotSetMsgStatusUnread();
84 void slotSetMsgStatusRead();
85 void slotSetMsgStatusTodo();
86 void slotSetMsgStatusFlag();
87
88 private:
89 TQWidget *mParent;
90 TDEActionCollection *mActionCollection;
91 KMMessage* mCurrentMessage;
92 TQValueList<TQ_UINT32> mSelectedSernums;
93 TQValueList<TQ_UINT32> mVisibleSernums;
94 KMReaderWin *mMessageView;
95
96 TDEActionMenu *mReplyActionMenu;
97 TDEAction *mReplyAction, *mReplyAllAction, *mReplyAuthorAction,
98 *mReplyListAction, *mNoQuoteReplyAction;
99 TDEAction *mCreateTodoAction;
100 TDEActionMenu *mStatusMenu;
101 TDEToggleAction *mToggleFlagAction, *mToggleTodoAction;
102 TDEAction *mEditAction;
103};
104
105}
106
107#endif
108
This is a Mime Message.
Definition: kmmessage.h:68
This class implements a "reader window", that is a window used for reading or viewing messages.
Definition: kmreaderwin.h:75
Manages common actions that can be performed on one or more messages.
folderdiaquotatab.h
Definition: aboutdata.cpp:40