File indexing completed on 2024-05-12 16:35:27
0001 /* This file is part of the KDE project 0002 Copyright (C) 2002-2003 Norbert Andres <nandres@web.de> 0003 (C) 2002 Philipp Mueller <philipp.mueller@gmx.de> 0004 (C) 2002 Laurent Montel <montel@kde.org> 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Library General Public 0008 License as published by the Free Software Foundation; either 0009 version 2 of the License, or (at your option) any later version. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Library General Public License for more details. 0015 0016 You should have received a copy of the GNU Library General Public License 0017 along with this library; see the file COPYING.LIB. If not, write to 0018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 Boston, MA 02110-1301, USA. 0020 */ 0021 0022 0023 #ifndef CALLIGRA_SHEETS_SUBTOTAL_DIALOG 0024 #define CALLIGRA_SHEETS_SUBTOTAL_DIALOG 0025 0026 #include <KoDialog.h> 0027 0028 namespace Calligra 0029 { 0030 namespace Sheets 0031 { 0032 class Selection; 0033 0034 /** 0035 * \ingroup UI 0036 * Dialog to add subtotals. 0037 */ 0038 class SubtotalDialog : public KoDialog 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 SubtotalDialog(QWidget* parent, Selection* selection); 0044 ~SubtotalDialog() override; 0045 0046 public Q_SLOTS: // reimplemented 0047 void accept() override; 0048 void reject() override; 0049 0050 private Q_SLOTS: 0051 void slotUser1(); 0052 0053 private: 0054 void fillColumnBoxes(); 0055 void fillFunctionBox(); 0056 void removeSubtotalLines(); 0057 bool addSubtotal(int mainCol, int column, int row, int topRow, 0058 bool addRow, QString const & text); 0059 0060 class Private; 0061 Private *const d; 0062 }; 0063 0064 } // namespace Sheets 0065 } // namespace Calligra 0066 0067 #endif // CALLIGRA_SHEETS_SUBTOTAL_DIALOG