KGantt::GraphicsScene
#include <kganttgraphicsscene.h>
Signals | |
void | clicked (const QModelIndex &index) |
void | entered (const QModelIndex &index) |
void | gridChanged () |
void | pressed (const QModelIndex &index) |
void | qrealClicked (const QModelIndex &index) |
Public Slots | |
void | setConstraintModel (KGantt::ConstraintModel *) |
void | setModel (QAbstractItemModel *) |
void | setReadOnly (bool) |
void | setRootIndex (const QModelIndex &idx) |
void | setSelectionModel (QItemSelectionModel *selectionmodel) |
void | setSummaryHandlingModel (QAbstractProxyModel *) |
Additional Inherited Members | |
Public Types inherited from QGraphicsScene | |
enum | ItemIndexMethod |
enum | SceneLayer |
Properties inherited from QGraphicsScene | |
backgroundBrush | |
bspTreeDepth | |
focusOnTouch | |
font | |
foregroundBrush | |
itemIndexMethod | |
minimumRenderSize | |
palette | |
sceneRect | |
stickyFocus | |
Properties inherited from QObject | |
objectName | |
Public Attributes inherited from QGraphicsScene | |
AllLayers | |
BackgroundLayer | |
BspTreeIndex | |
ForegroundLayer | |
ItemLayer | |
NoIndex | |
typedef | SceneLayers |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Detailed Description
Definition at line 43 of file kganttgraphicsscene.h.
Constructor & Destructor Documentation
◆ GraphicsScene()
Definition at line 192 of file kganttgraphicsscene.cpp.
◆ ~GraphicsScene()
|
override |
Definition at line 198 of file kganttgraphicsscene.cpp.
Member Function Documentation
◆ clearItems()
void GraphicsScene::clearItems | ( | ) |
Definition at line 554 of file kganttgraphicsscene.cpp.
◆ constraintModel()
ConstraintModel * GraphicsScene::constraintModel | ( | ) | const |
Definition at line 264 of file kganttgraphicsscene.cpp.
◆ createItem()
GraphicsItem * GraphicsScene::createItem | ( | ItemType | type | ) | const |
Creates a new item of type type.
Definition at line 395 of file kganttgraphicsscene.cpp.
◆ dataIndex()
|
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 380 of file kganttgraphicsscene.cpp.
◆ deleteSubtree()
void GraphicsScene::deleteSubtree | ( | const QModelIndex & | _idx | ) |
Definition at line 570 of file kganttgraphicsscene.cpp.
◆ dragSource()
GraphicsItem * GraphicsScene::dragSource | ( | ) | const |
Definition at line 717 of file kganttgraphicsscene.cpp.
◆ drawBackground()
|
overrideprotectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 646 of file kganttgraphicsscene.cpp.
◆ drawForeground()
|
overrideprotectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 678 of file kganttgraphicsscene.cpp.
◆ findConstraintItem()
ConstraintGraphicsItem * GraphicsScene::findConstraintItem | ( | const Constraint & | c | ) | const |
Definition at line 586 of file kganttgraphicsscene.cpp.
◆ findItem() [1/2]
GraphicsItem * GraphicsScene::findItem | ( | const QModelIndex & | idx | ) | const |
Definition at line 538 of file kganttgraphicsscene.cpp.
◆ findItem() [2/2]
GraphicsItem * GraphicsScene::findItem | ( | const QPersistentModelIndex & | idx | ) | const |
Definition at line 546 of file kganttgraphicsscene.cpp.
◆ getGrid()
const AbstractGrid * GraphicsScene::getGrid | ( | ) | const |
- Returns
- the current grid.
Definition at line 346 of file kganttgraphicsscene.cpp.
◆ grid()
AbstractGrid * GraphicsScene::grid | ( | ) | const |
- Returns
- the grid set with setGrid(). Note: Returns nullptr if no grid has been set.
Definition at line 340 of file kganttgraphicsscene.cpp.
◆ helpEvent()
|
overrideprotectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 632 of file kganttgraphicsscene.cpp.
◆ insertItem()
void GraphicsScene::insertItem | ( | const QPersistentModelIndex & | idx, |
GraphicsItem * | item ) |
Definition at line 478 of file kganttgraphicsscene.cpp.
◆ isReadOnly()
bool GraphicsScene::isReadOnly | ( | ) | const |
Definition at line 356 of file kganttgraphicsscene.cpp.
◆ itemClicked()
void GraphicsScene::itemClicked | ( | const QModelIndex & | idx | ) |
Definition at line 702 of file kganttgraphicsscene.cpp.
◆ itemDelegate()
ItemDelegate * GraphicsScene::itemDelegate | ( | ) | const |
Definition at line 224 of file kganttgraphicsscene.cpp.
◆ itemDoubleClicked()
void GraphicsScene::itemDoubleClicked | ( | const QModelIndex & | idx | ) |
Definition at line 707 of file kganttgraphicsscene.cpp.
◆ itemEntered()
void GraphicsScene::itemEntered | ( | const QModelIndex & | idx | ) |
Definition at line 683 of file kganttgraphicsscene.cpp.
◆ itemPressed()
void GraphicsScene::itemPressed | ( | const QModelIndex & | idx, |
QGraphicsSceneMouseEvent * | event ) |
Definition at line 688 of file kganttgraphicsscene.cpp.
◆ mainIndex()
|
static |
Definition at line 366 of file kganttgraphicsscene.cpp.
◆ model()
QAbstractItemModel * GraphicsScene::model | ( | ) | const |
Definition at line 229 of file kganttgraphicsscene.cpp.
◆ print() [1/4]
void GraphicsScene::print | ( | QPainter * | painter, |
const QRectF & | target = 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 755 of file kganttgraphicsscene.cpp.
◆ print() [2/4]
void GraphicsScene::print | ( | QPainter * | painter, |
qreal | start, | ||
qreal | end, | ||
const QRectF & | target = 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 766 of file kganttgraphicsscene.cpp.
◆ print() [3/4]
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 723 of file kganttgraphicsscene.cpp.
◆ print() [4/4]
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 738 of file kganttgraphicsscene.cpp.
◆ printDiagram()
void GraphicsScene::printDiagram | ( | QPrinter * | printer, |
const PrintingContext & | context ) |
Print the Gantt chart on the printer in accordance with the PrintingContext context
- See also
- PrintingContext
- Since
- 2.8.0
Definition at line 777 of file kganttgraphicsscene.cpp.
◆ removeItem()
void GraphicsScene::removeItem | ( | const QModelIndex & | idx | ) |
Definition at line 513 of file kganttgraphicsscene.cpp.
◆ rootIndex()
QModelIndex GraphicsScene::rootIndex | ( | ) | const |
Definition at line 259 of file kganttgraphicsscene.cpp.
◆ rowController()
AbstractRowController * GraphicsScene::rowController | ( | ) | const |
Definition at line 308 of file kganttgraphicsscene.cpp.
◆ selectionModel()
QItemSelectionModel * GraphicsScene::selectionModel | ( | ) | const |
Definition at line 298 of file kganttgraphicsscene.cpp.
◆ setConstraintModel
|
slot |
Definition at line 269 of file kganttgraphicsscene.cpp.
◆ setDragSource()
void GraphicsScene::setDragSource | ( | GraphicsItem * | item | ) |
Definition at line 712 of file kganttgraphicsscene.cpp.
◆ setGrid()
void GraphicsScene::setGrid | ( | AbstractGrid * | grid | ) |
Set the grid to grid
.
The current grid (if set) is deleted. If grid
is nullptr, the scene reverts to use the default_grid
Definition at line 325 of file kganttgraphicsscene.cpp.
◆ setItemDelegate()
void GraphicsScene::setItemDelegate | ( | ItemDelegate * | delegate | ) |
Definition at line 217 of file kganttgraphicsscene.cpp.
◆ setModel
|
slot |
Definition at line 235 of file kganttgraphicsscene.cpp.
◆ setReadOnly
|
slot |
Definition at line 351 of file kganttgraphicsscene.cpp.
◆ setRootIndex
|
slot |
Definition at line 254 of file kganttgraphicsscene.cpp.
◆ setRowController()
void GraphicsScene::setRowController | ( | AbstractRowController * | rc | ) |
Definition at line 303 of file kganttgraphicsscene.cpp.
◆ setSelectionModel
|
slot |
Definition at line 284 of file kganttgraphicsscene.cpp.
◆ setSummaryHandlingModel
|
slot |
Definition at line 248 of file kganttgraphicsscene.cpp.
◆ summaryHandlingModel()
QAbstractProxyModel * GraphicsScene::summaryHandlingModel | ( | ) | const |
Definition at line 243 of file kganttgraphicsscene.cpp.
◆ takeGrid()
AbstractGrid * GraphicsScene::takeGrid | ( | ) |
- Returns
- the grid set with setGrid() Note: Returns nullptr if no grid has been set. The scene reverts to use the default_grid.
Definition at line 313 of file kganttgraphicsscene.cpp.
◆ updateItems()
void GraphicsScene::updateItems | ( | ) |
Definition at line 559 of file kganttgraphicsscene.cpp.
◆ updateRow()
void GraphicsScene::updateRow | ( | const QModelIndex & | idx | ) |
Definition at line 428 of file kganttgraphicsscene.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:21 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.