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

0001 /* This file is part of the KDE project
0002    Copyright (C) 2002-2003 Norbert Andres <nandres@web.de>
0003              (C) 2002 Ariya Hidayat <ariya@kde.org>
0004              (C) 2002 Philipp Mueller <philipp.mueller@gmx.de>
0005              (C) 2002 John Dailey <dailey@vt.edu>
0006              (C) 2000-2001 Werner Trobin <trobin@kde.org>
0007              (C) 2000-2001 Laurent Montel <montel@kde.org>
0008              (C) 1999-2002 David Faure <faure@kde.org>
0009              (C) 1999 Stephan Kulow <coolo@kde.org>
0010              (C) 1999 Reginald Stadlbauer <reggie@kde.org>
0011              (C) 1998-1999 Torben Weis <weis@kde.org>
0012 
0013    This library is free software; you can redistribute it and/or
0014    modify it under the terms of the GNU Library General Public
0015    License as published by the Free Software Foundation; either
0016    version 2 of the License, or (at your option) any later version.
0017 
0018    This library is distributed in the hope that it will be useful,
0019    but WITHOUT ANY WARRANTY; without even the implied warranty of
0020    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0021    Library General Public License for more details.
0022 
0023    You should have received a copy of the GNU Library General Public License
0024    along with this library; see the file COPYING.LIB.  If not, write to
0025    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0026    Boston, MA 02110-1301, USA.
0027 */
0028 
0029 #ifndef CALLIGRA_SHEETS_CONSOLIDATE_DIALOG
0030 #define CALLIGRA_SHEETS_CONSOLIDATE_DIALOG
0031 
0032 #include <KoDialog.h>
0033 
0034 namespace Calligra
0035 {
0036 namespace Sheets
0037 {
0038 class Selection;
0039 class Sheet;
0040 
0041 /**
0042  * \ingroup UI
0043  * Dialog to consolidate cell values.
0044  *
0045  * How it works:
0046  * \li source cell ranges have to be of the same size
0047  * \li the function works with the relative (unless headers are defined) cell
0048  * references in the source cell ranges
0049  * \li the first columns/rows can be handled as headers: then, the function is
0050  * only applied to values, that have the same headings
0051  * \li optionally you can link to the source data: then, formulas are used in
0052  * the target cell range. Otherwise, only the formula results get stored.
0053  */
0054 class ConsolidateDialog : public KoDialog
0055 {
0056     Q_OBJECT
0057 public:
0058     ConsolidateDialog(QWidget* parent, Selection* selection);
0059     ~ConsolidateDialog() override;
0060 
0061 public Q_SLOTS:
0062     void accept() override;
0063 
0064 private Q_SLOTS:
0065     void slotAdd();
0066     void slotRemove();
0067 
0068     void slotSelectionChanged();
0069     void slotReturnPressed();
0070 
0071 private:
0072     class Private;
0073     Private *const d;
0074 };
0075 
0076 } // namespace Sheets
0077 } // namespace Calligra
0078 
0079 #endif // CALLIGRA_SHEETS_CONSOLIDATE_DIALOG