korganizer
templatemanagementdialog.h
00001 /******************************************************************************* 00002 ** 00003 ** Filename : templatemanagerdialog.h 00004 ** Created on : 05 June, 2005 00005 ** Copyright : (c) 2005 Till Adam 00006 ** Email : <adam@kde.org> 00007 ** 00008 *******************************************************************************/ 00009 00010 /******************************************************************************* 00011 ** 00012 ** This program is free software; you can redistribute it and/or modify 00013 ** it under the terms of the GNU General Public License as published by 00014 ** the Free Software Foundation; either version 2 of the License, or 00015 ** (at your option) any later version. 00016 ** 00017 ** It is distributed in the hope that it will be useful, but 00018 ** WITHOUT ANY WARRANTY; without even the implied warranty of 00019 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 ** General Public License for more details. 00021 ** 00022 ** You should have received a copy of the GNU General Public License 00023 ** along with this program; if not, write to the Free Software 00024 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00025 ** 00026 ** In addition, as a special exception, the copyright holders give 00027 ** permission to link the code of this program with any edition of 00028 ** the TQt library by Trolltech AS, Norway (or with modified versions 00029 ** of TQt that use the same license as TQt), and distribute linked 00030 ** combinations including the two. You must obey the GNU General 00031 ** Public License in all respects for all of the code used other than 00032 ** TQt. If you modify this file, you may extend this exception to 00033 ** your version of the file, but you are not obligated to do so. If 00034 ** you do not wish to do so, delete this exception statement from 00035 ** your version. 00036 ** 00037 *******************************************************************************/ 00038 #ifndef TEMPLATEMANAGEMENTDIALOG_H 00039 #define TEMPLATEMANAGEMENTDIALOG_H 00040 00041 #include <tqstringlist.h> 00042 00043 #include "template_management_dialog_base.h" 00044 00045 #include <kdialogbase.h> 00046 00047 class TemplateManagementDialog: public KDialogBase { 00048 Q_OBJECT 00049 00050 public: 00051 TemplateManagementDialog( TQWidget *parent, const TQStringList& templates ); 00052 00053 signals: 00054 /* Emitted whenever the user hits apply, indicating that the currently selected template 00055 should be loaded into to the incidence editor which triggered this. */ 00056 void loadTemplate( const TQString& templateName ); 00057 /* Emitted whenever the user wants to add teh current incidence as a template 00058 with the given name. */ 00059 void saveTemplate( const TQString& templateName ); 00060 /* Emitted when the dialog changed the list of templates. Calling code can the replace 00061 the list that was handed in with the one this signal transports. */ 00062 void templatesChanged( const TQStringList& templates ); 00063 00064 protected slots: 00065 void slotAddTemplate(); 00066 void slotDeleteTemplate(); 00067 void slotApplyTemplate(); 00068 void slotUpdateDeleteButton( TQListBoxItem *item ); 00069 void slotOk(); 00070 00071 private: 00072 TemplateManagementDialog_base *m_base; 00073 TQStringList m_templates; 00074 TQString m_newTemplate; 00075 bool m_changed; 00076 }; 00077 00078 #endif