Backport r950340 | aacid | 2009-04-06 23:21:18 +0200 (Mon, 06 Apr 2009) | 4 lines
[kdepim.git] / kdgantt / kdganttgraphicsscene_p.h
blobe421b7f85d747e288c50cb46f57e319e3d53bda9
1 /****************************************************************************
2 ** Copyright (C) 2001-2006 Klarälvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Gantt library.
5 **
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).
13 **
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.
18 **
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 KDGANTTGRAPHICSSCENE_P_H
24 #define KDGANTTGRAPHICSSCENE_P_H
26 #include <QPersistentModelIndex>
27 #include <QHash>
28 #include <QPointer>
29 #include <QItemSelectionModel>
30 #include <QAbstractProxyModel>
32 #include "kdganttgraphicsscene.h"
33 #include "kdganttconstraintmodel.h"
34 #include "kdganttdatetimegrid.h"
36 namespace KDGantt {
37 class GraphicsScene::Private {
38 public:
39 explicit Private(GraphicsScene*);
41 void resetConstraintItems();
42 void createConstraintItem( const Constraint& c );
43 void deleteConstraintItem( ConstraintGraphicsItem* citem );
44 void deleteConstraintItem( const Constraint& c );
45 ConstraintGraphicsItem* findConstraintItem( const Constraint& c ) const;
47 GraphicsScene* q;
49 QHash<QPersistentModelIndex,GraphicsItem*> items;
50 GraphicsItem* dragSource;
52 QPointer<ItemDelegate> itemDelegate;
53 AbstractRowController* rowController;
54 DateTimeGrid default_grid;
55 QPointer<AbstractGrid> grid;
56 bool readOnly;
58 QPointer<QAbstractProxyModel> summaryHandlingModel;
60 QPointer<ConstraintModel> constraintModel;
62 QPointer<QItemSelectionModel> selectionModel;
65 GraphicsScene::GraphicsScene( GraphicsScene::Private* d ) : _d( d )
67 init();
71 #endif /* KDGANTTGRAPHICSSCENE_P_H */