File indexing completed on 2024-04-28 05:49:44

0001 /*
0002     SPDX-FileCopyrightText: 2023 Gabriel Barrantes <gabriel.barrantes.dev@outlook.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #pragma once
0007 
0008 #include <QLineEdit>
0009 #include <QString>
0010 
0011 class KCalcInputDisplay : public QLineEdit
0012 {
0013     Q_OBJECT
0014 
0015 public:
0016     explicit KCalcInputDisplay(QWidget *parent = nullptr);
0017     ~KCalcInputDisplay() override;
0018 
0019     void insertToken(const QString &token);
0020 
0021 public Q_SLOTS:
0022     void slotSetOverwrite();
0023     void slotSetHardOverwrite();
0024     void slotClearOverwrite();
0025 
0026 Q_SIGNALS:
0027 
0028 protected:
0029     void focusInEvent(QFocusEvent *e) override;
0030 
0031 private Q_SLOTS:
0032 
0033 private:
0034     bool overwrite_;
0035     bool hard_overwrite_;
0036 };