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

0001 /* This file is part of the KDE project
0002    Copyright (C) 2006 Robert Knight <robertknight@gmail.com>
0003              (C) 2002-2003 Norbert Andres <nandres@web.de>
0004              (C) 2002 Ariya Hidayat <ariya@kde.org>
0005              (C) 2002 John Dailey <dailey@vt.edu>
0006              (C) 2002 Werner Trobin <trobin@kde.org>
0007              (C) 2001-2002 Philipp Mueller <philipp.mueller@gmx.de>
0008              (C) 1999-2002 Laurent Montel <montel@kde.org>
0009              (C) 2000 David Faure <faure@kde.org>
0010              (C) 1998-2000 Torben Weis <weis@kde.org>
0011 
0012    This library is free software; you can redistribute it and/or
0013    modify it under the terms of the GNU Library General Public
0014    License as published by the Free Software Foundation; either
0015    version 2 of the License, or (at your option) any later version.
0016 
0017    This library is distributed in the hope that it will be useful,
0018    but WITHOUT ANY WARRANTY; without even the implied warranty of
0019    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0020    Library General Public License for more details.
0021 
0022    You should have received a copy of the GNU Library General Public License
0023    along with this library; see the file COPYING.LIB.  If not, write to
0024    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0025    Boston, MA 02110-1301, USA.
0026 */
0027 
0028 #ifndef CALLIGRA_SHEETS_SORT_DIALOG
0029 #define CALLIGRA_SHEETS_SORT_DIALOG
0030 
0031 #include <KoDialog.h>
0032 
0033 class QTableWidgetItem;
0034 
0035 namespace Calligra
0036 {
0037 namespace Sheets
0038 {
0039 class Selection;
0040 
0041 /**
0042  * \ingroup UI
0043  * Dialog to set options for the sort cell values command.
0044  */
0045 class SortDialog : public KoDialog
0046 {
0047     Q_OBJECT
0048 public:
0049     SortDialog(QWidget* parent, Selection* selection);
0050     ~SortDialog() override;
0051 
0052 public Q_SLOTS: // reimplementations
0053     void accept() override;
0054     void slotButtonClicked(int button) override;
0055 
0056 private:
0057     void init();
0058 
0059 private Q_SLOTS:
0060     void useHeaderChanged(bool);
0061     void orientationChanged(bool horizontal);
0062     void itemActivated(QTableWidgetItem *item);
0063     void itemSelectionChanged();
0064     void addCriterion();
0065     void removeCriterion();
0066     void moveCriterionUp();
0067     void moveCriterionDown();
0068 
0069 private:
0070     class Private;
0071     Private *const d;
0072 };
0073 
0074 } // namespace Sheets
0075 } // namespace Calligra
0076 
0077 #endif // CALLIGRA_SHEETS_SORT_DIALOG