1
/* -*- mode: C++; c-file-style: "gnu" -*-
2
* kmail: KDE mail client
3
* Copyright (C) 2006 Dmitry Morozhnikov <dmiceman@ubiz.ru>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef CUSTOMTEMPLATESMENU_H
21
#define CUSTOMTEMPLATESMENU_H
23
#include "templateparser_export.h"
31
class KActionCollection;
35
class TEMPLATEPARSER_EXPORT CustomTemplatesMenu : public QObject
40
CustomTemplatesMenu( QWidget *parent, KActionCollection *ac );
41
~CustomTemplatesMenu();
43
KActionMenu *replyActionMenu() const { return (mCustomReplyActionMenu); }
44
KActionMenu *replyAllActionMenu() const { return (mCustomReplyAllActionMenu); }
45
KActionMenu *forwardActionMenu() const { return (mCustomForwardActionMenu); }
51
void replyTemplateSelected( const QString &tmpl );
52
void replyAllTemplateSelected( const QString &tmpl );
53
void forwardTemplateSelected( const QString &tmpl );
56
void slotReplySelected( int idx );
57
void slotReplyAllSelected( int idx );
58
void slotForwardSelected( int idx );
63
KActionCollection *mOwnerActionCollection;
65
QVector<QString> mCustomTemplates;
66
QList<KAction*> mCustomTemplateActions;
68
// Custom template actions menu
69
KActionMenu *mCustomReplyActionMenu, *mCustomReplyAllActionMenu, *mCustomForwardActionMenu;
71
// Signal mappers for custom template actions
72
QSignalMapper *mCustomReplyMapper, *mCustomReplyAllMapper, *mCustomForwardMapper;
75
#endif // CUSTOMTEMPLATESMENU_H