kdganttforwardingproxymodel.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Chart library.
00005 **
00006 ** Licensees holding valid commercial KD Chart licenses may use this file in
00007 ** accordance with the KD Chart Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
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 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef KDGANTTFORWARDINGPROXYMODEL_H
00024 #define KDGANTTFORWARDINGPROXYMODEL_H
00025 
00026 #include <QAbstractProxyModel>
00027 
00028 #include "kdganttglobal.h"
00029 
00030 namespace KDGantt {
00031     class KDCHART_EXPORT ForwardingProxyModel : public QAbstractProxyModel {
00032         Q_OBJECT
00033         Q_DISABLE_COPY(ForwardingProxyModel)
00034     public:
00035         explicit ForwardingProxyModel( QObject* parent=0 );
00036         virtual ~ForwardingProxyModel();
00037 
00038         /*reimp*/ QModelIndex mapFromSource ( const QModelIndex & sourceIndex ) const;
00039         /*reimp*/ QModelIndex mapToSource ( const QModelIndex & proxyIndex ) const;
00040 
00041         /*reimp*/ void setSourceModel( QAbstractItemModel* model );
00042 
00043         /*reimp*/ QModelIndex index( int row, int column, const QModelIndex& parent = QModelIndex() ) const;
00044         /*reimp*/ QModelIndex parent( const QModelIndex& idx ) const;
00045 
00046         /*reimp*/ int rowCount( const QModelIndex& idx = QModelIndex() ) const;
00047         /*reimp*/ int columnCount( const QModelIndex& idx = QModelIndex() ) const;
00048 
00049         /*reimp*/ bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole );
00050 
00051         /*reimp*/ QMimeData *mimeData(const QModelIndexList &indexes) const;
00052         /*reimp*/ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
00053         /*reimp*/ QStringList mimeTypes() const;
00054         /*reimp*/ Qt::DropActions supportedDropActions() const;
00055     
00056     protected Q_SLOTS:
00057         virtual void sourceModelAboutToBeReset();
00058         virtual void sourceModelReset();
00059         virtual void sourceLayoutAboutToBeChanged();
00060         virtual void sourceLayoutChanged();
00061         virtual void sourceDataChanged( const QModelIndex& from, const QModelIndex& to );
00062         virtual void sourceColumnsAboutToBeInserted( const QModelIndex& idx, int start, int end );
00063         virtual void sourceColumnsInserted( const QModelIndex& idx, int start, int end );
00064         virtual void sourceColumnsAboutToBeRemoved( const QModelIndex& idx, int start, int end );
00065         virtual void sourceColumnsRemoved( const QModelIndex& idx, int start, int end );
00066         virtual void sourceRowsAboutToBeInserted( const QModelIndex& idx, int start, int end );
00067         virtual void sourceRowsInserted( const QModelIndex& idx, int start, int end );
00068         virtual void sourceRowsAboutToBeRemoved( const QModelIndex&, int start, int end );
00069         virtual void sourceRowsRemoved( const QModelIndex&, int start, int end );
00070     };
00071 }
00072 
00073 #endif /* KDGANTTFORWARDINGPROXYMODEL_H */
00074 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/