The concept of local folders doesn't apply any more.
[kdepim.git] / kalarm / editdlg_p.h
blob23c2312c1fcbcbcd208169207721f59553a1a8d4
1 /*
2 * editdlg_p.h - private classes for editdlg.cpp
3 * Program: kalarm
4 * Copyright © 2003-2005,2007-2009 by David Jarvie <djarvie@kde.org>
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.
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.
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.
21 #ifndef EDITDLG_P_H
22 #define EDITDLG_P_H
24 #include <ktextedit.h>
25 #include <ktabwidget.h>
26 #include <QFrame>
27 class QDragEnterEvent;
28 class QShowEvent;
29 class CheckBox;
30 class LineEdit;
33 class PageFrame : public QFrame
35 Q_OBJECT
36 public:
37 explicit PageFrame(QWidget* parent = 0) : QFrame(parent) { }
39 protected:
40 virtual void showEvent(QShowEvent*) { emit shown(); }
42 signals:
43 void shown();
46 class TextEdit : public KTextEdit
48 Q_OBJECT
49 public:
50 explicit TextEdit(QWidget* parent);
51 virtual QSize sizeHint() const { return minimumSizeHint(); }
52 virtual QSize minimumSizeHint() const { return minimumSize(); }
54 protected:
55 virtual void dragEnterEvent(QDragEnterEvent*);
58 class CommandEdit : public QWidget
60 Q_OBJECT
61 public:
62 explicit CommandEdit(QWidget* parent);
63 bool isScript() const;
64 void setScript(bool);
65 QString text() const;
66 QString text(EditAlarmDlg*, bool showErrorMessage) const;
67 void setText(const AlarmText&);
68 void setReadOnly(bool);
69 virtual QSize minimumSizeHint() const;
70 virtual QSize sizeHint() const { return minimumSizeHint(); }
72 signals:
73 void scriptToggled(bool);
74 void changed(); // emitted when any changes occur
76 private slots:
77 void slotCmdScriptToggled(bool);
79 private:
80 CheckBox* mTypeScript; // entering a script
81 LineEdit* mCommandEdit; // command line edit box
82 TextEdit* mScriptEdit; // script edit box
85 #endif // EDITDLG_P_H
87 // vim: et sw=4: