23 #ifndef KDGANTTGRAPHICSVIEW_H
24 #define KDGANTTGRAPHICSVIEW_H
26 #include <QGraphicsView>
33 class QAbstractItemModel;
35 class QItemSelectionModel;
49 Q_PROPERTY(
bool readOnly READ isReadOnly WRITE setReadOnly )
51 Q_PRIVATE_SLOT(
d,
void slotGridChanged() )
52 Q_PRIVATE_SLOT(
d,
void slotHorizontalScrollValueChanged(
int ) )
53 Q_PRIVATE_SLOT(
d,
void slotHeaderContextMenuRequested(
const QPoint& ) )
55 Q_PRIVATE_SLOT(
d,
void slotColumnsInserted(
const QModelIndex& parent,
int start,
int end ) )
56 Q_PRIVATE_SLOT(
d,
void slotColumnsRemoved(
const QModelIndex& parent,
int start,
int end ) )
57 Q_PRIVATE_SLOT(
d,
void slotDataChanged(
const QModelIndex& topLeft,
const QModelIndex& bottomRight ) )
58 Q_PRIVATE_SLOT(
d,
void slotLayoutChanged() )
59 Q_PRIVATE_SLOT(
d,
void slotModelReset() )
60 Q_PRIVATE_SLOT(
d,
void slotRowsInserted(
const QModelIndex& parent,
int start,
int end ) )
61 Q_PRIVATE_SLOT(
d,
void slotRowsAboutToBeRemoved(
const QModelIndex& parent,
int start,
int end ) )
62 Q_PRIVATE_SLOT(
d,
void slotRowsRemoved(
const QModelIndex& parent,
int start,
int end ) )
64 Q_PRIVATE_SLOT(
d,
void slotItemClicked(
const QModelIndex& idx ) )
65 Q_PRIVATE_SLOT(
d,
void slotItemDoubleClicked(
const QModelIndex& idx ) )
71 QAbstractItemModel* model()
const;
74 QModelIndex rootIndex()
const;
75 QItemSelectionModel* selectionModel()
const;
77 AbstractGrid* grid()
const;
80 bool isReadOnly()
const;
82 void setHeaderContextMenuPolicy( Qt::ContextMenuPolicy );
83 Qt::ContextMenuPolicy headerContextMenuPolicy()
const;
85 QModelIndex indexAt(
const QPoint& pos )
const;
87 virtual void addConstraint(
const QModelIndex& from,
88 const QModelIndex& to,
89 Qt::KeyboardModifiers modifiers );
92 void updateRow(
const QModelIndex& );
96 void updateSceneRect();
99 void deleteSubtree(
const QModelIndex& );
101 void print( QPrinter* printer,
bool drawRowLabels =
true,
bool drawColumnLabels =
true );
102 void print( QPrinter* printer, qreal start, qreal end,
bool drawRowLabels =
true,
bool drawColumnLabels =
true );
103 void print( QPainter* painter,
const QRectF& target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true );
104 void print( QPainter* painter, qreal start, qreal end,
105 const QRectF& target = QRectF(),
bool drawRowLabels =
true,
bool drawColumnLabels =
true );
108 void setModel( QAbstractItemModel* );
111 void setRootIndex(
const QModelIndex& );
112 void setSelectionModel( QItemSelectionModel* );
114 void setGrid( AbstractGrid* );
116 void setReadOnly(
bool );
127 void resizeEvent( QResizeEvent* )
override;