File indexing completed on 2024-05-12 04:20:30

0001 /*
0002  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
0003  *
0004  * This file is part of the KD Chart library.
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #ifndef KCHARTABSTRACTPROXYMODEL_H
0010 #define KCHARTABSTRACTPROXYMODEL_H
0011 
0012 #include <QAbstractProxyModel>
0013 
0014 #include "KChartGlobal.h"
0015 
0016 namespace KChart
0017 {
0018     /**
0019       * @brief Base class for all proxy models used inside KChart
0020       * \internal
0021       */
0022     class KCHART_EXPORT AbstractProxyModel : public QAbstractProxyModel
0023     {
0024         Q_OBJECT
0025     public:
0026 
0027         /** This is basically KDAbstractProxyModel, but only the
0028               bits that we really need from it */
0029         explicit AbstractProxyModel( QObject* parent = nullptr );
0030 
0031         /*! \reimpl */
0032         QModelIndex mapFromSource( const QModelIndex & sourceIndex ) const override;
0033         /*! \reimpl */
0034         QModelIndex mapToSource( const QModelIndex &proxyIndex ) const override;
0035 
0036         /*! \reimpl */
0037         QModelIndex index( int row, int col, const QModelIndex& index ) const override;
0038         /*! \reimpl */
0039         QModelIndex parent( const QModelIndex& index ) const override;
0040     };
0041 }
0042 
0043 #endif /* KCHARTABSTRACTPROXYMODEL_H */