11 #ifndef KDGANTTGRAPHICSVIEW_H
12 #define KDGANTTGRAPHICSVIEW_H
14 #include <QGraphicsView>
21 class QAbstractItemModel;
22 class QAbstractProxyModel;
23 class QItemSelectionModel;
38 Q_PROPERTY(
bool readOnly READ isReadOnly WRITE setReadOnly)
43 QAbstractItemModel *model()
const;
44 QAbstractProxyModel *summaryHandlingModel()
const;
46 QModelIndex rootIndex()
const;
47 QItemSelectionModel *selectionModel()
const;
52 bool isReadOnly()
const;
54 void setHeaderContextMenuPolicy(Qt::ContextMenuPolicy);
55 Qt::ContextMenuPolicy headerContextMenuPolicy()
const;
57 QModelIndex indexAt(
const QPoint &pos)
const;
59 virtual void addConstraint(
const QModelIndex &from,
60 const QModelIndex &to,
61 Qt::KeyboardModifiers modifiers);
64 void updateRow(
const QModelIndex &);
68 void updateSceneRect();
71 void deleteSubtree(
const QModelIndex &);
73 void print(QPrinter *printer,
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
74 void print(QPrinter *printer, qreal start, qreal end,
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
75 void print(QPainter *painter,
const QRectF &target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
76 void print(QPainter *painter, qreal start, qreal end,
77 const QRectF &target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
80 void setModel(QAbstractItemModel *);
81 void setSummaryHandlingModel(QAbstractProxyModel *model);
83 void setRootIndex(
const QModelIndex &);
84 void setSelectionModel(QItemSelectionModel *);
88 void setReadOnly(
bool);
99 void resizeEvent(QResizeEvent *)
override;
Abstract baseclass for grids.
Abstract baseclass for row controllers.
The ConstraintModel keeps track of the interdependencies between gantt items in a View.
The GraphicsView class provides a model/view implementation of a gantt chart.
void entered(const QModelIndex &index)
void pressed(const QModelIndex &index)
void qrealClicked(const QModelIndex &index)
void clicked(const QModelIndex &index)
void headerContextMenuRequested(const QPoint &pt)
This signal is emitted when the header has contextMenuPolicy Qt::CustomContextMenu and the widget wan...
void activated(const QModelIndex &index)
Class used to render gantt items in a KDGantt::GraphicsView.
This widget that consists of a QTreeView and a 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...