KD Chart 2
[rev.2.5.1]
|
#include <kdganttgraphicsscene.h>
Public Slots | |
void | setConstraintModel (ConstraintModel *) |
void | setModel (QAbstractItemModel *) |
void | setReadOnly (bool) |
void | setRootIndex (const QModelIndex &idx) |
void | setSelectionModel (QItemSelectionModel *selectionmodel) |
void | setSummaryHandlingModel (QAbstractProxyModel *) |
Signals | |
void | clicked (const QModelIndex &index) |
void | entered (const QModelIndex &index) |
void | gridChanged () |
void | pressed (const QModelIndex &index) |
void | qrealClicked (const QModelIndex &index) |
Public Member Functions | |
void | clearConstraintItems () |
void | clearItems () |
ConstraintModel * | constraintModel () const |
GraphicsItem * | createItem (ItemType type) const |
void | deleteSubtree (const QModelIndex &) |
GraphicsItem * | dragSource () const |
ConstraintGraphicsItem * | findConstraintItem (const Constraint &) const |
QList< ConstraintGraphicsItem * > | findConstraintItems (const QModelIndex &idx) const |
GraphicsItem * | findItem (const QModelIndex &) const |
GraphicsItem * | findItem (const QPersistentModelIndex &) const |
GraphicsScene (QObject *parent=0) | |
AbstractGrid * | grid () const |
void | insertItem (const QPersistentModelIndex &, GraphicsItem *) |
bool | isReadOnly () const |
void | itemClicked (const QModelIndex &) |
ItemDelegate * | itemDelegate () const |
void | itemDoubleClicked (const QModelIndex &) |
void | itemEntered (const QModelIndex &) |
void | itemPressed (const QModelIndex &) |
QAbstractItemModel * | model () const |
void | print (QPrinter *printer, bool drawRowLabels=true, bool drawColumnLabels=true) |
void | print (QPrinter *printer, qreal start, qreal end, bool drawRowLabels=true, bool drawColumnLabels=true) |
void | print (QPainter *painter, const QRectF &target=QRectF(), bool drawRowLabels=true, bool drawColumnLabels=true) |
void | print (QPainter *painter, qreal start, qreal end, const QRectF &target=QRectF(), bool drawRowLabels=true, bool drawColumnLabels=true) |
void | removeItem (const QModelIndex &) |
QModelIndex | rootIndex () const |
AbstractRowController * | rowController () const |
QItemSelectionModel * | selectionModel () const |
void | setDragSource (GraphicsItem *item) |
void | setGrid (AbstractGrid *grid) |
void | setItemDelegate (ItemDelegate *) |
void | setRowController (AbstractRowController *rc) |
QAbstractProxyModel * | summaryHandlingModel () const |
void | updateItems () |
void | updateRow (const QModelIndex &idx) |
virtual | ~GraphicsScene () |
Static Public Member Functions | |
static QModelIndex | dataIndex (const QModelIndex &idx) |
static QModelIndex | mainIndex (const QModelIndex &idx) |
Protected Member Functions | |
void | drawBackground (QPainter *painter, const QRectF &rect) |
void | drawForeground (QPainter *painter, const QRectF &rect) |
void | helpEvent (QGraphicsSceneHelpEvent *helpEvent) |
Definition at line 48 of file kdganttgraphicsscene.h.
|
explicit |
Definition at line 162 of file kdganttgraphicsscene.cpp.
|
virtual |
Definition at line 168 of file kdganttgraphicsscene.cpp.
References clearConstraintItems().
void GraphicsScene::clearConstraintItems | ( | ) |
Definition at line 540 of file kdganttgraphicsscene.cpp.
Referenced by ~GraphicsScene().
void GraphicsScene::clearItems | ( | ) |
Definition at line 498 of file kdganttgraphicsscene.cpp.
References d.
|
signal |
Referenced by itemClicked().
ConstraintModel * GraphicsScene::constraintModel | ( | ) | const |
Definition at line 235 of file kdganttgraphicsscene.cpp.
References d.
GraphicsItem * GraphicsScene::createItem | ( | ItemType | type | ) | const |
Creates a new item of type type. TODO: If the user should be allowed to override this in any way, it needs to be in View!
Definition at line 344 of file kdganttgraphicsscene.cpp.
References KDGantt::TypeEvent, KDGantt::TypeSummary, and KDGantt::TypeTask.
Referenced by updateRow().
|
static |
Returns the index pointing to the last column in the same row as idx. This can be thought of as in "inverse" of mainIndex()
Definition at line 326 of file kdganttgraphicsscene.cpp.
References model().
Referenced by deleteSubtree().
void GraphicsScene::deleteSubtree | ( | const QModelIndex & | _idx | ) |
Definition at line 519 of file kdganttgraphicsscene.cpp.
References dataIndex(), removeItem(), and summaryHandlingModel().
GraphicsItem * GraphicsScene::dragSource | ( | ) | const |
Definition at line 643 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::mouseReleaseEvent().
|
protected |
Definition at line 577 of file kdganttgraphicsscene.cpp.
References d.
|
protected |
Definition at line 613 of file kdganttgraphicsscene.cpp.
References d.
|
signal |
Referenced by itemEntered().
ConstraintGraphicsItem * GraphicsScene::findConstraintItem | ( | const Constraint & | c | ) | const |
Definition at line 535 of file kdganttgraphicsscene.cpp.
References d.
QList<ConstraintGraphicsItem*> KDGantt::GraphicsScene::findConstraintItems | ( | const QModelIndex & | idx | ) | const |
GraphicsItem * GraphicsScene::findItem | ( | const QModelIndex & | idx | ) | const |
Definition at line 482 of file kdganttgraphicsscene.cpp.
References d, and summaryHandlingModel().
Referenced by KDGantt::View::ensureVisible(), and updateRow().
GraphicsItem * GraphicsScene::findItem | ( | const QPersistentModelIndex & | idx | ) | const |
Definition at line 490 of file kdganttgraphicsscene.cpp.
References d, and summaryHandlingModel().
AbstractGrid * GraphicsScene::grid | ( | ) | const |
Definition at line 289 of file kdganttgraphicsscene.cpp.
References d.
Referenced by setGrid(), and KDGantt::GraphicsItem::updateItem().
|
signal |
Referenced by setGrid().
|
protected |
Definition at line 563 of file kdganttgraphicsscene.cpp.
References KDGantt::ConstraintGraphicsItem::ganttToolTip().
void GraphicsScene::insertItem | ( | const QPersistentModelIndex & | idx, |
GraphicsItem * | item | ||
) |
Definition at line 426 of file kdganttgraphicsscene.cpp.
References KDGantt::GraphicsItem::addEndConstraint(), KDGantt::GraphicsItem::addStartConstraint(), d, KDGantt::Constraint::endIndex(), KDGantt::Constraint::startIndex(), and summaryHandlingModel().
Referenced by updateRow().
bool GraphicsScene::isReadOnly | ( | ) | const |
Definition at line 299 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::isEditable().
void GraphicsScene::itemClicked | ( | const QModelIndex & | idx | ) |
Definition at line 628 of file kdganttgraphicsscene.cpp.
References clicked().
Referenced by KDGantt::GraphicsItem::mouseReleaseEvent().
ItemDelegate * GraphicsScene::itemDelegate | ( | ) | const |
Definition at line 195 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::ConstraintGraphicsItem::boundingRect(), KDGantt::GraphicsItem::ganttToolTip(), KDGantt::GraphicsItem::hoverMoveEvent(), KDGantt::GraphicsItem::mouseDoubleClickEvent(), KDGantt::GraphicsItem::mousePressEvent(), KDGantt::ConstraintGraphicsItem::paint(), KDGantt::GraphicsItem::paint(), and KDGantt::GraphicsItem::updateItem().
void GraphicsScene::itemDoubleClicked | ( | const QModelIndex & | idx | ) |
Definition at line 633 of file kdganttgraphicsscene.cpp.
References qrealClicked().
Referenced by KDGantt::GraphicsItem::mouseDoubleClickEvent().
void GraphicsScene::itemEntered | ( | const QModelIndex & | idx | ) |
Definition at line 618 of file kdganttgraphicsscene.cpp.
References entered().
Referenced by KDGantt::GraphicsItem::hoverMoveEvent().
void GraphicsScene::itemPressed | ( | const QModelIndex & | idx | ) |
Definition at line 623 of file kdganttgraphicsscene.cpp.
References pressed().
Referenced by KDGantt::GraphicsItem::mousePressEvent().
|
static |
Definition at line 309 of file kdganttgraphicsscene.cpp.
QAbstractItemModel * GraphicsScene::model | ( | ) | const |
Definition at line 200 of file kdganttgraphicsscene.cpp.
References d.
Referenced by dataIndex(), setGrid(), setSummaryHandlingModel(), and updateRow().
|
signal |
Referenced by itemPressed().
void GraphicsScene::print | ( | QPrinter * | printer, |
bool | drawRowLabels = true , |
||
bool | drawColumnLabels = true |
||
) |
Print the Gantt chart using printer. If drawRowLabels is true (the default), each row will have it's label printed on the left side. If drawColumnLabels is true (the default), each column will have it's label printed at the top side.
This version of print() will print multiple pages.
Definition at line 656 of file kdganttgraphicsscene.cpp.
void GraphicsScene::print | ( | QPrinter * | printer, |
qreal | start, | ||
qreal | end, | ||
bool | drawRowLabels = true , |
||
bool | drawColumnLabels = true |
||
) |
Print part of the Gantt chart from start to end using printer. If drawRowLabels is true (the default), each row will have it's label printed on the left side. If drawColumnLabels is true (the default), each column will have it's label printed at the top side.
This version of print() will print multiple pages.
To print a certain range of a chart with a DateTimeGrid, use qreal DateTimeGrid::mapFromDateTime( const QDateTime& dt) const to figure out the values for start and end.
Definition at line 680 of file kdganttgraphicsscene.cpp.
void GraphicsScene::print | ( | QPainter * | painter, |
const QRectF & | _targetRect = QRectF() , |
||
bool | drawRowLabels = true , |
||
bool | drawColumnLabels = true |
||
) |
Render the GanttView inside the rectangle target using the painter painter. If drawRowLabels is true (the default), each row will have it's label printed on the left side. If drawColumnLabels is true (the default), each column will have it's label printed at the top side.
Definition at line 700 of file kdganttgraphicsscene.cpp.
void GraphicsScene::print | ( | QPainter * | painter, |
qreal | start, | ||
qreal | end, | ||
const QRectF & | _targetRect = QRectF() , |
||
bool | drawRowLabels = true , |
||
bool | drawColumnLabels = true |
||
) |
Render the GanttView inside the rectangle target using the painter painter. If drawRowLabels is true (the default), each row will have it's label printed on the left side. If drawColumnLabels is true (the default), each column will have it's label printed at the top side.
To print a certain range of a chart with a DateTimeGrid, use qreal DateTimeGrid::mapFromDateTime( const QDateTime& dt) const to figure out the values for start and end.
Definition at line 720 of file kdganttgraphicsscene.cpp.
|
signal |
Referenced by itemDoubleClicked().
void GraphicsScene::removeItem | ( | const QModelIndex & | idx | ) |
Definition at line 459 of file kdganttgraphicsscene.cpp.
References d, KDGantt::GraphicsItem::endConstraints(), and KDGantt::GraphicsItem::startConstraints().
Referenced by deleteSubtree(), and updateRow().
QModelIndex GraphicsScene::rootIndex | ( | ) | const |
Definition at line 230 of file kdganttgraphicsscene.cpp.
References d.
AbstractRowController * GraphicsScene::rowController | ( | ) | const |
Definition at line 270 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::updateItem(), and updateRow().
QItemSelectionModel * GraphicsScene::selectionModel | ( | ) | const |
Definition at line 260 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::focusInEvent(), KDGantt::GraphicsItem::itemChange(), and KDGantt::GraphicsItem::mouseMoveEvent().
|
slot |
Definition at line 240 of file kdganttgraphicsscene.cpp.
References d.
void GraphicsScene::setDragSource | ( | GraphicsItem * | item | ) |
Definition at line 638 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::mouseMoveEvent(), and KDGantt::GraphicsItem::mouseReleaseEvent().
void GraphicsScene::setGrid | ( | AbstractGrid * | grid | ) |
Definition at line 275 of file kdganttgraphicsscene.cpp.
References d, grid(), gridChanged(), and model().
void GraphicsScene::setItemDelegate | ( | ItemDelegate * | delegate | ) |
Definition at line 188 of file kdganttgraphicsscene.cpp.
References d.
|
slot |
Definition at line 206 of file kdganttgraphicsscene.cpp.
References d, and setSelectionModel().
|
slot |
Definition at line 294 of file kdganttgraphicsscene.cpp.
References d.
|
slot |
Definition at line 225 of file kdganttgraphicsscene.cpp.
References d.
void GraphicsScene::setRowController | ( | AbstractRowController * | rc | ) |
Definition at line 265 of file kdganttgraphicsscene.cpp.
References d.
|
slot |
|
slot |
Definition at line 219 of file kdganttgraphicsscene.cpp.
QAbstractProxyModel * GraphicsScene::summaryHandlingModel | ( | ) | const |
Definition at line 214 of file kdganttgraphicsscene.cpp.
References d.
Referenced by deleteSubtree(), KDGantt::View::ensureVisible(), findItem(), insertItem(), KDGantt::ConstraintGraphicsItem::proxyConstraint(), and updateRow().
void GraphicsScene::updateItems | ( | ) |
Definition at line 508 of file kdganttgraphicsscene.cpp.
References d, KDGantt::GraphicsItem::rect(), and KDGantt::GraphicsItem::updateItem().
void GraphicsScene::updateRow | ( | const QModelIndex & | idx | ) |
Definition at line 378 of file kdganttgraphicsscene.cpp.
References createItem(), d, findItem(), insertItem(), KDGantt::AbstractRowController::isRowExpanded(), KDGantt::ItemTypeRole, model(), removeItem(), rowController(), KDGantt::AbstractRowController::rowGeometry(), KDGantt::GraphicsItem::setIndex(), summaryHandlingModel(), KDGantt::TypeMulti, KDGantt::TypeNone, and KDGantt::GraphicsItem::updateItem().