kmail

templatesinsertcommand.h
00001 /*   -*- mode: C++; c-file-style: "gnu" -*-
00002  *   kmail: KDE mail client
00003  *   This file: Copyright (C) 2006 Dmitry Morozhnikov <dmiceman@mail.ru>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018  *
00019  */
00020 
00021 #include <config.h>
00022 
00023 #ifndef TEMPLATESINSERTCOMMAND_H
00024 #define TEMPLATESINSERTCOMMAND_H
00025 
00026 #include <tqpushbutton.h>
00027 
00028 class TDEActionMenu;
00029 
00030 class TemplatesInsertCommand : public TQPushButton
00031 {
00032   Q_OBJECT
00033   
00034 
00035   public:
00036     TemplatesInsertCommand( TQWidget *parent, const char *name = 0 );
00037     ~TemplatesInsertCommand();
00038 
00039   public:
00040     enum Command {CDnl = 1, CRem, CInsert, CSystem, CQuotePipe, CQuote, CTQHeaders, CHeaders, 
00041                   CTextPipe, CMsgPipe, CBodyPipe, CClearPipe, CText, 
00042                   CToAddr, CToName, CFromAddr, CFromName, CFullSubject, CMsgId, 
00043                   COHeader, CHeader, COToAddr, COToName, COFromAddr, COFromName, COFullSubject, 
00044                   COMsgId, CDateEn, CDateShort, CDate, CDow, CTimeLongEn, CTimeLong, CTime, 
00045                   CODateEn, CODateShort, CODate, CODow, COTimeLongEn, COTimeLong, COTime, 
00046                   CBlank, CNop, CClear, CDebug, CDebugOff, CToFName, CToLName, CFromFName, CFromLName, 
00047                   COToFName, COToLName, COFromFName, COFromLName, CCursor, 
00048                   CCCAddr, CCCName, CCCFName, CCCLName, COCCAddr, COCCName, COCCFName, COCCLName,
00049                   COAddresseesAddr };
00050 
00051   signals:
00052     void insertCommand( TemplatesInsertCommand::Command cmd );
00053     void insertCommand( TQString cmd, int adjustCursor = 0 );
00054 
00055   public slots:
00056     void slotClicked();
00057     void slotMapped( int cmd );
00058 
00059   protected:
00060     TDEActionMenu *mMenu;
00061 };
00062 
00063 #endif // TEMPLATESINSERTCOMMAND_H