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

kdgantt

kdganttdatetimegrid.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 KDGANTTDATETIMEGRID_H
00024 #define KDGANTTDATETIMEGRID_H
00025 
00026 #include "kdganttabstractgrid.h"
00027 
00028 #include <QDateTime>
00029 #include <QSet>
00030 
00031 namespace KDGantt {
00032     class KDGANTT_EXPORT DateTimeGrid : public AbstractGrid {
00033         Q_OBJECT
00034         KDGANTT_DECLARE_PRIVATE_DERIVED( DateTimeGrid )
00035     public:
00036         enum Scale { ScaleAuto, ScaleHour, ScaleDay, ScaleWeek };
00037     
00038         DateTimeGrid();
00039         virtual ~DateTimeGrid();
00040 
00041         QDateTime startDateTime() const;
00042         void setStartDateTime( const QDateTime& dt );
00043 
00044         qreal dayWidth() const;
00045         void setDayWidth( qreal );
00046 
00047         void setWeekStart( Qt::DayOfWeek );
00048         Qt::DayOfWeek weekStart() const;
00049 
00050         void setFreeDays( const QSet<Qt::DayOfWeek>& fd );
00051         QSet<Qt::DayOfWeek> freeDays() const;
00052 
00053         void setScale( Scale s );
00054         Scale scale() const;
00055 
00056         bool rowSeparators() const;
00057         void setRowSeparators( bool enable );
00058 
00059         /*reimp*/ Span mapToChart( const QModelIndex& idx ) const;
00060         /*reimp*/ bool mapFromChart( const Span& span, const QModelIndex& idx,
00061                                      const QList<Constraint>& constraints=QList<Constraint>() ) const;
00062         /*reimp*/ void paintGrid( QPainter* painter, const QRectF& sceneRect, const QRectF& exposedRect,
00063                                   AbstractRowController* rowController = 0,
00064                                   QWidget* widget=0 );
00065         /*reimp*/ void paintHeader( QPainter* painter, const QRectF& headerRect, const QRectF& exposedRect,
00066                                     qreal offset, QWidget* widget=0 );
00067 
00068         void render( QPainter* painter,  const QRectF &target, const QRectF& headerRect, const QRectF& exposedRect, QWidget *widget, Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio );
00069     
00070     protected:
00071         virtual void paintHourScaleHeader( QPainter* painter, const QRectF& headerRect, const QRectF& exposedRect,
00072                                     qreal offset, QWidget* widget=0 );
00073         virtual void paintDayScaleHeader( QPainter* painter, const QRectF& headerRect, const QRectF& exposedRect,
00074                                     qreal offset, QWidget* widget=0 );
00075         virtual void paintWeekScaleHeader( QPainter* painter, const QRectF& headerRect, const QRectF& exposedRect,
00076                                           qreal offset, QWidget* widget=0 );
00077 
00078     };
00079 }
00080 
00081 #endif /* KDGANTTDATETIMEGRID_H */
00082 

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
  •   doc
  • 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