1 /****************************************************************************
2 ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB. All rights reserved.
4 ** This file is part of the KD Gantt library.
6 ** This file may be used under the terms of the GNU General Public
7 ** License versions 2.0 or 3.0 as published by the Free Software
8 ** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
9 ** included in the packaging of this file. Alternatively you may (at
10 ** your option) use any later version of the GNU General Public
11 ** License if such license has been publicly approved by
12 ** Klarälvdalens Datakonsult AB (or its successors, if any).
14 ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
15 ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
16 ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
17 ** not expressly granted herein.
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 **********************************************************************/
23 #ifndef KDGANTTDATETIMEGRID_P_H
24 #define KDGANTTDATETIMEGRID_P_H
26 #include "kdganttdatetimegrid.h"
27 #include "kdganttabstractgrid_p.h"
32 class DateTimeGrid::Private
: public AbstractGrid::Private
{
34 Private() : startDateTime( QDateTime::currentDateTime().addDays( -3 ) ),
35 dayWidth( 100. ), scale(ScaleAuto
), weekStart( Qt::Monday
),
36 freeDays( QSet
<Qt::DayOfWeek
>() << Qt::Saturday
<< Qt::Sunday
),
37 rowSeparators( false ) {}
39 qreal
dateTimeToChartX( const QDateTime
& dt
) const;
40 QDateTime
chartXtoDateTime( qreal x
) const;
42 QDateTime startDateTime
;
43 QDateTime endDateTime
;
46 Qt::DayOfWeek weekStart
;
47 QSet
<Qt::DayOfWeek
> freeDays
;
51 inline DateTimeGrid::DateTimeGrid( DateTimeGrid::Private
* d
) : AbstractGrid( d
) {}
53 inline DateTimeGrid::Private
* DateTimeGrid::d_func() {
54 return static_cast<Private
*>( AbstractGrid::d_func() );
56 inline const DateTimeGrid::Private
* DateTimeGrid::d_func() const {
57 return static_cast<const Private
*>( AbstractGrid::d_func() );
61 #endif /* KDGANTTDATETIMEGRID_P_H */