File indexing completed on 2024-05-12 04:37:38
0001 /* 0002 SPDX-FileCopyrightText: 2016 Mikhail Ivchenko <ematirov@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_VARIABLESORTMODEL_H 0008 #define KDEVPLATFORM_VARIABLESORTMODEL_H 0009 0010 #include <QCollator> 0011 #include <QSortFilterProxyModel> 0012 0013 namespace KDevelop 0014 { 0015 0016 class VariableSortProxyModel : public QSortFilterProxyModel 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit VariableSortProxyModel(QObject *parent = nullptr); 0022 0023 protected: 0024 bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; 0025 private: 0026 QCollator m_collator; 0027 }; 0028 0029 } 0030 0031 #endif