KDGantt::GraphicsScene Class Reference

#include <kdganttgraphicsscene.h>

Inheritance diagram for KDGantt::GraphicsScene:
Inheritance graph
[legend]
Collaboration diagram for KDGantt::GraphicsScene:
Collaboration graph
[legend]

List of all members.

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 doubleClicked (const QModelIndex &index)
void entered (const QModelIndex &index)
void gridChanged ()
void pressed (const QModelIndex &index)

Public Member Functions

void clearConstraintItems ()
void clearItems ()
ConstraintModelconstraintModel () const
GraphicsItemcreateItem (ItemType type) const
void deleteSubtree (const QModelIndex &)
GraphicsItemdragSource () const
ConstraintGraphicsItemfindConstraintItem (const Constraint &) const
QList< ConstraintGraphicsItem * > findConstraintItems (const QModelIndex &idx) const
GraphicsItemfindItem (const QPersistentModelIndex &) const
GraphicsItemfindItem (const QModelIndex &) const
 GraphicsScene (QObject *parent=0)
AbstractGridgrid () const
void insertItem (const QPersistentModelIndex &, GraphicsItem *)
bool isReadOnly () const
void itemClicked (const QModelIndex &)
ItemDelegateitemDelegate () const
void itemDoubleClicked (const QModelIndex &)
void itemEntered (const QModelIndex &)
void itemPressed (const QModelIndex &)
QAbstractItemModel * model () const
void print (QPainter *painter, qreal start, qreal end, const QRectF &target=QRectF(), bool drawRowLabels=true)
void print (QPainter *painter, const QRectF &target=QRectF(), bool drawRowLabels=true)
void print (QPrinter *printer, qreal start, qreal end, bool drawRowLabels=true)
void print (QPrinter *printer, bool drawRowLabels=true)
void removeItem (const QModelIndex &)
QModelIndex rootIndex () const
AbstractRowControllerrowController () const
QItemSelectionModel * selectionModel () const
void setDragSource (GraphicsItem *item)
void setGrid (AbstractGrid *grid)
void setItemDelegate (ItemDelegate *)
void setRowController (AbstractRowController *rc)
QAbstractProxyModelsummaryHandlingModel () 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)

Detailed Description

Definition at line 46 of file kdganttgraphicsscene.h.


Constructor & Destructor Documentation

GraphicsScene::GraphicsScene ( QObject parent = 0  )  [explicit]

Definition at line 151 of file kdganttgraphicsscene.cpp.

GraphicsScene::~GraphicsScene (  )  [virtual]

Definition at line 157 of file kdganttgraphicsscene.cpp.

References clearConstraintItems(), and clearItems().


Member Function Documentation

void GraphicsScene::clearConstraintItems (  ) 

Definition at line 522 of file kdganttgraphicsscene.cpp.

Referenced by ~GraphicsScene().

void GraphicsScene::clearItems (  ) 

Definition at line 483 of file kdganttgraphicsscene.cpp.

References d.

Referenced by ~GraphicsScene().

void KDGantt::GraphicsScene::clicked ( const QModelIndex &  index  )  [signal]

Referenced by itemClicked().

ConstraintModel * GraphicsScene::constraintModel (  )  const

Definition at line 223 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 329 of file kdganttgraphicsscene.cpp.

References KDGantt::TypeEvent, KDGantt::TypeSummary, and KDGantt::TypeTask.

Referenced by updateRow().

QModelIndex GraphicsScene::dataIndex ( const QModelIndex &  idx  )  [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 311 of file kdganttgraphicsscene.cpp.

References model().

Referenced by deleteSubtree().

void GraphicsScene::deleteSubtree ( const QModelIndex &  _idx  ) 

Definition at line 501 of file kdganttgraphicsscene.cpp.

References dataIndex(), removeItem(), and summaryHandlingModel().

void KDGantt::GraphicsScene::doubleClicked ( const QModelIndex &  index  )  [signal]

Referenced by itemDoubleClicked().

GraphicsItem * GraphicsScene::dragSource (  )  const

Definition at line 621 of file kdganttgraphicsscene.cpp.

References d.

Referenced by KDGantt::GraphicsItem::mouseReleaseEvent().

void GraphicsScene::drawBackground ( QPainter *  painter,
const QRectF &  rect 
) [protected]

Definition at line 559 of file kdganttgraphicsscene.cpp.

References d.

void GraphicsScene::drawForeground ( QPainter *  painter,
const QRectF &  rect 
) [protected]

Definition at line 591 of file kdganttgraphicsscene.cpp.

References d.

void KDGantt::GraphicsScene::entered ( const QModelIndex &  index  )  [signal]

Referenced by itemEntered().

ConstraintGraphicsItem * GraphicsScene::findConstraintItem ( const Constraint c  )  const

Definition at line 517 of file kdganttgraphicsscene.cpp.

References d.

QList<ConstraintGraphicsItem*> KDGantt::GraphicsScene::findConstraintItems ( const QModelIndex &  idx  )  const
GraphicsItem * GraphicsScene::findItem ( const QPersistentModelIndex &  idx  )  const

Definition at line 475 of file kdganttgraphicsscene.cpp.

References d, and summaryHandlingModel().

GraphicsItem * GraphicsScene::findItem ( const QModelIndex &  idx  )  const

Definition at line 467 of file kdganttgraphicsscene.cpp.

References d, and summaryHandlingModel().

Referenced by KDGantt::View::ensureVisible(), and updateRow().

AbstractGrid * GraphicsScene::grid (  )  const

Definition at line 274 of file kdganttgraphicsscene.cpp.

References d.

Referenced by KDGantt::GraphicsItem::updateItem().

void KDGantt::GraphicsScene::gridChanged (  )  [signal]

Referenced by setGrid().

void GraphicsScene::helpEvent ( QGraphicsSceneHelpEvent *  helpEvent  )  [protected]
void GraphicsScene::insertItem ( const QPersistentModelIndex &  idx,
GraphicsItem item 
)
bool GraphicsScene::isReadOnly (  )  const

Definition at line 284 of file kdganttgraphicsscene.cpp.

References d.

Referenced by KDGantt::GraphicsItem::isEditable().

void GraphicsScene::itemClicked ( const QModelIndex &  idx  ) 

Definition at line 606 of file kdganttgraphicsscene.cpp.

References clicked().

Referenced by KDGantt::GraphicsItem::mouseReleaseEvent().

ItemDelegate * GraphicsScene::itemDelegate (  )  const
void GraphicsScene::itemDoubleClicked ( const QModelIndex &  idx  ) 

Definition at line 611 of file kdganttgraphicsscene.cpp.

References doubleClicked().

Referenced by KDGantt::GraphicsItem::mouseDoubleClickEvent().

void GraphicsScene::itemEntered ( const QModelIndex &  idx  ) 

Definition at line 596 of file kdganttgraphicsscene.cpp.

References entered().

Referenced by KDGantt::GraphicsItem::hoverMoveEvent().

void GraphicsScene::itemPressed ( const QModelIndex &  idx  ) 

Definition at line 601 of file kdganttgraphicsscene.cpp.

References pressed().

Referenced by KDGantt::GraphicsItem::mousePressEvent().

QModelIndex GraphicsScene::mainIndex ( const QModelIndex &  idx  )  [static]

Definition at line 294 of file kdganttgraphicsscene.cpp.

QAbstractItemModel * GraphicsScene::model (  )  const

Definition at line 188 of file kdganttgraphicsscene.cpp.

References d.

Referenced by dataIndex(), setGrid(), setSummaryHandlingModel(), and updateRow().

void KDGantt::GraphicsScene::pressed ( const QModelIndex &  index  )  [signal]

Referenced by itemPressed().

void GraphicsScene::print ( QPainter *  painter,
qreal  start,
qreal  end,
const QRectF &  _targetRect = QRectF(),
bool  drawRowLabels = 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.

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 688 of file kdganttgraphicsscene.cpp.

void GraphicsScene::print ( QPainter *  painter,
const QRectF &  _targetRect = QRectF(),
bool  drawRowLabels = 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.

Definition at line 670 of file kdganttgraphicsscene.cpp.

void GraphicsScene::print ( QPrinter *  printer,
qreal  start,
qreal  end,
bool  drawRowLabels = 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.

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 653 of file kdganttgraphicsscene.cpp.

void GraphicsScene::print ( QPrinter *  printer,
bool  drawRowLabels = 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.

This version of print() will print multiple pages.

Definition at line 632 of file kdganttgraphicsscene.cpp.

void GraphicsScene::removeItem ( const QModelIndex &  idx  ) 
QModelIndex GraphicsScene::rootIndex (  )  const

Definition at line 218 of file kdganttgraphicsscene.cpp.

References d.

AbstractRowController * GraphicsScene::rowController (  )  const

Definition at line 258 of file kdganttgraphicsscene.cpp.

References d.

Referenced by KDGantt::GraphicsItem::updateItem(), and updateRow().

QItemSelectionModel * GraphicsScene::selectionModel (  )  const
void GraphicsScene::setConstraintModel ( ConstraintModel cm  )  [slot]

Definition at line 228 of file kdganttgraphicsscene.cpp.

References d.

void GraphicsScene::setDragSource ( GraphicsItem item  ) 
void GraphicsScene::setGrid ( AbstractGrid grid  ) 

Definition at line 263 of file kdganttgraphicsscene.cpp.

References d, gridChanged(), and model().

void GraphicsScene::setItemDelegate ( ItemDelegate delegate  ) 

Definition at line 176 of file kdganttgraphicsscene.cpp.

References d.

void GraphicsScene::setModel ( QAbstractItemModel *  model  )  [slot]

Definition at line 194 of file kdganttgraphicsscene.cpp.

References d, and setSelectionModel().

void GraphicsScene::setReadOnly ( bool  ro  )  [slot]

Definition at line 279 of file kdganttgraphicsscene.cpp.

References d.

void GraphicsScene::setRootIndex ( const QModelIndex &  idx  )  [slot]

Definition at line 213 of file kdganttgraphicsscene.cpp.

References d.

void GraphicsScene::setRowController ( AbstractRowController rc  ) 

Definition at line 253 of file kdganttgraphicsscene.cpp.

References d.

void GraphicsScene::setSelectionModel ( QItemSelectionModel *  selectionmodel  )  [slot]

Definition at line 242 of file kdganttgraphicsscene.cpp.

References d.

Referenced by setModel().

void GraphicsScene::setSummaryHandlingModel ( QAbstractProxyModel proxyModel  )  [slot]

Definition at line 207 of file kdganttgraphicsscene.cpp.

References d, and model().

QAbstractProxyModel * GraphicsScene::summaryHandlingModel (  )  const
void GraphicsScene::updateItems (  ) 
void GraphicsScene::updateRow ( const QModelIndex &  idx  ) 

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/