• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kdgantt

kdganttabstractgrid.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 used under the terms of the GNU General Public
00007  ** License versions 2.0 or 3.0 as published by the Free Software
00008  ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
00009  ** included in the packaging of this file.  Alternatively you may (at
00010  ** your option) use any later version of the GNU General Public
00011  ** License if such license has been publicly approved by
00012  ** Klarälvdalens Datakonsult AB (or its successors, if any).
00013  ** 
00014  ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
00015  ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
00016  ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
00017  ** not expressly granted herein.
00018  ** 
00019  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021  **
00022  **********************************************************************/
00023 #ifndef KDGANTTABSTRACTGRID_H
00024 #define KDGANTTABSTRACTGRID_H
00025 
00026 #include "kdganttglobal.h"
00027 #include "kdganttconstraint.h"
00028 
00029 class QPainter;
00030 class QRectF;
00031 class QAbstractItemModel;
00032 class QModelIndex;
00033 
00034 namespace KDGantt {
00035     class AbstractRowController;
00036     class Span;
00037 
00038     class KDGANTT_EXPORT AbstractGrid : public QObject {
00039         Q_OBJECT
00040         KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC( AbstractGrid )
00041     friend class GraphicsScene;
00042     public:
00043         AbstractGrid(QObject* parent = 0);
00044         virtual ~AbstractGrid();
00045 
00046         QAbstractItemModel* model() const;
00047         QModelIndex rootIndex() const;
00048 
00049         virtual Span mapToChart( const QModelIndex& idx ) const = 0;
00050         virtual bool mapFromChart( const Span& span, const QModelIndex& idx,
00051                                    const QList<Constraint>& constraints=QList<Constraint>() ) const = 0;
00052         bool isSatisfiedConstraint( const Constraint& c ) const;
00053 
00054         virtual void paintGrid( QPainter* painter, const QRectF& sceneRect, const QRectF& exposedRect,
00055                                 AbstractRowController* rowController = 0, QWidget* widget=0 ) = 0;
00056         virtual void paintHeader( QPainter* painter, const QRectF& headerRect, const QRectF& exposedRect,
00057                                   qreal offset, QWidget* widget=0 ) = 0;
00058         
00059         virtual void render( QPainter* /*painter*/,  const QRectF & /*target*/, const QRectF&  /*headerRect*/, const QRectF& /*exposedRect*/, QWidget* /*widget*/, Qt::AspectRatioMode /*aspectRatioMode*/ = Qt::KeepAspectRatio ) {}
00060         
00061     public Q_SLOTS:
00062         /*internal*/ virtual void setModel( QAbstractItemModel* model );
00063         /*internal*/ virtual void setRootIndex( const QModelIndex& idx );
00064     Q_SIGNALS:
00065         void gridChanged();
00066     };
00067 }
00068 
00069 #endif /* KDGANTTABSTRACTGRID_H */
00070 

kdgantt

Skip menu "kdgantt"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal