1 /****************************************************************************
2 ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB. All rights reserved.
4 ** This file is part of the KD Gantt library.
6 ** This file may be used under the terms of the GNU General Public
7 ** License versions 2.0 or 3.0 as published by the Free Software
8 ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
9 ** included in the packaging of this file. Alternatively you may (at
10 ** your option) use any later version of the GNU General Public
11 ** License if such license has been publicly approved by
12 ** Klarälvdalens Datakonsult AB (or its successors, if any).
14 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
15 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
16 ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
17 ** not expressly granted herein.
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 **********************************************************************/
23 #ifndef KDGANTTFORWARDINGPROXYMODEL_H
24 #define KDGANTTFORWARDINGPROXYMODEL_H
26 #include <QAbstractProxyModel>
28 #include "kdganttglobal.h"
31 class KDGANTT_EXPORT ForwardingProxyModel
: public QAbstractProxyModel
{
33 Q_DISABLE_COPY(ForwardingProxyModel
)
35 explicit ForwardingProxyModel( QObject
* parent
=0 );
36 virtual ~ForwardingProxyModel();
38 /*reimp*/ QModelIndex
mapFromSource ( const QModelIndex
& sourceIndex
) const;
39 /*reimp*/ QModelIndex
mapToSource ( const QModelIndex
& proxyIndex
) const;
41 /*reimp*/ void setSourceModel( QAbstractItemModel
* model
);
43 /*reimp*/ QModelIndex
index( int row
, int column
, const QModelIndex
& parent
= QModelIndex() ) const;
44 /*reimp*/ QModelIndex
parent( const QModelIndex
& idx
) const;
46 /*reimp*/ int rowCount( const QModelIndex
& idx
= QModelIndex() ) const;
47 /*reimp*/ int columnCount( const QModelIndex
& idx
= QModelIndex() ) const;
49 /*reimp*/ bool setData( const QModelIndex
& index
, const QVariant
& value
, int role
= Qt::EditRole
);
52 virtual void sourceModelAboutToBeReset();
53 virtual void sourceModelReset();
54 virtual void sourceLayoutAboutToBeChanged();
55 virtual void sourceLayoutChanged();
56 virtual void sourceDataChanged( const QModelIndex
& from
, const QModelIndex
& to
);
57 virtual void sourceColumnsAboutToBeInserted( const QModelIndex
& idx
, int start
, int end
);
58 virtual void sourceColumnsInserted( const QModelIndex
& idx
, int start
, int end
);
59 virtual void sourceColumnsAboutToBeRemoved( const QModelIndex
& idx
, int start
, int end
);
60 virtual void sourceColumnsRemoved( const QModelIndex
& idx
, int start
, int end
);
61 virtual void sourceRowsAboutToBeInserted( const QModelIndex
& idx
, int start
, int end
);
62 virtual void sourceRowsInserted( const QModelIndex
& idx
, int start
, int end
);
63 virtual void sourceRowsAboutToBeRemoved( const QModelIndex
&, int start
, int end
);
64 virtual void sourceRowsRemoved( const QModelIndex
&, int start
, int end
);
68 #endif /* KDGANTTFORWARDINGPROXYMODEL_H */