KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KDGantt::GraphicsScene Class Reference

#include <kdganttgraphicsscene.h>

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

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

Public Member Functions

 GraphicsScene (QObject *parent=nullptr)
 
 ~GraphicsScene () override
 
void clearConstraintItems ()
 
void clearItems ()
 
ConstraintModelconstraintModel () const
 
GraphicsItemcreateItem (ItemType type) const
 Creates a new item of type type.
 
void deleteSubtree (const QModelIndex &)
 
GraphicsItemdragSource () const
 
ConstraintGraphicsItemfindConstraintItem (const Constraint &) const
 
GraphicsItemfindItem (const QModelIndex &) const
 
GraphicsItemfindItem (const QPersistentModelIndex &) 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 &)
 
QAbstractItemModelmodel () const
 
void print (QPainter *painter, const QRectF &target=QRectF(), bool drawRowLabels=true, bool drawColumnLabels=true)
 Render the GanttView inside the rectangle target using the painter painter.
 
void 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.
 
void print (QPrinter *printer, bool drawRowLabels=true, bool drawColumnLabels=true)
 Print the Gantt chart using printer.
 
void 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.
 
void removeItem (const QModelIndex &)
 
void removeItem (QGraphicsItem *item)
 
QModelIndex rootIndex () const
 
AbstractRowControllerrowController () const
 
QItemSelectionModelselectionModel () 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)
 
- Public Member Functions inherited from QGraphicsScene
 QGraphicsScene (const QRectF &sceneRect, QObject *parent)
 
 QGraphicsScene (QObject *parent)
 
 QGraphicsScene (qreal x, qreal y, qreal width, qreal height, QObject *parent)
 
virtual ~QGraphicsScene ()
 
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 (const QRectF &rect, QGraphicsScene::SceneLayers layers)
 
void invalidate (qreal x, qreal y, qreal w, qreal h, 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 QPainterPath &path, 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 QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const const
 
QList< QGraphicsItem * > items (const QRectF &rect, 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
 
QList< QGraphicsItem * > items (Qt::SortOrder order) 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 (const QRectF &rect)
 
void update (qreal x, qreal y, qreal w, qreal h)
 
QList< QGraphicsView * > views () const const
 
qreal width () const const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual ~QObject ()
 
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
 
T findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QString &name, 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
 
T qFindChild (const QObject *obj, const QString &name)
 
QList< TqFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< TqFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (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)
 Returns the index pointing to the last column in the same row as 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 *context, Functor functor, 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)
 
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, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction 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
 
- 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
 

Detailed Description

Definition at line 36 of file kdganttgraphicsscene.h.

Constructor & Destructor Documentation

◆ GraphicsScene()

GraphicsScene::GraphicsScene ( QObject parent = nullptr)
explicit

Definition at line 146 of file kdganttgraphicsscene.cpp.

◆ ~GraphicsScene()

GraphicsScene::~GraphicsScene ( )
override

Member Function Documentation

◆ clearConstraintItems()

void GraphicsScene::clearConstraintItems ( )

Definition at line 548 of file kdganttgraphicsscene.cpp.

Referenced by ~GraphicsScene().

◆ clearItems()

void GraphicsScene::clearItems ( )

Definition at line 499 of file kdganttgraphicsscene.cpp.

References d, QGraphicsScene::items(), and QObject::qobject_cast().

◆ clicked

void KDGantt::GraphicsScene::clicked ( const QModelIndex index)
signal

◆ constraintModel()

ConstraintModel * GraphicsScene::constraintModel ( ) const

Definition at line 221 of file kdganttgraphicsscene.cpp.

References d.

◆ createItem()

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().

◆ dataIndex()

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

References QAbstractItemModel::columnCount(), QAbstractItemModel::index(), model(), and QObject::qobject_cast().

Referenced by deleteSubtree().

◆ deleteSubtree()

void GraphicsScene::deleteSubtree ( const QModelIndex _idx)

◆ dragSource()

GraphicsItem * GraphicsScene::dragSource ( ) const

Definition at line 647 of file kdganttgraphicsscene.cpp.

References d.

◆ drawBackground()

void GraphicsScene::drawBackground ( QPainter painter,
const QRectF rect 
)
overrideprotectedvirtual

◆ drawForeground()

void GraphicsScene::drawForeground ( QPainter painter,
const QRectF rect 
)
overrideprotectedvirtual

Reimplemented from QGraphicsScene.

Definition at line 617 of file kdganttgraphicsscene.cpp.

References d.

◆ entered

void KDGantt::GraphicsScene::entered ( const QModelIndex index)
signal

◆ findConstraintItem()

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

Definition at line 543 of file kdganttgraphicsscene.cpp.

References d.

◆ findItem() [1/2]

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().

◆ findItem() [2/2]

GraphicsItem * GraphicsScene::findItem ( const QPersistentModelIndex idx) const

Definition at line 490 of file kdganttgraphicsscene.cpp.

References d, QObject::qobject_cast(), and summaryHandlingModel().

◆ grid()

AbstractGrid * GraphicsScene::grid ( ) const

Definition at line 276 of file kdganttgraphicsscene.cpp.

References d.

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

◆ gridChanged

void KDGantt::GraphicsScene::gridChanged ( )
signal

◆ helpEvent()

void GraphicsScene::helpEvent ( QGraphicsSceneHelpEvent helpEvent)
overrideprotectedvirtual

◆ insertItem()

void GraphicsScene::insertItem ( const QPersistentModelIndex idx,
GraphicsItem item 
)

◆ isReadOnly()

bool GraphicsScene::isReadOnly ( ) const

Definition at line 286 of file kdganttgraphicsscene.cpp.

References d.

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

◆ itemClicked()

void GraphicsScene::itemClicked ( const QModelIndex idx)

◆ itemDelegate()

ItemDelegate * GraphicsScene::itemDelegate ( ) const

◆ itemDoubleClicked()

void GraphicsScene::itemDoubleClicked ( const QModelIndex idx)

◆ itemEntered()

void GraphicsScene::itemEntered ( const QModelIndex idx)

◆ itemPressed()

void GraphicsScene::itemPressed ( const QModelIndex idx)

◆ mainIndex()

QModelIndex GraphicsScene::mainIndex ( const QModelIndex idx)
static

◆ model()

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().

◆ pressed

void KDGantt::GraphicsScene::pressed ( const QModelIndex index)
signal

◆ print() [1/4]

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.

◆ print() [2/4]

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.

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

References QPrinter::pageLayout(), QPageLayout::paintRectPixels(), QObject::qobject_cast(), QPrinter::resolution(), and QGraphicsScene::sceneRect.

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

References QPrinter::pageLayout(), QPageLayout::paintRectPixels(), QObject::qobject_cast(), and QPrinter::resolution().

◆ qrealClicked

void KDGantt::GraphicsScene::qrealClicked ( const QModelIndex index)
signal

◆ removeItem() [1/2]

void GraphicsScene::removeItem ( const QModelIndex idx)

◆ removeItem() [2/2]

void QGraphicsScene::removeItem ( QGraphicsItem item)

◆ rootIndex()

QModelIndex GraphicsScene::rootIndex ( ) const

Definition at line 216 of file kdganttgraphicsscene.cpp.

References d.

◆ rowController()

AbstractRowController * GraphicsScene::rowController ( ) const

Definition at line 256 of file kdganttgraphicsscene.cpp.

References d.

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

◆ selectionModel()

QItemSelectionModel * GraphicsScene::selectionModel ( ) const

◆ setConstraintModel

void GraphicsScene::setConstraintModel ( ConstraintModel cm)
slot

◆ setDragSource()

void GraphicsScene::setDragSource ( GraphicsItem item)

◆ setGrid()

void GraphicsScene::setGrid ( AbstractGrid grid)

◆ setItemDelegate()

void GraphicsScene::setItemDelegate ( ItemDelegate delegate)

Definition at line 173 of file kdganttgraphicsscene.cpp.

References d, QObject::qobject_cast(), and QGraphicsScene::update().

◆ setModel

void GraphicsScene::setModel ( QAbstractItemModel model)
slot

Definition at line 192 of file kdganttgraphicsscene.cpp.

References d, model(), QObject::qobject_cast(), and setSelectionModel().

◆ setReadOnly

void GraphicsScene::setReadOnly ( bool  ro)
slot

Definition at line 281 of file kdganttgraphicsscene.cpp.

References d, and QObject::qobject_cast().

◆ setRootIndex

void GraphicsScene::setRootIndex ( const QModelIndex idx)
slot

Definition at line 211 of file kdganttgraphicsscene.cpp.

References d, and QObject::qobject_cast().

◆ setRowController()

void GraphicsScene::setRowController ( AbstractRowController rc)

Definition at line 251 of file kdganttgraphicsscene.cpp.

References d, and QObject::qobject_cast().

◆ setSelectionModel

void GraphicsScene::setSelectionModel ( QItemSelectionModel selectionmodel)
slot

Definition at line 240 of file kdganttgraphicsscene.cpp.

References d, and QObject::qobject_cast().

Referenced by setModel().

◆ setSummaryHandlingModel

void GraphicsScene::setSummaryHandlingModel ( QAbstractProxyModel proxyModel)
slot

Definition at line 205 of file kdganttgraphicsscene.cpp.

References d, model(), and QAbstractProxyModel::setSourceModel().

◆ summaryHandlingModel()

QAbstractProxyModel * GraphicsScene::summaryHandlingModel ( ) const

Definition at line 200 of file kdganttgraphicsscene.cpp.

References d.

Referenced by deleteSubtree(), findItem(), findItem(), insertItem(), and updateRow().

◆ updateItems()

void GraphicsScene::updateItems ( )

◆ updateRow()

void GraphicsScene::updateRow ( const QModelIndex idx)

The documentation for this class was generated from the following files:

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Fri Apr 26 2024 00:04:58 for KD Chart API Documentation by doxygen 1.9.8