File indexing completed on 2024-05-12 16:35:19

0001 /* This file is part of the KDE project
0002    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
0003              (C) 2002-2003 Philipp Mueller <philipp.mueller@gmx.de>
0004              (C) 2002 Laurent Montel <montel@kde.org>
0005              (C) 2002 John Dailey <dailey@vt.edu>
0006              (C) 2002 Ariya Hidayat <ariya@kde.org>
0007              (C) 2002 Werner Trobin <trobin@kde.org>
0008              (C) 2002 Harri Porten <porten@kde.org>
0009 
0010    This library is free software; you can redistribute it and/or
0011    modify it under the terms of the GNU Library General Public
0012    License as published by the Free Software Foundation; either
0013    version 2 of the License, or (at your option) any later version.
0014 
0015    This library is distributed in the hope that it will be useful,
0016    but WITHOUT ANY WARRANTY; without even the implied warranty of
0017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0018    Library General Public License for more details.
0019 
0020    You should have received a copy of the GNU Library General Public License
0021    along with this library; see the file COPYING.LIB.  If not, write to
0022    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0023    Boston, MA 02110-1301, USA.
0024 */
0025 
0026 #ifndef CALLIGRA_SHEETS_GOALSEEK_DIALOG
0027 #define CALLIGRA_SHEETS_GOALSEEK_DIALOG
0028 
0029 #include <KoDialog.h>
0030 
0031 class QCloseEvent;
0032 
0033 namespace Calligra
0034 {
0035 namespace Sheets
0036 {
0037 class Selection;
0038 
0039 /**
0040  * \ingroup UI
0041  * Dialog to seek a specific value for a set of parameter values.
0042  */
0043 class GoalSeekDialog : public KoDialog
0044 {
0045     Q_OBJECT
0046 
0047 public:
0048     GoalSeekDialog(QWidget* parent, Selection* selection);
0049     ~GoalSeekDialog() override;
0050 
0051 protected:
0052     void closeEvent(QCloseEvent *) override;
0053 
0054 protected Q_SLOTS:
0055     void textChanged();
0056 
0057 protected Q_SLOTS: // reimplementations
0058     // KoDialog interface
0059     void accept() override;
0060     void reject() override;
0061 
0062 private:
0063     class Private;
0064     Private *const d;
0065 
0066     void startCalc(double _start, double _goal);
0067 };
0068 
0069 } // namespace Sheets
0070 } // namespace Calligra
0071 
0072 #endif // CALLIGRA_SHEETS_GOALSEEK_DIALOG