kdganttforwardingproxymodel.h

Go to the documentation of this file.
00001 /****************************************************************************
00002  ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB.  All rights reserved.
00003  **
00004  ** This file is part of the KD Gantt library.
00005  **
00006  ** This file may be distributed and/or modified under the terms of the
00007  ** GNU General Public License version 2 as published by the Free Software
00008  ** Foundation and appearing in the file LICENSE.GPL included in the
00009  ** packaging of this file.
00010  **
00011  ** Licensees holding valid commercial KD Gantt licenses may use this file in
00012  ** accordance with the KD Gantt Commercial License Agreement provided with
00013  ** the Software.
00014  **
00015  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017  **
00018  ** See http://www.kdab.net/kdgantt for
00019  **   information about KD Gantt Commercial License Agreements.
00020  **
00021  ** Contact info@kdab.net if any conditions of this
00022  ** licensing are not clear to you.
00023  **
00024  **********************************************************************/
00025 #ifndef KDGANTTFORWARDINGPROXYMODEL_H
00026 #define KDGANTTFORWARDINGPROXYMODEL_H
00027 
00028 #include <QAbstractProxyModel>
00029 
00030 #include "kdganttglobal.h"
00031 
00032 namespace KDGantt {
00033     class KDCHART_EXPORT ForwardingProxyModel : public QAbstractProxyModel {
00034         Q_OBJECT
00035         Q_DISABLE_COPY(ForwardingProxyModel)
00036     public:
00037         explicit ForwardingProxyModel( QObject* parent=0 );
00038         virtual ~ForwardingProxyModel();
00039 
00040         /*reimp*/ QModelIndex mapFromSource ( const QModelIndex & sourceIndex ) const;
00041         /*reimp*/ QModelIndex mapToSource ( const QModelIndex & proxyIndex ) const;
00042 
00043         /*reimp*/ void setSourceModel( QAbstractItemModel* model );
00044 
00045         /*reimp*/ QModelIndex index( int row, int column, const QModelIndex& parent = QModelIndex() ) const;
00046         /*reimp*/ QModelIndex parent( const QModelIndex& idx ) const;
00047 
00048         /*reimp*/ int rowCount( const QModelIndex& idx = QModelIndex() ) const;
00049         /*reimp*/ int columnCount( const QModelIndex& idx = QModelIndex() ) const;
00050 
00051         /*reimp*/ bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole );
00052 
00053     protected Q_SLOTS:
00054         virtual void sourceModelAboutToBeReset();
00055         virtual void sourceModelReset();
00056         virtual void sourceLayoutAboutToBeChanged();
00057         virtual void sourceLayoutChanged();
00058         virtual void sourceDataChanged( const QModelIndex& from, const QModelIndex& to );
00059         virtual void sourceColumnsAboutToBeInserted( const QModelIndex& idx, int start, int end );
00060         virtual void sourceColumnsInserted( const QModelIndex& idx, int start, int end );
00061         virtual void sourceColumnsAboutToBeRemoved( const QModelIndex& idx, int start, int end );
00062         virtual void sourceColumnsRemoved( const QModelIndex& idx, int start, int end );
00063         virtual void sourceRowsAboutToBeInserted( const QModelIndex& idx, int start, int end );
00064         virtual void sourceRowsInserted( const QModelIndex& idx, int start, int end );
00065         virtual void sourceRowsAboutToBeRemoved( const QModelIndex&, int start, int end );
00066         virtual void sourceRowsRemoved( const QModelIndex&, int start, int end );
00067     };
00068 }
00069 
00070 #endif /* KDGANTTFORWARDINGPROXYMODEL_H */
00071 

Generated on Thu Mar 4 23:19:13 2010 for KD Chart 2 by  doxygen 1.5.4