kdganttproxymodel.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 KDGANTTPROXYMODEL_H
00026 #define KDGANTTPROXYMODEL_H
00027 
00028 #include "kdganttforwardingproxymodel.h"
00029 
00030 namespace KDGantt {
00031     class KDCHART_EXPORT ProxyModel : public ForwardingProxyModel {
00032         Q_OBJECT
00033         Q_DISABLE_COPY(ProxyModel)
00034         KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC( ProxyModel )
00035     public:
00036         explicit ProxyModel( QObject* parent=0 );
00037         virtual ~ProxyModel();
00038 
00039         void setColumn( int ganttrole, int col );
00040         void setRole( int ganttrole, int role );
00041 
00042         int column( int ganttrole ) const;
00043         int role( int ganttrole ) const;
00044 
00045 #if 0
00046         void setCalendarMode( bool enable );
00047         bool calendarMode() const;
00048 #endif
00049 
00050         /*reimp*/ QModelIndex mapFromSource( const QModelIndex& idx) const;
00051         /*reimp*/ QModelIndex mapToSource( const QModelIndex& proxyIdx ) const;
00052 
00053         /*reimp*/ int rowCount( const QModelIndex& idx ) const;
00054         /*reimp*/ int columnCount( const QModelIndex& idx ) const;
00055 
00056         /*reimp*/ QVariant data( const QModelIndex& idx, int role = Qt::DisplayRole ) const;
00057         /*reimp*/ bool setData( const QModelIndex& idx, const QVariant& value, int role=Qt::EditRole );
00058     };
00059 }
00060 
00061 #endif /* KDGANTTPROXYMODEL_H */
00062 

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