kdgantt2
#include <kdganttgraphicsscene.h>
Classes | |
class | Private |
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 | |
GraphicsScene (QObject *parent=0) | |
virtual | ~GraphicsScene () |
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 |
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) |
void | print (QPrinter *printer, qreal start, qreal end, bool drawRowLabels=true) |
void | print (QPainter *painter, const QRectF &target=QRectF(), bool drawRowLabels=true) |
void | print (QPainter *painter, qreal start, qreal end, const QRectF &target=QRectF(), bool drawRowLabels=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) |
Public Member Functions inherited from QGraphicsScene | |
QGraphicsScene (QObject *parent) | |
QGraphicsScene (const QRectF &sceneRect, QObject *parent) | |
QGraphicsScene (qreal x, qreal y, qreal width, qreal height, QObject *parent) | |
virtual | ~QGraphicsScene () |
QGraphicsItem * | activePanel () const |
QGraphicsWidget * | activeWindow () const |
QGraphicsEllipseItem * | addEllipse (const QRectF &rect, const QPen &pen, const QBrush &brush) |
QGraphicsEllipseItem * | addEllipse (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush) |
void | addItem (QGraphicsItem *item) |
QGraphicsLineItem * | addLine (const QLineF &line, const QPen &pen) |
QGraphicsLineItem * | addLine (qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen) |
QGraphicsPathItem * | addPath (const QPainterPath &path, const QPen &pen, const QBrush &brush) |
QGraphicsPixmapItem * | addPixmap (const QPixmap &pixmap) |
QGraphicsPolygonItem * | addPolygon (const QPolygonF &polygon, const QPen &pen, const QBrush &brush) |
QGraphicsRectItem * | addRect (const QRectF &rect, const QPen &pen, const QBrush &brush) |
QGraphicsRectItem * | addRect (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush) |
QGraphicsSimpleTextItem * | addSimpleText (const QString &text, const QFont &font) |
QGraphicsTextItem * | addText (const QString &text, const QFont &font) |
QGraphicsProxyWidget * | addWidget (QWidget *widget, QFlags< Qt::WindowType > wFlags) |
void | advance () |
QBrush | backgroundBrush () const |
int | bspTreeDepth () const |
void | changed (const QList< QRectF > ®ion) |
void | clear () |
void | clearFocus () |
void | clearSelection () |
QList< QGraphicsItem * > | collidingItems (const QGraphicsItem *item, Qt::ItemSelectionMode mode) const |
QGraphicsItemGroup * | createItemGroup (const QList< QGraphicsItem * > &items) |
void | destroyItemGroup (QGraphicsItemGroup *group) |
QGraphicsItem * | focusItem () const |
QFont | font () const |
QBrush | foregroundBrush () const |
bool | hasFocus () const |
qreal | height () const |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
void | invalidate (qreal x, qreal y, qreal w, qreal h, QFlags< QGraphicsScene::SceneLayer > layers) |
void | invalidate (const QRectF &rect, QFlags< QGraphicsScene::SceneLayer > layers) |
bool | isActive () const |
bool | isSortCacheEnabled () const |
QGraphicsItem * | itemAt (qreal x, qreal y) const |
QGraphicsItem * | itemAt (qreal x, qreal y, const QTransform &deviceTransform) const |
QGraphicsItem * | itemAt (const QPointF &position) const |
QGraphicsItem * | itemAt (const QPointF &position, const QTransform &deviceTransform) const |
ItemIndexMethod | itemIndexMethod () const |
QList< QGraphicsItem * > | items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
QList< QGraphicsItem * > | items () const |
QList< QGraphicsItem * > | items (Qt::SortOrder order) const |
QList< QGraphicsItem * > | items (const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
QList< QGraphicsItem * > | items (const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
QList< QGraphicsItem * > | items (const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
QList< QGraphicsItem * > | items (const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
QList< QGraphicsItem * > | items (const QPointF &pos) const |
QList< QGraphicsItem * > | items (const QRectF &rectangle, Qt::ItemSelectionMode mode) const |
QList< QGraphicsItem * > | items (const QPolygonF &polygon, Qt::ItemSelectionMode mode) const |
QList< QGraphicsItem * > | items (const QPainterPath &path, Qt::ItemSelectionMode mode) const |
QList< QGraphicsItem * > | items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const |
QRectF | itemsBoundingRect () const |
QGraphicsItem * | mouseGrabberItem () const |
QPalette | palette () const |
void | removeItem (QGraphicsItem *item) |
void | render (QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode) |
QRectF | sceneRect () const |
void | sceneRectChanged (const QRectF &rect) |
QList< QGraphicsItem * > | selectedItems () const |
QPainterPath | selectionArea () const |
void | selectionChanged () |
bool | sendEvent (QGraphicsItem *item, QEvent *event) |
void | setActivePanel (QGraphicsItem *item) |
void | setActiveWindow (QGraphicsWidget *widget) |
void | setBackgroundBrush (const QBrush &brush) |
void | setBspTreeDepth (int depth) |
void | setFocus (Qt::FocusReason focusReason) |
void | setFocusItem (QGraphicsItem *item, Qt::FocusReason focusReason) |
void | setFont (const QFont &font) |
void | setForegroundBrush (const QBrush &brush) |
void | setItemIndexMethod (ItemIndexMethod method) |
void | setPalette (const QPalette &palette) |
void | setSceneRect (qreal x, qreal y, qreal w, qreal h) |
void | setSceneRect (const QRectF &rect) |
void | setSelectionArea (const QPainterPath &path, const QTransform &deviceTransform) |
void | setSelectionArea (const QPainterPath &path) |
void | setSelectionArea (const QPainterPath &path, Qt::ItemSelectionMode mode, const QTransform &deviceTransform) |
void | setSelectionArea (const QPainterPath &path, Qt::ItemSelectionMode mode) |
void | setSortCacheEnabled (bool enabled) |
void | setStickyFocus (bool enabled) |
void | setStyle (QStyle *style) |
bool | stickyFocus () const |
QStyle * | style () const |
void | update (const QRectF &rect) |
void | update (qreal x, qreal y, qreal w, qreal h) |
QList< QGraphicsView * > | views () const |
qreal | width () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static QModelIndex | dataIndex (const QModelIndex &idx) |
static QModelIndex | mainIndex (const QModelIndex &idx) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
void | drawBackground (QPainter *painter, const QRectF &rect) |
void | helpEvent (QGraphicsSceneHelpEvent *helpEvent) |
Protected Member Functions inherited from QGraphicsScene | |
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *contextMenuEvent) |
virtual void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) |
virtual void | drawForeground (QPainter *painter, const QRectF &rect) |
virtual void | drawItems (QPainter *painter, int numItems, QGraphicsItem *[] items, const QStyleOptionGraphicsItem[] options, QWidget *widget) |
virtual void | dropEvent (QGraphicsSceneDragDropEvent *event) |
virtual bool | event (QEvent *event) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
virtual void | focusInEvent (QFocusEvent *focusEvent) |
bool | focusNextPrevChild (bool next) |
virtual void | focusOutEvent (QFocusEvent *focusEvent) |
virtual void | inputMethodEvent (QInputMethodEvent *event) |
virtual void | keyPressEvent (QKeyEvent *keyEvent) |
virtual void | keyReleaseEvent (QKeyEvent *keyEvent) |
virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *mouseEvent) |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent) |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent) |
virtual void | wheelEvent (QGraphicsSceneWheelEvent *wheelEvent) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Public Attributes inherited from QGraphicsScene | |
typedef | SceneLayers |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QGraphicsScene | |
backgroundBrush | |
bspTreeDepth | |
font | |
foregroundBrush | |
itemIndexMethod | |
palette | |
sceneRect | |
sortCacheEnabled | |
stickyFocus | |
Properties inherited from QObject | |
objectName | |
Detailed Description
Definition at line 48 of file kdganttgraphicsscene.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 160 of file kdganttgraphicsscene.cpp.
|
virtual |
Definition at line 166 of file kdganttgraphicsscene.cpp.
Member Function Documentation
void GraphicsScene::clearConstraintItems | ( | ) |
Definition at line 529 of file kdganttgraphicsscene.cpp.
void GraphicsScene::clearItems | ( | ) |
Definition at line 490 of file kdganttgraphicsscene.cpp.
|
signal |
ConstraintModel * GraphicsScene::constraintModel | ( | ) | const |
Definition at line 232 of file kdganttgraphicsscene.cpp.
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 336 of file kdganttgraphicsscene.cpp.
|
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 318 of file kdganttgraphicsscene.cpp.
void GraphicsScene::deleteSubtree | ( | const QModelIndex & | _idx | ) |
Definition at line 508 of file kdganttgraphicsscene.cpp.
|
signal |
GraphicsItem * GraphicsScene::dragSource | ( | ) | const |
Definition at line 621 of file kdganttgraphicsscene.cpp.
Reimplemented from QGraphicsScene.
Definition at line 566 of file kdganttgraphicsscene.cpp.
|
signal |
ConstraintGraphicsItem * GraphicsScene::findConstraintItem | ( | const Constraint & | c | ) | const |
Definition at line 524 of file kdganttgraphicsscene.cpp.
QList<ConstraintGraphicsItem*> KDGantt::GraphicsScene::findConstraintItems | ( | const QModelIndex & | idx | ) | const |
GraphicsItem * GraphicsScene::findItem | ( | const QModelIndex & | idx | ) | const |
Definition at line 474 of file kdganttgraphicsscene.cpp.
GraphicsItem * GraphicsScene::findItem | ( | const QPersistentModelIndex & | idx | ) | const |
Definition at line 482 of file kdganttgraphicsscene.cpp.
AbstractGrid * GraphicsScene::grid | ( | ) | const |
Definition at line 281 of file kdganttgraphicsscene.cpp.
|
signal |
|
protectedvirtual |
Reimplemented from QGraphicsScene.
Definition at line 552 of file kdganttgraphicsscene.cpp.
void GraphicsScene::insertItem | ( | const QPersistentModelIndex & | idx, |
GraphicsItem * | item | ||
) |
Definition at line 418 of file kdganttgraphicsscene.cpp.
bool GraphicsScene::isReadOnly | ( | ) | const |
Definition at line 291 of file kdganttgraphicsscene.cpp.
void GraphicsScene::itemClicked | ( | const QModelIndex & | idx | ) |
Definition at line 606 of file kdganttgraphicsscene.cpp.
ItemDelegate * GraphicsScene::itemDelegate | ( | ) | const |
Definition at line 192 of file kdganttgraphicsscene.cpp.
void GraphicsScene::itemDoubleClicked | ( | const QModelIndex & | idx | ) |
Definition at line 611 of file kdganttgraphicsscene.cpp.
void GraphicsScene::itemEntered | ( | const QModelIndex & | idx | ) |
Definition at line 596 of file kdganttgraphicsscene.cpp.
void GraphicsScene::itemPressed | ( | const QModelIndex & | idx | ) |
Definition at line 601 of file kdganttgraphicsscene.cpp.
|
static |
Definition at line 301 of file kdganttgraphicsscene.cpp.
QAbstractItemModel * GraphicsScene::model | ( | ) | const |
Definition at line 197 of file kdganttgraphicsscene.cpp.
|
signal |
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::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 651 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 664 of file kdganttgraphicsscene.cpp.
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 685 of file kdganttgraphicsscene.cpp.
void GraphicsScene::removeItem | ( | const QModelIndex & | idx | ) |
Definition at line 451 of file kdganttgraphicsscene.cpp.
QModelIndex GraphicsScene::rootIndex | ( | ) | const |
Definition at line 227 of file kdganttgraphicsscene.cpp.
AbstractRowController * GraphicsScene::rowController | ( | ) | const |
Definition at line 265 of file kdganttgraphicsscene.cpp.
QItemSelectionModel * GraphicsScene::selectionModel | ( | ) | const |
Definition at line 255 of file kdganttgraphicsscene.cpp.
|
slot |
Definition at line 237 of file kdganttgraphicsscene.cpp.
void GraphicsScene::setDragSource | ( | GraphicsItem * | item | ) |
Definition at line 616 of file kdganttgraphicsscene.cpp.
void GraphicsScene::setGrid | ( | AbstractGrid * | grid | ) |
Definition at line 270 of file kdganttgraphicsscene.cpp.
void GraphicsScene::setItemDelegate | ( | ItemDelegate * | delegate | ) |
Definition at line 185 of file kdganttgraphicsscene.cpp.
|
slot |
Definition at line 203 of file kdganttgraphicsscene.cpp.
|
slot |
Definition at line 286 of file kdganttgraphicsscene.cpp.
|
slot |
Definition at line 222 of file kdganttgraphicsscene.cpp.
void GraphicsScene::setRowController | ( | AbstractRowController * | rc | ) |
Definition at line 260 of file kdganttgraphicsscene.cpp.
|
slot |
Definition at line 249 of file kdganttgraphicsscene.cpp.
|
slot |
Definition at line 216 of file kdganttgraphicsscene.cpp.
QAbstractProxyModel * GraphicsScene::summaryHandlingModel | ( | ) | const |
Definition at line 211 of file kdganttgraphicsscene.cpp.
void GraphicsScene::updateItems | ( | ) |
Definition at line 497 of file kdganttgraphicsscene.cpp.
void GraphicsScene::updateRow | ( | const QModelIndex & | idx | ) |
Definition at line 370 of file kdganttgraphicsscene.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.