File indexing completed on 2024-04-14 03:40:42

0001 /*
0002     KmPlot - a math. function plotter for the KDE-Desktop
0003 
0004     SPDX-FileCopyrightText: 2007 David Saxton <david@bluehaze.org>
0005 
0006     This file is part of the KDE Project.
0007     KmPlot is part of the KDE-EDU Project.
0008 
0009     SPDX-License-Identifier: GPL-2.0-or-later
0010 
0011 */
0012 
0013 #ifndef CALCULATOR_H
0014 #define CALCULATOR_H
0015 
0016 #include <QDialog>
0017 
0018 class EquationEditorWidget;
0019 class KTextEdit;
0020 
0021 /**
0022  * Mini-calculator for calculating values of functions, etc.
0023  * @author David Saxton
0024  */
0025 class Calculator : public QDialog
0026 {
0027     Q_OBJECT
0028 public:
0029     explicit Calculator(QWidget *parent = nullptr);
0030     ~Calculator();
0031 
0032 protected Q_SLOTS:
0033     /**
0034      * The user hit enter from the input box.
0035      */
0036     void calculate();
0037 
0038 protected:
0039     EquationEditorWidget *m_input;
0040     KTextEdit *m_display;
0041     QString m_displayText;
0042 };
0043 
0044 #endif