23 #ifndef KDGANTTGRAPHICSVIEW_H 24 #define KDGANTTGRAPHICSVIEW_H 26 #include <QGraphicsView> 33 class QAbstractItemModel;
35 class QItemSelectionModel;
39 class AbstractRowController;
42 class ConstraintModel;
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;
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* );
116 void setReadOnly(
bool );
119 void activated( const QModelIndex & index );
120 void clicked( const QModelIndex & index );
121 void qrealClicked( const QModelIndex & index );
122 void entered( const QModelIndex & index );
123 void pressed( const QModelIndex & index );
124 void headerContextMenuRequested( const QPoint& pt );
127 void resizeEvent( QResizeEvent* ) override;
#define KDGANTT_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)
Abstract baseclass for grids. A grid is used to convert between QModelIndex'es and gantt chart values...
Class used to render gantt items in a KDGantt::GraphicsView.
Class only listed here to document inheritance of some KDChart classes.
The GraphicsView class provides a model/view implementation of a gantt chart.
This widget that consists of a QTreeView and a GraphicsView.
Abstract baseclass for row controllers. A row controller is used by the GraphicsView to nagivate the ...