kalarm
templatedlg.h
Go to the documentation of this file.00001 /* 00002 * templatedlg.h - dialog to create, edit and delete alarm templates 00003 * Program: kalarm 00004 * Copyright © 2004,2006,2007 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 <kdialog.h> 00024 #include "editdlg.h" 00025 00026 class QResizeEvent; 00027 class QPushButton; 00028 class NewAlarmAction; 00029 class TemplateListFilterModel; 00030 class TemplateListView; 00031 00032 00033 class TemplateDlg : public KDialog 00034 { 00035 Q_OBJECT 00036 public: 00037 static TemplateDlg* create(QWidget* parent = 0); 00038 ~TemplateDlg(); 00039 00040 signals: 00041 void emptyToggled(bool notEmpty); 00042 00043 protected: 00044 virtual void resizeEvent(QResizeEvent*); 00045 00046 private slots: 00047 void slotNew(EditAlarmDlg::Type); 00048 void slotCopy(); 00049 void slotEdit(); 00050 void slotDelete(); 00051 void slotSelectionChanged(); 00052 00053 private: 00054 TemplateDlg(QWidget* parent); 00055 00056 static TemplateDlg* mInstance; // the current instance, to prevent multiple dialogues 00057 00058 TemplateListFilterModel* mListFilterModel; 00059 TemplateListView* mListView; 00060 QPushButton* mEditButton; 00061 QPushButton* mCopyButton; 00062 QPushButton* mDeleteButton; 00063 NewAlarmAction* mNewAction; 00064 }; 00065 00066 #endif // TEMPLATEDLG_H
KDE 4.2 API Reference