File indexing completed on 2024-07-07 07:09:17

0001 /*
0002     SPDX-FileCopyrightText: 2005 Jason Harris <kstars@30doradus.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QFocusEvent>
0010 #include <QTextEdit>
0011 
0012 /**
0013  * @class LogEdit
0014  * @brief This is a simple derivative of QTextEdit, that just adds a
0015  * focusOut() signal, emitted when the edit loses focus.
0016  *
0017  * @author Jason Harris
0018  * @version 1.0
0019  */
0020 class LogEdit : public QTextEdit
0021 {
0022     Q_OBJECT
0023 
0024   public:
0025     explicit LogEdit(QWidget *parent = nullptr);
0026     virtual ~LogEdit() override = default;
0027 
0028   signals:
0029     void focusOut();
0030 
0031   protected:
0032     void focusOutEvent(QFocusEvent *e) override;
0033 };