kmail

templatesinsertcommand.h
1 /*
2  * kmail: KDE mail client
3  * This file: Copyright (C) 2006 Dmitry Morozhnikov <dmiceman@mail.ru>
4  *
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.
9  *
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.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #include <config.h>
22 
23 #ifndef TEMPLATESINSERTCOMMAND_H
24 #define TEMPLATESINSERTCOMMAND_H
25 
26 #include <tqpushbutton.h>
27 
28 class TDEActionMenu;
29 
30 class TemplatesInsertCommand : public TQPushButton
31 {
32  TQ_OBJECT
33 
34 
35  public:
36  TemplatesInsertCommand( TQWidget *parent, const char *name = 0 );
37  ~TemplatesInsertCommand();
38 
39  public:
40  enum Command {CDnl = 1, CRem, CInsert, CSystem, CQuotePipe, CQuote, CTQHeaders, CHeaders,
41  CTextPipe, CMsgPipe, CBodyPipe, CClearPipe, CText,
42  CToAddr, CToName, CFromAddr, CFromName, CFullSubject, CMsgId,
43  COHeader, CHeader, COToAddr, COToName, COFromAddr, COFromName, COFullSubject,
44  COMsgId, CDateEn, CDateShort, CDate, CDow, CTimeLongEn, CTimeLong, CTime,
45  CODateEn, CODateShort, CODate, CODow, COTimeLongEn, COTimeLong, COTime,
46  CBlank, CNop, CClear, CDebug, CDebugOff, CToFName, CToLName, CFromFName, CFromLName,
47  COToFName, COToLName, COFromFName, COFromLName, CCursor,
48  CCCAddr, CCCName, CCCFName, CCCLName, COCCAddr, COCCName, COCCFName, COCCLName,
49  COAddresseesAddr };
50 
51  signals:
52  void insertCommand( TemplatesInsertCommand::Command cmd );
53  void insertCommand( TQString cmd, int adjustCursor = 0 );
54 
55  public slots:
56  void slotClicked();
57  void slotMapped( int cmd );
58 
59  protected:
60  TDEActionMenu *mMenu;
61 };
62 
63 #endif // TEMPLATESINSERTCOMMAND_H