KGantt::GraphicsScene

Search for usage in LXR

#include <kganttgraphicsscene.h>

Inheritance diagram for KGantt::GraphicsScene:

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 *)
 

Public Member Functions

 GraphicsScene (QObject *parent=nullptr)
 
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 QModelIndex &) const
 
GraphicsItemfindItem (const QPersistentModelIndex &) const
 
const AbstractGridgetGrid () const
 
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 &idx, QGraphicsSceneMouseEvent *event)
 
QAbstractItemModelmodel () const
 
void print (QPrinter *printer, bool drawRowLabels=true, bool drawColumnLabels=true)
 
void print (QPrinter *printer, qreal start, qreal end, bool drawRowLabels=true, bool drawColumnLabels=true)
 
void print (QPainter *painter, const QRectF &target=QRectF(), bool drawRowLabels=true, bool drawColumnLabels=true)
 
void print (QPainter *painter, qreal start, qreal end, const QRectF &target=QRectF(), bool drawRowLabels=true, bool drawColumnLabels=true)
 
void printDiagram (QPrinter *printer, const PrintingContext &context)
 
void removeItem (const QModelIndex &)
 
QModelIndex rootIndex () const
 
AbstractRowControllerrowController () const
 
QItemSelectionModelselectionModel () const
 
void setDragSource (GraphicsItem *item)
 
void setGrid (AbstractGrid *grid)
 
void setItemDelegate (ItemDelegate *)
 
void setRowController (AbstractRowController *rc)
 
QAbstractProxyModelsummaryHandlingModel () const
 
AbstractGridtakeGrid ()
 
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)
 
QGraphicsItemactivePanel () const const
 
QGraphicsWidgetactiveWindow () const const
 
QGraphicsEllipseItemaddEllipse (const QRectF &rect, const QPen &pen, const QBrush &brush)
 
QGraphicsEllipseItemaddEllipse (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush)
 
void addItem (QGraphicsItem *item)
 
QGraphicsLineItemaddLine (const QLineF &line, const QPen &pen)
 
QGraphicsLineItemaddLine (qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen)
 
QGraphicsPathItemaddPath (const QPainterPath &path, const QPen &pen, const QBrush &brush)
 
QGraphicsPixmapItemaddPixmap (const QPixmap &pixmap)
 
QGraphicsPolygonItemaddPolygon (const QPolygonF &polygon, const QPen &pen, const QBrush &brush)
 
QGraphicsRectItemaddRect (const QRectF &rect, const QPen &pen, const QBrush &brush)
 
QGraphicsRectItemaddRect (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush)
 
QGraphicsSimpleTextItemaddSimpleText (const QString &text, const QFont &font)
 
QGraphicsTextItemaddText (const QString &text, const QFont &font)
 
QGraphicsProxyWidgetaddWidget (QWidget *widget, Qt::WindowFlags wFlags)
 
void advance ()
 
QBrush backgroundBrush () const const
 
int bspTreeDepth () const const
 
void changed (const QList< QRectF > &region)
 
void clear ()
 
void clearFocus ()
 
void clearSelection ()
 
QList< QGraphicsItem * > collidingItems (const QGraphicsItem *item, Qt::ItemSelectionMode mode) const const
 
QGraphicsItemGroupcreateItemGroup (const QList< QGraphicsItem * > &items)
 
void destroyItemGroup (QGraphicsItemGroup *group)
 
QGraphicsItemfocusItem () const const
 
void focusItemChanged (QGraphicsItem *newFocusItem, QGraphicsItem *oldFocusItem, Qt::FocusReason reason)
 
bool focusOnTouch () const const
 
QFont font () const const
 
QBrush foregroundBrush () const const
 
bool hasFocus () const const
 
qreal height () const const
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const const
 
void invalidate (qreal x, qreal y, qreal w, qreal h, QGraphicsScene::SceneLayers layers)
 
void invalidate (const QRectF &rect, QGraphicsScene::SceneLayers layers)
 
bool isActive () const const
 
bool isSortCacheEnabled () const const
 
QGraphicsItemitemAt (const QPointF &position) const const
 
QGraphicsItemitemAt (const QPointF &position, const QTransform &deviceTransform) const const
 
QGraphicsItemitemAt (qreal x, qreal y) const const
 
QGraphicsItemitemAt (qreal x, qreal y, const QTransform &deviceTransform) const const
 
QGraphicsScene::ItemIndexMethod itemIndexMethod () const const
 
QList< QGraphicsItem * > items (const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const const
 
QList< QGraphicsItem * > items (Qt::SortOrder order) const const
 
QList< QGraphicsItem * > items (const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const const
 
QList< QGraphicsItem * > items (const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const const
 
QList< QGraphicsItem * > items (const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const const
 
QList< QGraphicsItem * > items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const const
 
QList< QGraphicsItem * > items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const const
 
QRectF itemsBoundingRect () const const
 
qreal minimumRenderSize () const const
 
QGraphicsItemmouseGrabberItem () const const
 
QPalette palette () const const
 
void removeItem (QGraphicsItem *item)
 
void render (QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode)
 
QRectF sceneRect () const const
 
void sceneRectChanged (const QRectF &rect)
 
QList< QGraphicsItem * > selectedItems () const const
 
QPainterPath selectionArea () const 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 setFocusOnTouch (bool enabled)
 
void setFont (const QFont &font)
 
void setForegroundBrush (const QBrush &brush)
 
void setItemIndexMethod (QGraphicsScene::ItemIndexMethod method)
 
void setMinimumRenderSize (qreal minSize)
 
void setPalette (const QPalette &palette)
 
void setSceneRect (const QRectF &rect)
 
void setSceneRect (qreal x, qreal y, qreal w, qreal h)
 
void setSelectionArea (const QPainterPath &path, const QTransform &deviceTransform)
 
void setSelectionArea (const QPainterPath &path, Qt::ItemSelectionMode mode, const QTransform &deviceTransform)
 
void setSelectionArea (const QPainterPath &path, Qt::ItemSelectionOperation selectionOperation, Qt::ItemSelectionMode mode, const QTransform &deviceTransform)
 
void setSortCacheEnabled (bool enabled)
 
void setStickyFocus (bool enabled)
 
void setStyle (QStyle *style)
 
bool stickyFocus () const const
 
QStylestyle () const const
 
void update (qreal x, qreal y, qreal w, qreal h)
 
void update (const QRectF &rect)
 
QList< QGraphicsView * > views () const const
 
qreal width () const const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static QModelIndex dataIndex (const QModelIndex &idx)
 
static QModelIndex mainIndex (const QModelIndex &idx)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction 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) override
 
void drawForeground (QPainter *painter, const QRectF &rect) override
 
void helpEvent (QGraphicsSceneHelpEvent *helpEvent) override
 
- 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 drawItems (QPainter *painter, int numItems, QGraphicsItem *[] items, const QStyleOptionGraphicsItem[] options, QWidget *widget)
 
virtual void dropEvent (QGraphicsSceneDragDropEvent *event)
 
virtual bool event (QEvent *event) override
 
virtual bool eventFilter (QObject *watched, QEvent *event) override
 
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
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

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
 
 sortCacheEnabled
 
 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.

Member Function Documentation

GraphicsItem * GraphicsScene::createItem ( ItemType  type) const

Creates a new item of type type.

Definition at line 395 of file kganttgraphicsscene.cpp.

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 380 of file kganttgraphicsscene.cpp.

const AbstractGrid * GraphicsScene::getGrid ( ) const
Returns
the current grid.

Definition at line 346 of file kganttgraphicsscene.cpp.

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.

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 729 of file kganttgraphicsscene.cpp.

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 742 of file kganttgraphicsscene.cpp.

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 757 of file kganttgraphicsscene.cpp.

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 768 of file kganttgraphicsscene.cpp.

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 779 of file kganttgraphicsscene.cpp.

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.

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.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Nov 29 2021 22:32:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.