KD Chart API Documentation 3.1
|
#include <kdganttgraphicsscene.h>
Signals | |
void | clicked (const QModelIndex &index) |
void | entered (const QModelIndex &index) |
void | gridChanged () |
void | pressed (const QModelIndex &index) |
void | qrealClicked (const QModelIndex &index) |
Additional Inherited Members | |
Public Types inherited from QGraphicsScene | |
enum | ItemIndexMethod |
enum | SceneLayer |
Public Attributes inherited from QGraphicsScene | |
AllLayers | |
BackgroundLayer | |
BspTreeIndex | |
ForegroundLayer | |
ItemLayer | |
NoIndex | |
typedef | SceneLayers |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Properties inherited from QGraphicsScene | |
backgroundBrush | |
bspTreeDepth | |
focusOnTouch | |
font | |
foregroundBrush | |
itemIndexMethod | |
minimumRenderSize | |
palette | |
sceneRect | |
sortCacheEnabled | |
stickyFocus | |
Properties inherited from QObject | |
objectName | |
Definition at line 36 of file kdganttgraphicsscene.h.
Definition at line 146 of file kdganttgraphicsscene.cpp.
|
override |
Definition at line 153 of file kdganttgraphicsscene.cpp.
References clearConstraintItems(), QGraphicsScene::items(), and QObject::qobject_cast().
void GraphicsScene::clearConstraintItems | ( | ) |
Definition at line 548 of file kdganttgraphicsscene.cpp.
Referenced by ~GraphicsScene().
void GraphicsScene::clearItems | ( | ) |
Definition at line 499 of file kdganttgraphicsscene.cpp.
References d, QGraphicsScene::items(), and QObject::qobject_cast().
|
signal |
Referenced by KDGantt::GraphicsView::GraphicsView(), and itemClicked().
ConstraintModel * GraphicsScene::constraintModel | ( | ) | const |
Definition at line 221 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 331 of file kdganttgraphicsscene.cpp.
References QObject::qobject_cast(), 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 313 of file kdganttgraphicsscene.cpp.
References QAbstractItemModel::columnCount(), QAbstractItemModel::index(), model(), and QObject::qobject_cast().
Referenced by deleteSubtree().
void GraphicsScene::deleteSubtree | ( | const QModelIndex & | _idx | ) |
Definition at line 523 of file kdganttgraphicsscene.cpp.
References dataIndex(), deleteSubtree(), QObject::parent(), QObject::qobject_cast(), removeItem(), QAbstractItemModel::rowCount(), and summaryHandlingModel().
Referenced by deleteSubtree(), and KDGantt::GraphicsView::deleteSubtree().
GraphicsItem * GraphicsScene::dragSource | ( | ) | const |
Definition at line 647 of file kdganttgraphicsscene.cpp.
References d.
|
overrideprotectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 585 of file kdganttgraphicsscene.cpp.
References Qt::AlignCenter, QStyle::CE_Header, d, QStyle::drawControl(), QRectF::intersected(), QObject::qobject_cast(), QGraphicsScene::sceneRect, and QGraphicsScene::style().
|
overrideprotectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 617 of file kdganttgraphicsscene.cpp.
References d.
|
signal |
Referenced by KDGantt::GraphicsView::GraphicsView(), and itemEntered().
ConstraintGraphicsItem * GraphicsScene::findConstraintItem | ( | const Constraint & | c | ) | const |
Definition at line 543 of file kdganttgraphicsscene.cpp.
References d.
GraphicsItem * GraphicsScene::findItem | ( | const QModelIndex & | idx | ) | const |
Definition at line 481 of file kdganttgraphicsscene.cpp.
References d, QObject::qobject_cast(), and summaryHandlingModel().
Referenced by updateRow().
GraphicsItem * GraphicsScene::findItem | ( | const QPersistentModelIndex & | idx | ) | const |
Definition at line 490 of file kdganttgraphicsscene.cpp.
References d, QObject::qobject_cast(), and summaryHandlingModel().
AbstractGrid * GraphicsScene::grid | ( | ) | const |
Definition at line 276 of file kdganttgraphicsscene.cpp.
References d.
Referenced by setGrid(), and KDGantt::GraphicsItem::updateItem().
|
signal |
Referenced by KDGantt::GraphicsView::GraphicsView().
|
overrideprotectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 571 of file kdganttgraphicsscene.cpp.
References QGraphicsScene::helpEvent(), helpEvent(), QGraphicsScene::itemAt(), QObject::qobject_cast(), and QToolTip::showText().
Referenced by helpEvent().
void GraphicsScene::insertItem | ( | const QPersistentModelIndex & | idx, |
GraphicsItem * | item | ||
) |
Definition at line 416 of file kdganttgraphicsscene.cpp.
References KDGantt::GraphicsItem::addEndConstraint(), QGraphicsScene::addItem(), KDGantt::GraphicsItem::addStartConstraint(), d, KDGantt::Constraint::endIndex(), QAbstractProxyModel::mapFromSource(), QAbstractProxyModel::mapToSource(), QObject::qobject_cast(), KDGantt::Constraint::startIndex(), and summaryHandlingModel().
Referenced by updateRow().
bool GraphicsScene::isReadOnly | ( | ) | const |
Definition at line 286 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::isEditable().
void GraphicsScene::itemClicked | ( | const QModelIndex & | idx | ) |
Definition at line 632 of file kdganttgraphicsscene.cpp.
References clicked(), QObject::Q_EMIT(), and QObject::qobject_cast().
Referenced by KDGantt::GraphicsItem::mouseReleaseEvent().
ItemDelegate * GraphicsScene::itemDelegate | ( | ) | const |
Definition at line 181 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 637 of file kdganttgraphicsscene.cpp.
References QObject::Q_EMIT(), QObject::qobject_cast(), and qrealClicked().
Referenced by KDGantt::GraphicsItem::mouseDoubleClickEvent().
void GraphicsScene::itemEntered | ( | const QModelIndex & | idx | ) |
Definition at line 622 of file kdganttgraphicsscene.cpp.
References entered(), QObject::Q_EMIT(), and QObject::qobject_cast().
Referenced by KDGantt::GraphicsItem::hoverMoveEvent().
void GraphicsScene::itemPressed | ( | const QModelIndex & | idx | ) |
Definition at line 627 of file kdganttgraphicsscene.cpp.
References pressed(), QObject::Q_EMIT(), and QObject::qobject_cast().
Referenced by KDGantt::GraphicsItem::mousePressEvent().
|
static |
Definition at line 296 of file kdganttgraphicsscene.cpp.
References QAbstractItemModel::index(), QModelIndex::model(), and QObject::qobject_cast().
QAbstractItemModel * GraphicsScene::model | ( | ) | const |
Definition at line 186 of file kdganttgraphicsscene.cpp.
References d, and QObject::qobject_cast().
Referenced by dataIndex(), setGrid(), setModel(), setSummaryHandlingModel(), and updateRow().
|
signal |
Referenced by KDGantt::GraphicsView::GraphicsView(), and itemPressed().
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 704 of file kdganttgraphicsscene.cpp.
References QObject::qobject_cast(), and QGraphicsScene::sceneRect.
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 724 of file kdganttgraphicsscene.cpp.
References QObject::qobject_cast(), and QGraphicsScene::sceneRect.
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 660 of file kdganttgraphicsscene.cpp.
References QPrinter::pageLayout(), QPageLayout::paintRectPixels(), QObject::qobject_cast(), QPrinter::resolution(), and QGraphicsScene::sceneRect.
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 684 of file kdganttgraphicsscene.cpp.
References QPrinter::pageLayout(), QPageLayout::paintRectPixels(), QObject::qobject_cast(), and QPrinter::resolution().
|
signal |
Referenced by KDGantt::GraphicsView::GraphicsView(), and itemDoubleClicked().
void GraphicsScene::removeItem | ( | const QModelIndex & | idx | ) |
Definition at line 451 of file kdganttgraphicsscene.cpp.
References d, KDGantt::GraphicsItem::endConstraints(), QSet::fromList(), QObject::qobject_cast(), and KDGantt::GraphicsItem::startConstraints().
Referenced by deleteSubtree(), and updateRow().
void QGraphicsScene::removeItem | ( | QGraphicsItem * | item | ) |
QModelIndex GraphicsScene::rootIndex | ( | ) | const |
Definition at line 216 of file kdganttgraphicsscene.cpp.
References d.
AbstractRowController * GraphicsScene::rowController | ( | ) | const |
Definition at line 256 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::updateItem(), and updateRow().
QItemSelectionModel * GraphicsScene::selectionModel | ( | ) | const |
Definition at line 246 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::focusInEvent(), KDGantt::GraphicsItem::itemChange(), and KDGantt::GraphicsItem::mouseMoveEvent().
|
slot |
Definition at line 226 of file kdganttgraphicsscene.cpp.
References QObject::connect(), KDGantt::ConstraintModel::constraintAdded(), KDGantt::ConstraintModel::constraintRemoved(), d, QObject::disconnect(), and QObject::qobject_cast().
void GraphicsScene::setDragSource | ( | GraphicsItem * | item | ) |
Definition at line 642 of file kdganttgraphicsscene.cpp.
References d.
Referenced by KDGantt::GraphicsItem::mouseMoveEvent(), and KDGantt::GraphicsItem::mouseReleaseEvent().
void GraphicsScene::setGrid | ( | AbstractGrid * | grid | ) |
Definition at line 261 of file kdganttgraphicsscene.cpp.
References QObject::connect(), d, QObject::disconnect(), grid(), KDGantt::AbstractGrid::gridChanged(), and model().
void GraphicsScene::setItemDelegate | ( | ItemDelegate * | delegate | ) |
Definition at line 173 of file kdganttgraphicsscene.cpp.
References d, QObject::qobject_cast(), and QGraphicsScene::update().
|
slot |
Definition at line 192 of file kdganttgraphicsscene.cpp.
References d, model(), QObject::qobject_cast(), and setSelectionModel().
Definition at line 281 of file kdganttgraphicsscene.cpp.
References d, and QObject::qobject_cast().
|
slot |
Definition at line 211 of file kdganttgraphicsscene.cpp.
References d, and QObject::qobject_cast().
void GraphicsScene::setRowController | ( | AbstractRowController * | rc | ) |
Definition at line 251 of file kdganttgraphicsscene.cpp.
References d, and QObject::qobject_cast().
|
slot |
Definition at line 240 of file kdganttgraphicsscene.cpp.
References d, and QObject::qobject_cast().
Referenced by setModel().
|
slot |
Definition at line 205 of file kdganttgraphicsscene.cpp.
References d, model(), and QAbstractProxyModel::setSourceModel().
QAbstractProxyModel * GraphicsScene::summaryHandlingModel | ( | ) | const |
Definition at line 200 of file kdganttgraphicsscene.cpp.
References d.
Referenced by deleteSubtree(), findItem(), findItem(), insertItem(), and updateRow().
void GraphicsScene::updateItems | ( | ) |
Definition at line 512 of file kdganttgraphicsscene.cpp.
References QGraphicsScene::BackgroundLayer, d, QRectF::height(), QGraphicsScene::invalidate(), QGraphicsItem::pos(), QObject::qobject_cast(), KDGantt::GraphicsItem::rect(), KDGantt::GraphicsItem::updateItem(), and QPointF::y().
void GraphicsScene::updateRow | ( | const QModelIndex & | idx | ) |
Definition at line 365 of file kdganttgraphicsscene.cpp.
References QObject::blockSignals(), QAbstractItemModel::columnCount(), createItem(), d, QAbstractProxyModel::data(), findItem(), QAbstractItemModel::index(), insertItem(), KDGantt::AbstractRowController::isRowExpanded(), QModelIndex::isValid(), KDGantt::ItemTypeRole, QAbstractProxyModel::mapToSource(), model(), QObject::qobject_cast(), removeItem(), rowController(), KDGantt::AbstractRowController::rowGeometry(), KDGantt::GraphicsItem::setIndex(), summaryHandlingModel(), QVariant::toInt(), KDGantt::TypeMulti, KDGantt::TypeNone, and KDGantt::GraphicsItem::updateItem().