1 /* This file is part of the KDE project
2    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
3              (C) 2002-2003 Philipp Mueller <philipp.mueller@gmx.de>
4              (C) 2002 Laurent Montel <montel@kde.org>
5              (C) 2002 John Dailey <dailey@vt.edu>
6              (C) 2002 Ariya Hidayat <ariya@kde.org>
7              (C) 2002 Werner Trobin <trobin@kde.org>
8              (C) 2002 Harri Porten <porten@kde.org>
9 
10    This library is free software; you can redistribute it and/or
11    modify it under the terms of the GNU Library General Public
12    License as published by the Free Software Foundation; either
13    version 2 of the License, or (at your option) any later version.
14 
15    This library is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    Library General Public License for more details.
19 
20    You should have received a copy of the GNU Library General Public License
21    along with this library; see the file COPYING.LIB.  If not, write to
22    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23    Boston, MA 02110-1301, USA.
24 */
25 
26 #ifndef CALLIGRA_SHEETS_GOALSEEK_DIALOG
27 #define CALLIGRA_SHEETS_GOALSEEK_DIALOG
28 
29 #include <KoDialog.h>
30 
31 class QCloseEvent;
32 
33 namespace Calligra
34 {
35 namespace Sheets
36 {
37 class Selection;
38 
39 /**
40  * \ingroup UI
41  * Dialog to seek a specific value for a set of parameter values.
42  */
43 class GoalSeekDialog : public KoDialog
44 {
45     Q_OBJECT
46 
47 public:
48     GoalSeekDialog(QWidget* parent, Selection* selection);
49     ~GoalSeekDialog() override;
50 
51 protected:
52     void closeEvent(QCloseEvent *) override;
53 
54 protected Q_SLOTS:
55     void textChanged();
56 
57 protected Q_SLOTS: // reimplementations
58     // KoDialog interface
59     void accept() override;
60     void reject() override;
61 
62 private:
63     class Private;
64     Private *const d;
65 
66     void startCalc(double _start, double _goal);
67 };
68 
69 } // namespace Sheets
70 } // namespace Calligra
71 
72 #endif // CALLIGRA_SHEETS_GOALSEEK_DIALOG
73