kmail

templatesinsertcommand.h

Go to the documentation of this file.
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 <qpushbutton.h>
00027 
00028 class KActionMenu;
00029 
00030 class TemplatesInsertCommand : public QPushButton
00031 {
00032   Q_OBJECT
00033 
00034   public:
00035     TemplatesInsertCommand( QWidget *parent, const char *name = 0 );
00036     ~TemplatesInsertCommand();
00037 
00038   public:
00039     enum Command {CDnl = 1, CRem, CInsert, CSystem, CQuotePipe, CQuote, CQHeaders, CHeaders, 
00040                   CTextPipe, CMsgPipe, CBodyPipe, CClearPipe, CText, 
00041                   CToAddr, CToName, CFromAddr, CFromName, CFullSubject, CMsgId, 
00042                   COHeader, CHeader, COToAddr, COToName, COFromAddr, COFromName, COFullSubject, 
00043                   COMsgId, CDateEn, CDateShort, CDate, CDow, CTimeLongEn, CTimeLong, CTime, 
00044                   CODateEn, CODateShort, CODate, CODow, COTimeLongEn, COTimeLong, COTime, 
00045                   CBlank, CNop, CClear, CDebug, CDebugOff, CToFName, CToLName, CFromFName, CFromLName, 
00046                   COToFName, COToLName, COFromFName, COFromLName, CCursor, 
00047                   CCCAddr, CCCName, CCCFName, CCCLName, COCCAddr, COCCName, COCCFName, COCCLName };
00048 
00049   signals:
00050     void insertCommand( TemplatesInsertCommand::Command cmd );
00051     void insertCommand( QString cmd, int adjustCursor = 0 );
00052 
00053   public slots:
00054     void slotClicked();
00055     void slotMapped( int cmd );
00056 
00057   protected:
00058     KActionMenu *mMenu;
00059 };
00060 
00061 #endif // TEMPLATESINSERTCOMMAND_H