File indexing completed on 2024-05-05 04:51:44

0001 /*
0002     SPDX-FileCopyrightText: 2010 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2010 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef K3BDATAPROJECTSORTPROXYMODEL_H
0009 #define K3BDATAPROJECTSORTPROXYMODEL_H
0010 
0011 #include <QSortFilterProxyModel>
0012 
0013 
0014 namespace K3b {
0015 
0016     /**
0017      * \class DataProjectSortProxyModel
0018      * Proxy model used for sorting right part of Data Project view.
0019      * Folders are always shown above files.
0020      */
0021     class DataProjectSortProxyModel : public QSortFilterProxyModel
0022     {
0023     public:
0024         explicit DataProjectSortProxyModel( QObject* parent = 0 );
0025 
0026     protected:
0027         bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
0028     };
0029 
0030 }
0031 
0032 #endif // K3BDATAPROJECTSORTPROXYMODEL_H