KD Chart 2
[rev.2.7]
|
Legend showing an image and a description for Gantt items. More...
#include <KDGanttLegend>
Public Member Functions | |
QModelIndex | indexAt (const QPoint &point) const override |
Legend (QWidget *parent=0) | |
QSize | minimumSizeHint () const override |
void | scrollTo (const QModelIndex &, ScrollHint=EnsureVisible) override |
void | setModel (QAbstractItemModel *model) override |
QSize | sizeHint () const override |
QRect | visualRect (const QModelIndex &index) const override |
~Legend () override | |
Protected Slots | |
virtual void | modelDataChanged () |
Protected Member Functions | |
virtual QRect | drawItem (QPainter *painter, const QModelIndex &index, const QPoint &pos=QPoint()) const |
virtual StyleOptionGanttItem | getStyleOption (const QModelIndex &index) const |
int | horizontalOffset () const override |
bool | isIndexHidden (const QModelIndex &) const override |
virtual QSize | measureItem (const QModelIndex &index, bool recursive=true) const |
QModelIndex | moveCursor (CursorAction, Qt::KeyboardModifiers) override |
void | paintEvent (QPaintEvent *event) override |
void | setSelection (const QRect &, QItemSelectionModel::SelectionFlags) override |
int | verticalOffset () const override |
QRegion | visualRegionForSelection (const QItemSelection &) const override |
Legend showing an image and a description for Gantt items.
This is an item view class showing a small Gantt item and it's text defined by LegendRole.
Definition at line 33 of file kdganttlegend.h.
|
explicit |
Constructor. Creates a Legend with parent parent. The QObject parent is not used for anything internally.
Definition at line 45 of file kdganttlegend.cpp.
|
override |
Destructor. Does nothing
Definition at line 54 of file kdganttlegend.cpp.
|
protectedvirtual |
Draws the legend item at index and all of it's children recursively at pos onto painter. Reimplement this if you want to draw items in an user defined way.
Definition at line 142 of file kdganttlegend.cpp.
References KDGantt::StyleOptionGanttItem::boundingRect, d, getStyleOption(), KDGantt::StyleOptionGanttItem::itemRect, KDGantt::ItemTypeRole, measureItem(), KDGantt::ItemDelegate::paintGanttItem(), KDGantt::StyleOptionGanttItem::text, and KDGantt::TypeEvent.
Referenced by paintEvent().
|
protectedvirtual |
Creates a StyleOptionGanttItem with all style options filled in except the target rectangles.
Definition at line 127 of file kdganttlegend.cpp.
References d, KDGantt::StyleOptionGanttItem::displayPosition, KDGantt::LegendRole, KDGantt::StyleOptionGanttItem::Right, and KDGantt::StyleOptionGanttItem::text.
Referenced by drawItem().
|
overrideprotected |
Definition at line 58 of file kdganttlegend.h.
|
override |
Definition at line 61 of file kdganttlegend.cpp.
|
overrideprotected |
Definition at line 59 of file kdganttlegend.h.
|
protectedvirtual |
Calculates the needed space for the legend item at index and, if recursive is true, all child items.
Definition at line 184 of file kdganttlegend.cpp.
References d, and KDGantt::LegendRole.
Referenced by drawItem(), minimumSizeHint(), and sizeHint().
|
override |
Definition at line 78 of file kdganttlegend.cpp.
References measureItem().
|
protectedvirtualslot |
Triggers repainting of the legend.
Definition at line 106 of file kdganttlegend.cpp.
Referenced by setModel().
|
overrideprotected |
Definition at line 60 of file kdganttlegend.h.
|
overrideprotected |
Definition at line 112 of file kdganttlegend.cpp.
References drawItem().
|
override |
Definition at line 44 of file kdganttlegend.h.
|
override |
Definition at line 83 of file kdganttlegend.cpp.
References d, and modelDataChanged().
|
overrideprotected |
Definition at line 61 of file kdganttlegend.h.
|
override |
Definition at line 73 of file kdganttlegend.cpp.
References measureItem().
|
overrideprotected |
Definition at line 62 of file kdganttlegend.h.
|
override |
Definition at line 67 of file kdganttlegend.cpp.
|
overrideprotected |
Definition at line 63 of file kdganttlegend.h.