• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kdgantt

KDGantt::Legend

KDGantt::Legend Class Reference

#include <KDGanttLegend>

Inheritance diagram for KDGantt::Legend:

Inheritance graph
[legend]

List of all members.


Detailed Description

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 35 of file kdganttlegend.h.


Public Member Functions

QModelIndex indexAt (const QPoint &point) const
 Legend (QWidget *parent=0)
QSize minimumSizeHint () const
void scrollTo (const QModelIndex &, ScrollHint=EnsureVisible)
void setModel (QAbstractItemModel *model)
QSize sizeHint () const
QRect visualRect (const QModelIndex &index) const
virtual ~Legend ()

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
bool isIndexHidden (const QModelIndex &) const
virtual QSize measureItem (const QModelIndex &index, bool recursive=true) const
QModelIndex moveCursor (CursorAction, Qt::KeyboardModifiers)
void paintEvent (QPaintEvent *event)
void setSelection (const QRect &, QItemSelectionModel::SelectionFlags)
int verticalOffset () const
QRegion visualRegionForSelection (const QItemSelection &) const

Constructor & Destructor Documentation

Legend::Legend ( QWidget *  parent = 0  )  [explicit]

Constructor. Creates a Legend with parent parent. The QObject parent is not used for anything internally.

Definition at line 47 of file kdganttlegend.cpp.

Legend::~Legend (  )  [virtual]

Destructor. Does nothing

Definition at line 56 of file kdganttlegend.cpp.


Member Function Documentation

QRect Legend::drawItem ( QPainter *  painter,
const QModelIndex &  index,
const QPoint &  pos = QPoint() 
) const [protected, virtual]

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.

Returns:
the rectangle drawn.

Definition at line 142 of file kdganttlegend.cpp.

StyleOptionGanttItem Legend::getStyleOption ( const QModelIndex &  index  )  const [protected, virtual]

Creates a StyleOptionGanttItem with all style options filled in except the target rectangles.

Definition at line 127 of file kdganttlegend.cpp.

int KDGantt::Legend::horizontalOffset (  )  const [inline, protected]

Definition at line 60 of file kdganttlegend.h.

QModelIndex Legend::indexAt ( const QPoint &  point  )  const

Definition at line 63 of file kdganttlegend.cpp.

bool KDGantt::Legend::isIndexHidden ( const QModelIndex &   )  const [inline, protected]

Definition at line 61 of file kdganttlegend.h.

QSize Legend::measureItem ( const QModelIndex &  index,
bool  recursive = true 
) const [protected, virtual]

Calculates the needed space for the legend item at index and, if recursive is true, all child items.

Definition at line 180 of file kdganttlegend.cpp.

QSize Legend::minimumSizeHint (  )  const

Definition at line 78 of file kdganttlegend.cpp.

void Legend::modelDataChanged (  )  [protected, virtual, slot]

Triggers repainting of the legend.

Definition at line 106 of file kdganttlegend.cpp.

QModelIndex KDGantt::Legend::moveCursor ( CursorAction  ,
Qt::KeyboardModifiers   
) [inline, protected]

Reimplemented from QAbstractItemView.

Definition at line 62 of file kdganttlegend.h.

void Legend::paintEvent ( QPaintEvent *  event  )  [protected]

Definition at line 112 of file kdganttlegend.cpp.

void KDGantt::Legend::scrollTo ( const QModelIndex &  ,
ScrollHint  = EnsureVisible 
) [inline]

Reimplemented from QAbstractItemView.

Definition at line 46 of file kdganttlegend.h.

void Legend::setModel ( QAbstractItemModel *  model  ) 

Reimplemented from QAbstractItemView.

Definition at line 83 of file kdganttlegend.cpp.

void KDGantt::Legend::setSelection ( const QRect &  ,
QItemSelectionModel::SelectionFlags   
) [inline, protected]

Reimplemented from QAbstractItemView.

Definition at line 63 of file kdganttlegend.h.

QSize Legend::sizeHint (  )  const

Definition at line 73 of file kdganttlegend.cpp.

int KDGantt::Legend::verticalOffset (  )  const [inline, protected]

Definition at line 64 of file kdganttlegend.h.

QRect Legend::visualRect ( const QModelIndex &  index  )  const

Definition at line 68 of file kdganttlegend.cpp.

QRegion KDGantt::Legend::visualRegionForSelection ( const QItemSelection &   )  const [inline, protected]

Definition at line 65 of file kdganttlegend.h.


The documentation for this class was generated from the following files:
  • kdganttlegend.h
  • kdganttlegend.cpp

kdgantt

Skip menu "kdgantt"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal