KD Chart 2  [rev.2.7]
kdganttforwardingproxymodel.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Chart library.
5 **
6 ** Licensees holding valid commercial KD Chart licenses may use this file in
7 ** accordance with the KD Chart Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDGANTTFORWARDINGPROXYMODEL_H
24 #define KDGANTTFORWARDINGPROXYMODEL_H
25 
26 #include <QAbstractProxyModel>
27 
28 #include "kdganttglobal.h"
29 
30 namespace KDGantt {
31  class KDGANTT_EXPORT ForwardingProxyModel : public QAbstractProxyModel {
32  Q_OBJECT
33  Q_DISABLE_COPY(ForwardingProxyModel)
34  public:
35  explicit ForwardingProxyModel( QObject* parent=0 );
36  ~ForwardingProxyModel() override;
37 
38  /*reimp*/ QModelIndex mapFromSource ( const QModelIndex & sourceIndex ) const override;
39  /*reimp*/ QModelIndex mapToSource ( const QModelIndex & proxyIndex ) const override;
40 
41  /*reimp*/ void setSourceModel( QAbstractItemModel* model ) override;
42 
43  /*reimp*/ QModelIndex index( int row, int column, const QModelIndex& parent = QModelIndex() ) const override;
44  /*reimp*/ QModelIndex parent( const QModelIndex& idx ) const override;
45 
46  /*reimp*/ int rowCount( const QModelIndex& idx = QModelIndex() ) const override;
47  /*reimp*/ int columnCount( const QModelIndex& idx = QModelIndex() ) const override;
48 
49  /*reimp*/ bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole ) override;
50 
51  /*reimp*/ QMimeData *mimeData(const QModelIndexList &indexes) const override;
52  /*reimp*/ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
53  /*reimp*/ QStringList mimeTypes() const override;
54  /*reimp*/ Qt::DropActions supportedDropActions() const override;
55 
56  protected Q_SLOTS:
57  virtual void sourceModelAboutToBeReset();
58  virtual void sourceModelReset();
59  virtual void sourceLayoutAboutToBeChanged();
60  virtual void sourceLayoutChanged();
61  virtual void sourceDataChanged( const QModelIndex& from, const QModelIndex& to );
62  virtual void sourceColumnsAboutToBeInserted( const QModelIndex& idx, int start, int end );
63  virtual void sourceColumnsInserted( const QModelIndex& idx, int start, int end );
64  virtual void sourceColumnsAboutToBeRemoved( const QModelIndex& idx, int start, int end );
65  virtual void sourceColumnsRemoved( const QModelIndex& idx, int start, int end );
66  virtual void sourceRowsAboutToBeInserted( const QModelIndex& idx, int start, int end );
67  virtual void sourceRowsInserted( const QModelIndex& idx, int start, int end );
68  virtual void sourceRowsAboutToBeRemoved( const QModelIndex&, int start, int end );
69  virtual void sourceRowsRemoved( const QModelIndex&, int start, int end );
70  };
71 }
72 
73 #endif /* KDGANTTFORWARDINGPROXYMODEL_H */
74 
Class only listed here to document inheritance of some KDChart classes.
Class only listed here to document inheritance of some KDChart classes.

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/

https://www.kdab.com/development-resources/qt-tools/kd-chart/