kalarm

templatedlg.h
1 /*
2  * templatedlg.h - dialogue to create, edit and delete alarm templates
3  * Program: kalarm
4  * Copyright (C) 2004 by David Jarvie <software@astrojar.org.uk>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 #ifndef TEMPLATEDLG_H
21 #define TEMPLATEDLG_H
22 
23 #include <kdialogbase.h>
24 
25 class TQPushButton;
26 class TemplateListView;
27 class KAEvent;
28 
29 
30 class TemplateDlg : public KDialogBase
31 {
32  TQ_OBJECT
33 
34  public:
35  static TemplateDlg* create(TQWidget* parent = 0, const char* name = 0);
36  ~TemplateDlg();
37  static void createTemplate(const KAEvent* = 0, TQWidget* parent = 0, TemplateListView* = 0);
38 
39  signals:
40  void emptyToggled(bool notEmpty);
41 
42  protected:
43  virtual void resizeEvent(TQResizeEvent*);
44 
45  private slots:
46  void slotNew();
47  void slotCopy();
48  void slotEdit();
49  void slotDelete();
50  void slotSelectionChanged();
51 
52  private:
53  TemplateDlg(TQWidget* parent, const char* name);
54 
55  static TemplateDlg* mInstance; // the current instance, to prevent multiple dialogues
56 
57  TemplateListView* mTemplateList;
58  TQPushButton* mEditButton;
59  TQPushButton* mCopyButton;
60  TQPushButton* mDeleteButton;
61 };
62 
63 #endif // TEMPLATEDLG_H
KAEvent corresponds to a KCal::Event instance.
Definition: alarmevent.h:232