2 * editdlg_p.h - private classes for editdlg.cpp
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.
24 #include <ktextedit.h>
25 #include <ktabwidget.h>
27 class QDragEnterEvent
;
33 class PageFrame
: public QFrame
37 explicit PageFrame(QWidget
* parent
= 0) : QFrame(parent
) { }
40 virtual void showEvent(QShowEvent
*) { emit
shown(); }
46 class TextEdit
: public KTextEdit
50 explicit TextEdit(QWidget
* parent
);
51 virtual QSize
sizeHint() const { return minimumSizeHint(); }
52 virtual QSize
minimumSizeHint() const { return minimumSize(); }
55 virtual void dragEnterEvent(QDragEnterEvent
*);
58 class CommandEdit
: public QWidget
62 explicit CommandEdit(QWidget
* parent
);
63 bool isScript() 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(); }
73 void scriptToggled(bool);
74 void changed(); // emitted when any changes occur
77 void slotCmdScriptToggled(bool);
80 CheckBox
* mTypeScript
; // entering a script
81 LineEdit
* mCommandEdit
; // command line edit box
82 TextEdit
* mScriptEdit
; // script edit box