KD Chart 2
[rev.2.5.1]
|
#include <kdganttgraphicsitem.h>
Public Types | |
enum | { Type = UserType + 42 } |
Public Member Functions | |
void | addEndConstraint (ConstraintGraphicsItem *) |
void | addStartConstraint (ConstraintGraphicsItem *) |
QRectF | boundingRect () const |
QList< ConstraintGraphicsItem * > | endConstraints () const |
virtual QString | ganttToolTip () const |
GraphicsItem (QGraphicsItem *parent=0, GraphicsScene *scene=0) | |
GraphicsItem (const QModelIndex &idx, QGraphicsItem *parent=0, GraphicsScene *scene=0) | |
const QPersistentModelIndex & | index () const |
bool | isEditable () const |
bool | isUpdating () const |
QVariant | itemChange (GraphicsItemChange, const QVariant &value) |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
QRectF | rect () const |
void | removeEndConstraint (ConstraintGraphicsItem *) |
void | removeStartConstraint (ConstraintGraphicsItem *) |
GraphicsScene * | scene () const |
void | setBoundingRect (const QRectF &r) |
void | setIndex (const QPersistentModelIndex &idx) |
void | setRect (const QRectF &r) |
QList< ConstraintGraphicsItem * > | startConstraints () const |
int | type () const |
void | updateItem (const Span &rowgeometry, const QPersistentModelIndex &idx) |
virtual | ~GraphicsItem () |
Protected Member Functions | |
void | focusInEvent (QFocusEvent *event) |
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *) |
void | hoverMoveEvent (QGraphicsSceneHoverEvent *) |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *) |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *) |
void | mousePressEvent (QGraphicsSceneMouseEvent *) |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *) |
Definition at line 42 of file kdganttgraphicsitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 44 of file kdganttgraphicsitem.h.
|
explicit |
Definition at line 69 of file kdganttgraphicsitem.cpp.
|
explicit |
Definition at line 75 of file kdganttgraphicsitem.cpp.
|
virtual |
Definition at line 101 of file kdganttgraphicsitem.cpp.
void GraphicsItem::addEndConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 264 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::setEnd().
Referenced by KDGantt::GraphicsScene::insertItem().
void GraphicsItem::addStartConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 256 of file kdganttgraphicsitem.cpp.
References KDGantt::ConstraintGraphicsItem::setStart().
Referenced by KDGantt::GraphicsScene::insertItem().
QRectF GraphicsItem::boundingRect | ( | ) | const |
Definition at line 218 of file kdganttgraphicsitem.cpp.
Referenced by mouseReleaseEvent(), and paint().
QList<ConstraintGraphicsItem*> KDGantt::GraphicsItem::endConstraints | ( | ) | const |
Definition at line 77 of file kdganttgraphicsitem.h.
Referenced by KDGantt::GraphicsScene::removeItem().
|
protected |
Definition at line 363 of file kdganttgraphicsitem.cpp.
References index(), scene(), and KDGantt::GraphicsScene::selectionModel().
|
virtual |
Definition at line 213 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::GraphicsScene::itemDelegate(), scene(), and KDGantt::ItemDelegate::toolTip().
|
protected |
Definition at line 430 of file kdganttgraphicsitem.cpp.
|
protected |
Definition at line 398 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::ItemDelegate::interactionStateFor(), isEditable(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemEntered(), scene(), KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, and KDGantt::ItemDelegate::State_Move.
const QPersistentModelIndex& KDGantt::GraphicsItem::index | ( | ) | const |
Definition at line 66 of file kdganttgraphicsitem.h.
Referenced by focusInEvent(), ganttToolTip(), hoverMoveEvent(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paint(), and updateItem().
bool GraphicsItem::isEditable | ( | ) | const |
Definition at line 190 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsScene::isReadOnly(), and scene().
Referenced by hoverMoveEvent(), itemChange(), mouseMoveEvent(), and mouseReleaseEvent().
bool KDGantt::GraphicsItem::isUpdating | ( | ) | const |
Definition at line 70 of file kdganttgraphicsitem.h.
Referenced by itemChange().
QVariant GraphicsItem::itemChange | ( | GraphicsItemChange | change, |
const QVariant & | value | ||
) |
Definition at line 337 of file kdganttgraphicsitem.cpp.
References index(), isEditable(), isUpdating(), scene(), and KDGantt::GraphicsScene::selectionModel().
|
protected |
Definition at line 523 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::ItemDelegate::interactionStateFor(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemDoubleClicked(), KDGantt::ItemTypeRole, scene(), KDGantt::ItemDelegate::State_None, and KDGantt::TypeSummary.
|
protected |
Definition at line 565 of file kdganttgraphicsitem.cpp.
References index(), isEditable(), rect(), scene(), KDGantt::GraphicsScene::selectionModel(), KDGantt::GraphicsScene::setDragSource(), KDGantt::ItemDelegate::State_DragConstraint, KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, and KDGantt::ItemDelegate::State_Move.
|
protected |
Definition at line 437 of file kdganttgraphicsitem.cpp.
References index(), KDGantt::ItemDelegate::interactionStateFor(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::GraphicsScene::itemPressed(), scene(), KDGantt::ItemDelegate::State_ExtendLeft, KDGantt::ItemDelegate::State_ExtendRight, and KDGantt::ItemDelegate::State_None.
|
protected |
Definition at line 463 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsView::addConstraint(), boundingRect(), KDGantt::GraphicsScene::dragSource(), index(), isEditable(), KDGantt::GraphicsScene::itemClicked(), KDGantt::ItemTypeRole, rect(), scene(), KDGantt::GraphicsScene::setDragSource(), and KDGantt::TypeEvent.
void GraphicsItem::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget = 0 |
||
) |
Definition at line 195 of file kdganttgraphicsitem.cpp.
References boundingRect(), index(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::ItemDelegate::paintGanttItem(), and scene().
QRectF KDGantt::GraphicsItem::rect | ( | ) | const |
Definition at line 60 of file kdganttgraphicsitem.h.
Referenced by mouseMoveEvent(), mouseReleaseEvent(), updateItem(), and KDGantt::GraphicsScene::updateItems().
void GraphicsItem::removeEndConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 279 of file kdganttgraphicsitem.cpp.
void GraphicsItem::removeStartConstraint | ( | ConstraintGraphicsItem * | item | ) |
Definition at line 272 of file kdganttgraphicsitem.cpp.
GraphicsScene * GraphicsItem::scene | ( | ) | const |
Definition at line 163 of file kdganttgraphicsitem.cpp.
Referenced by focusInEvent(), ganttToolTip(), hoverMoveEvent(), isEditable(), itemChange(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paint(), and updateItem().
void GraphicsItem::setBoundingRect | ( | const QRectF & | r | ) |
Definition at line 183 of file kdganttgraphicsitem.cpp.
Referenced by updateItem().
void GraphicsItem::setIndex | ( | const QPersistentModelIndex & | idx | ) |
Definition at line 207 of file kdganttgraphicsitem.cpp.
Referenced by updateItem(), and KDGantt::GraphicsScene::updateRow().
void GraphicsItem::setRect | ( | const QRectF & | r | ) |
Definition at line 168 of file kdganttgraphicsitem.cpp.
Referenced by updateItem().
QList<ConstraintGraphicsItem*> KDGantt::GraphicsItem::startConstraints | ( | ) | const |
Definition at line 76 of file kdganttgraphicsitem.h.
Referenced by KDGantt::GraphicsScene::removeItem().
int GraphicsItem::type | ( | ) | const |
Definition at line 121 of file kdganttgraphicsitem.cpp.
References Type.
void GraphicsItem::updateItem | ( | const Span & | rowgeometry, |
const QPersistentModelIndex & | idx | ||
) |
Definition at line 300 of file kdganttgraphicsitem.cpp.
References KDGantt::GraphicsScene::grid(), index(), KDGantt::ItemDelegate::itemBoundingSpan(), KDGantt::GraphicsScene::itemDelegate(), KDGantt::ItemTypeRole, KDGantt::Span::length(), KDGantt::AbstractRowController::maximumItemHeight(), rect(), KDGantt::GraphicsScene::rowController(), scene(), setBoundingRect(), setIndex(), setRect(), KDGantt::Span::start(), and KDGantt::TypeMulti.
Referenced by KDGantt::GraphicsScene::updateItems(), and KDGantt::GraphicsScene::updateRow().