File indexing completed on 2024-05-12 17:08:30
0001 /* 0002 * SPDX-FileCopyrightText: 2021 David Redondo <kde@david-redondo.de> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #pragma once 0008 0009 #include <KRearrangeColumnsProxyModel> 0010 0011 /** 0012 * A proxy model to reverse the columns of a table. Needed because QML Tableview does not correctly 0013 * reverse its columns when using a RTL language. 0014 */ 0015 class ReverseColumnsProxyModel : public KRearrangeColumnsProxyModel 0016 { 0017 public: 0018 explicit ReverseColumnsProxyModel(QObject *parent = nullptr); 0019 void setSourceModel(QAbstractItemModel *sourceModel) override; 0020 0021 private: 0022 void reverseColumns(); 0023 };