15 #include <QModelIndex>
19 class QAbstractItemModel;
20 class QAbstractProxyModel;
21 class QAbstractItemView;
22 class QItemSelectionModel;
30 class ConstraintModel;
33 class AbstractRowController;
35 class KDGANTT_EXPORT
View :
public QWidget
41 explicit View(QWidget *parent =
nullptr);
44 QAbstractItemModel *model()
const;
45 QItemSelectionModel *selectionModel()
const;
49 QModelIndex rootIndex()
const;
51 QModelIndex indexAt(
const QPoint &pos)
const;
53 void setLeftView(QAbstractItemView *);
54 const QAbstractItemView *leftView()
const;
55 QAbstractItemView *leftView();
57 const QSplitter *splitter()
const;
58 QSplitter *splitter();
67 const QAbstractProxyModel *ganttProxyModel()
const;
68 QAbstractProxyModel *ganttProxyModel();
70 void ensureVisible(
const QModelIndex &index);
72 void print(QPrinter *printer,
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
73 void print(QPrinter *printer, qreal start, qreal end,
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
74 void print(QPainter *painter,
const QRectF &target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
75 void print(QPainter *painter, qreal start, qreal end,
76 const QRectF &target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true);
79 void setModel(QAbstractItemModel *model);
80 void setRootIndex(
const QModelIndex &idx);
81 void setSelectionModel(QItemSelectionModel *smodel);
85 void expandAll(QModelIndex index = QModelIndex());
86 void collapseAll(QModelIndex index = QModelIndex());
89 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.
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_QWIDGET(X)