File indexing completed on 2024-12-15 04:02:48
0001 /* 0002 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 0003 * 0004 * This file is part of the KGantt library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KGANTTGRAPHICSSCENE_P_H 0010 #define KGANTTGRAPHICSSCENE_P_H 0011 0012 #include <QPersistentModelIndex> 0013 #include <QHash> 0014 #include <QPointer> 0015 #include <QItemSelectionModel> 0016 #include <QAbstractProxyModel> 0017 0018 #include "kganttgraphicsscene.h" 0019 #include "kganttconstraintmodel.h" 0020 #include "kganttdatetimegrid.h" 0021 0022 namespace KGantt { 0023 class AbstractGrid; 0024 0025 class Q_DECL_HIDDEN GraphicsScene::Private { 0026 public: 0027 explicit Private(GraphicsScene*); 0028 ~Private(); 0029 0030 void clearConstraintItems(); 0031 void resetConstraintItems(); 0032 void createConstraintItem( const Constraint& c ); 0033 void deleteConstraintItem( ConstraintGraphicsItem* citem ); 0034 void deleteConstraintItem( const Constraint& c ); 0035 ConstraintGraphicsItem* findConstraintItem( const Constraint& c ) const; 0036 0037 void recursiveUpdateMultiItem( const Span& span, const QModelIndex& idx ); 0038 0039 void clearItems(); 0040 AbstractGrid *getGrid(); 0041 const AbstractGrid *getGrid() const; 0042 0043 GraphicsScene* q; 0044 0045 QHash<QPersistentModelIndex,GraphicsItem*> items; 0046 QList<ConstraintGraphicsItem*> constraintItems; 0047 GraphicsItem* dragSource; 0048 0049 QPointer<ItemDelegate> itemDelegate; 0050 AbstractRowController* rowController; 0051 DateTimeGrid default_grid; 0052 QPointer<AbstractGrid> grid; 0053 bool readOnly; 0054 0055 /* printing related members */ 0056 bool isPrinting; 0057 bool drawColumnLabels; 0058 qreal labelsWidth; 0059 0060 QPointer<QAbstractProxyModel> summaryHandlingModel; 0061 0062 QPointer<ConstraintModel> constraintModel; 0063 0064 QPointer<QItemSelectionModel> selectionModel; 0065 }; 0066 0067 GraphicsScene::GraphicsScene( GraphicsScene::Private* d ) : _d( d ) 0068 { 0069 init(); 0070 } 0071 } 0072 0073 #endif /* KGANTTGRAPHICSSCENE_P_H */ 0074