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 distributed and/or modified under the terms of the
7 ** GNU General Public License version 2 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.GPL included in the
9 ** packaging of this file.
11 ** Licensees holding valid commercial KD Gantt licenses may use this file in
12 ** accordance with the KD Gantt Commercial License Agreement provided with
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.
18 ** See http://www.kdab.net/kdgantt for
19 ** information about KD Gantt Commercial License Agreements.
21 ** Contact info@kdab.net if any conditions of this
22 ** licensing are not clear to you.
24 **********************************************************************/
25 #ifndef KDGANTTFORWARDINGPROXYMODEL_H
26 #define KDGANTTFORWARDINGPROXYMODEL_H
28 #include <QAbstractProxyModel>
30 #include "kdganttglobal.h"
33 class KDGANTT_EXPORT ForwardingProxyModel
: public QAbstractProxyModel
{
35 Q_DISABLE_COPY(ForwardingProxyModel
)
37 explicit ForwardingProxyModel( QObject
* parent
=0 );
38 virtual ~ForwardingProxyModel();
40 /*reimp*/ QModelIndex
mapFromSource ( const QModelIndex
& sourceIndex
) const;
41 /*reimp*/ QModelIndex
mapToSource ( const QModelIndex
& proxyIndex
) const;
43 /*reimp*/ void setSourceModel( QAbstractItemModel
* model
);
45 /*reimp*/ QModelIndex
index( int row
, int column
, const QModelIndex
& parent
= QModelIndex() ) const;
46 /*reimp*/ QModelIndex
parent( const QModelIndex
& idx
) const;
48 /*reimp*/ int rowCount( const QModelIndex
& idx
= QModelIndex() ) const;
49 /*reimp*/ int columnCount( const QModelIndex
& idx
= QModelIndex() ) const;
51 /*reimp*/ bool setData( const QModelIndex
& index
, const QVariant
& value
, int role
= Qt::EditRole
);
54 virtual void sourceModelAboutToBeReset();
55 virtual void sourceModelReset();
56 virtual void sourceLayoutAboutToBeChanged();
57 virtual void sourceLayoutChanged();
58 virtual void sourceDataChanged( const QModelIndex
& from
, const QModelIndex
& to
);
59 virtual void sourceColumnsAboutToBeInserted( const QModelIndex
& idx
, int start
, int end
);
60 virtual void sourceColumnsInserted( const QModelIndex
& idx
, int start
, int end
);
61 virtual void sourceColumnsAboutToBeRemoved( const QModelIndex
& idx
, int start
, int end
);
62 virtual void sourceColumnsRemoved( const QModelIndex
& idx
, int start
, int end
);
63 virtual void sourceRowsAboutToBeInserted( const QModelIndex
& idx
, int start
, int end
);
64 virtual void sourceRowsInserted( const QModelIndex
& idx
, int start
, int end
);
65 virtual void sourceRowsAboutToBeRemoved( const QModelIndex
&, int start
, int end
);
66 virtual void sourceRowsRemoved( const QModelIndex
&, int start
, int end
);
70 #endif /* KDGANTTFORWARDINGPROXYMODEL_H */