kalarm

templatedlg.h

00001 /*
00002  *  templatedlg.h  -  dialogue to create, edit and delete alarm templates
00003  *  Program:  kalarm
00004  *  Copyright (C) 2004 by David Jarvie <software@astrojar.org.uk>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 #ifndef TEMPLATEDLG_H
00021 #define TEMPLATEDLG_H
00022 
00023 #include <kdialogbase.h>
00024 
00025 class QPushButton;
00026 class TemplateListView;
00027 class KAEvent;
00028 
00029 
00030 class TemplateDlg : public KDialogBase
00031 {
00032         Q_OBJECT
00033     public:
00034         static TemplateDlg*  create(QWidget* parent = 0, const char* name = 0);
00035         ~TemplateDlg();
00036         static void   createTemplate(const KAEvent* = 0, QWidget* parent = 0, TemplateListView* = 0);
00037 
00038     signals:
00039         void          emptyToggled(bool notEmpty);
00040 
00041     protected:
00042         virtual void  resizeEvent(QResizeEvent*);
00043 
00044     private slots:
00045         void          slotNew();
00046         void          slotCopy();
00047         void          slotEdit();
00048         void          slotDelete();
00049         void          slotSelectionChanged();
00050 
00051     private:
00052         TemplateDlg(QWidget* parent, const char* name);
00053 
00054         static TemplateDlg* mInstance;   // the current instance, to prevent multiple dialogues
00055 
00056         TemplateListView*   mTemplateList;
00057         QPushButton*        mEditButton;
00058         QPushButton*        mCopyButton;
00059         QPushButton*        mDeleteButton;
00060 };
00061 
00062 #endif // TEMPLATEDLG_H
KDE Home | KDE Accessibility Home | Description of Access Keys