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>
26 class QDragEnterEvent
;
32 class PageFrame
: public QFrame
36 explicit PageFrame(QWidget
* parent
= nullptr) : QFrame(parent
) { }
39 void showEvent(QShowEvent
*) override
{ emit
shown(); }
45 class TextEdit
: public KTextEdit
49 explicit TextEdit(QWidget
* parent
);
50 QSize
sizeHint() const override
{ return minimumSizeHint(); }
51 QSize
minimumSizeHint() const override
{ return minimumSize(); }
54 void dragEnterEvent(QDragEnterEvent
*) override
;
57 class CommandEdit
: public QWidget
61 explicit CommandEdit(QWidget
* parent
);
62 bool isScript() const;
65 QString
text(EditAlarmDlg
*, bool showErrorMessage
) const;
66 void setText(const AlarmText
&);
67 void setReadOnly(bool);
68 QSize
minimumSizeHint() const override
;
69 QSize
sizeHint() const override
{ return minimumSizeHint(); }
72 void scriptToggled(bool);
73 void changed(); // emitted when any changes occur
76 void slotCmdScriptToggled(bool);
79 CheckBox
* mTypeScript
; // entering a script
80 LineEdit
* mCommandEdit
; // command line edit box
81 TextEdit
* mScriptEdit
; // script edit box