11 #ifndef KDGANTTGRAPHICSSCENE_H
12 #define KDGANTTGRAPHICSSCENE_H
15 #include <QGraphicsScene>
17 #include <QModelIndex>
22 class QAbstractProxyModel;
23 class QItemSelectionModel;
29 class AbstractRowController;
32 class ConstraintModel;
33 class ConstraintGraphicsItem;
47 static QModelIndex mainIndex(
const QModelIndex &idx);
48 static QModelIndex dataIndex(
const QModelIndex &idx);
50 QAbstractItemModel *model()
const;
51 QAbstractProxyModel *summaryHandlingModel()
const;
52 QModelIndex rootIndex()
const;
54 QItemSelectionModel *selectionModel()
const;
56 void insertItem(
const QPersistentModelIndex &,
GraphicsItem *);
57 void removeItem(
const QModelIndex &);
58 using QGraphicsScene::removeItem;
60 GraphicsItem *findItem(
const QPersistentModelIndex &)
const;
64 void deleteSubtree(
const QModelIndex &);
67 void clearConstraintItems();
78 bool isReadOnly()
const;
80 void updateRow(
const QModelIndex &idx);
84 void itemEntered(
const QModelIndex &);
85 void itemPressed(
const QModelIndex &);
86 void itemClicked(
const QModelIndex &);
87 void itemDoubleClicked(
const QModelIndex &);
92 void print(QPrinter *printer,
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
93 void print(QPrinter *printer, qreal start, qreal end,
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
94 void print(QPainter *painter,
const QRectF &target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
95 void print(QPainter *painter, qreal start, qreal end,
const QRectF &target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
106 void helpEvent(QGraphicsSceneHelpEvent *helpEvent)
override;
107 void drawBackground(QPainter *painter,
const QRectF &rect)
override;
108 void drawForeground(QPainter *painter,
const QRectF &rect)
override;
111 void setModel(QAbstractItemModel *);
112 void setSummaryHandlingModel(QAbstractProxyModel *);
114 void setRootIndex(
const QModelIndex &idx);
115 void setSelectionModel(QItemSelectionModel *selectionmodel);
116 void setReadOnly(
bool);
122 void slotGridChanged();
125 void doPrint(QPainter *painter,
const QRectF &targetRect,
126 qreal start, qreal end,
127 QPrinter *printer,
bool drawRowLabels,
bool drawColumnLabels);
Abstract baseclass for grids.
Abstract baseclass for row controllers.
The ConstraintModel keeps track of the interdependencies between gantt items in a View.
A class used to represent a dependency.
void entered(const QModelIndex &index)
void clicked(const QModelIndex &index)
void qrealClicked(const QModelIndex &index)
void pressed(const QModelIndex &index)
Class used to render gantt items in a KDGantt::GraphicsView.
#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)
ItemType
The values of this enum are used to represent the different types of gantt items that KDGantt underst...