File indexing completed on 2025-01-05 03:35:43

0001 /*
0002     File                 : SortDialog.h
0003     Project              : LabPlot
0004     Description          : Sorting options dialog
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2011-2023 Alexander Semke <alexander.semke@web.de>
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef SORTDIALOG_H
0011 #define SORTDIALOG_H
0012 
0013 #include <QDialog>
0014 #include <ui_sortdialogwidget.h>
0015 class Column;
0016 
0017 class SortDialog : public QDialog {
0018     Q_OBJECT
0019 
0020 public:
0021     explicit SortDialog(QWidget* parent = nullptr, bool sortAll = true);
0022     ~SortDialog() override;
0023 
0024     void setColumns(const QVector<Column*>&, const Column* leadingColumn = nullptr);
0025 
0026 private Q_SLOTS:
0027     void sortColumns();
0028 
0029 Q_SIGNALS:
0030     void sort(Column*, QVector<Column*>, bool ascending);
0031 
0032 private:
0033     Ui::SortDialogWidget ui;
0034     QVector<Column*> m_columns;
0035 };
0036 
0037 #endif