File indexing completed on 2024-12-08 09:42:05

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 2007 Rafael Fernández López <ereslibre@kde.org>
0004     SPDX-FileCopyrightText: 2007 John Tapsell <tapsell@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef KCATEGORIZEDSORTFILTERPROXYMODEL_P_H
0010 #define KCATEGORIZEDSORTFILTERPROXYMODEL_P_H
0011 
0012 #include <QCollator>
0013 
0014 #include "kcategorizedsortfilterproxymodel.h"
0015 
0016 class KCategorizedSortFilterProxyModelPrivate
0017 {
0018 public:
0019     KCategorizedSortFilterProxyModelPrivate()
0020         : sortColumn(0)
0021         , sortOrder(Qt::AscendingOrder)
0022         , categorizedModel(false)
0023         , sortCategoriesByNaturalComparison(true)
0024     {
0025         m_collator.setNumericMode(true);
0026         m_collator.setCaseSensitivity(Qt::CaseSensitive);
0027     }
0028 
0029     ~KCategorizedSortFilterProxyModelPrivate()
0030     {
0031     }
0032 
0033     int sortColumn;
0034     Qt::SortOrder sortOrder;
0035     bool categorizedModel;
0036     bool sortCategoriesByNaturalComparison;
0037     QCollator m_collator;
0038 };
0039 
0040 #endif