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

kdgantt

KDGantt::ItemDelegate

KDGantt::ItemDelegate Class Reference

#include <KDGanttItemDelegate>

Inheritance diagram for KDGantt::ItemDelegate:

Inheritance graph
[legend]

List of all members.


Detailed Description

Class used to render gantt items in a KDGantt::GraphicsView.

Definition at line 38 of file kdganttitemdelegate.h.


Public Types

enum  InteractionState {
  State_None = 0, State_Move, State_ExtendLeft, State_ExtendRight,
  State_DragConstraint
}

Public Member Functions

virtual QRectF constraintBoundingRect (const QPointF &start, const QPointF &end, const Constraint &constraint) const
QBrush defaultBrush (ItemType type) const
QPen defaultPen (ItemType type) const
virtual InteractionState interactionStateFor (const QPointF &pos, const StyleOptionGanttItem &opt, const QModelIndex &idx) const
virtual Span itemBoundingSpan (const StyleOptionGanttItem &opt, const QModelIndex &idx) const
 ItemDelegate (QObject *parent=0)
virtual void paintConstraintItem (QPainter *p, const QStyleOptionGraphicsItem &opt, const QPointF &start, const QPointF &end, const Constraint &constraint)
virtual void paintGanttItem (QPainter *p, const StyleOptionGanttItem &opt, const QModelIndex &idx)
void setDefaultBrush (ItemType type, const QBrush &brush)
void setDefaultPen (ItemType type, const QPen &pen)
virtual ~ItemDelegate ()

Protected Member Functions

QPolygonF finishFinishArrow (const QPointF &start, const QPointF &end) const
QPolygonF finishFinishLine (const QPointF &start, const QPointF &end) const
QPolygonF finishStartArrow (const QPointF &start, const QPointF &end) const
QPolygonF finishStartLine (const QPointF &start, const QPointF &end) const
void paintFinishFinishConstraint (QPainter *p, const QStyleOptionGraphicsItem &opt, const QPointF &start, const QPointF &end, const Constraint &constraint)
void paintFinishStartConstraint (QPainter *p, const QStyleOptionGraphicsItem &opt, const QPointF &start, const QPointF &end, const Constraint &constraint)
void paintStartFinishConstraint (QPainter *p, const QStyleOptionGraphicsItem &opt, const QPointF &start, const QPointF &end, const Constraint &constraint)
void paintStartStartConstraint (QPainter *p, const QStyleOptionGraphicsItem &opt, const QPointF &start, const QPointF &end, const Constraint &constraint)
QPolygonF startFinishArrow (const QPointF &start, const QPointF &end) const
QPolygonF startFinishLine (const QPointF &start, const QPointF &end) const
QPolygonF startStartArrow (const QPointF &start, const QPointF &end) const
QPolygonF startStartLine (const QPointF &start, const QPointF &end) const

Member Enumeration Documentation

enum KDGantt::ItemDelegate::InteractionState

This enum is used for communication between the view and the delegate about user interaction with gantt items.

See also:
KDGantt::ItemDelegate::interactionStateFor
Enumerator:
State_None 
State_Move 
State_ExtendLeft 
State_ExtendRight 
State_DragConstraint 

Definition at line 42 of file kdganttitemdelegate.h.


Constructor & Destructor Documentation

ItemDelegate::ItemDelegate ( QObject *  parent = 0  )  [explicit]

Constructor. Creates an ItemDelegate with parent parent

Definition at line 101 of file kdganttitemdelegate.cpp.

ItemDelegate::~ItemDelegate (  )  [virtual]

Destructor

Definition at line 107 of file kdganttitemdelegate.cpp.


Member Function Documentation

QRectF ItemDelegate::constraintBoundingRect ( const QPointF &  start,
const QPointF &  end,
const Constraint &  constraint 
) const [virtual]

Returns:
The bounding rectangle for the graphics used to represent a constraint between points start and end (typically an arrow)

Definition at line 343 of file kdganttitemdelegate.cpp.

QBrush ItemDelegate::defaultBrush ( ItemType  type  )  const

Returns:
The default brush for item type type
Todo:
Move this to GraphicsView to make delegate stateless.

Definition at line 129 of file kdganttitemdelegate.cpp.

QPen ItemDelegate::defaultPen ( ItemType  type  )  const

Returns:
The default pen for item type type
Todo:
Move this to GraphicsView to make delegate stateless.

Definition at line 149 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::finishFinishArrow ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 500 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::finishFinishLine ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 478 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::finishStartArrow ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 442 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::finishStartLine ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 420 of file kdganttitemdelegate.cpp.

ItemDelegate::InteractionState ItemDelegate::interactionStateFor ( const QPointF &  pos,
const StyleOptionGanttItem &  opt,
const QModelIndex &  idx 
) const [virtual]

Returns:
The interaction state for position pos on item idx when rendered with options opt. This is used to tell the view about how the item should react to mouse click/drag.
Override to implement new items or interactions.

Definition at line 197 of file kdganttitemdelegate.cpp.

Span ItemDelegate::itemBoundingSpan ( const StyleOptionGanttItem &  opt,
const QModelIndex &  idx 
) const [virtual]

Returns:
The bounding Span for the item identified by idx when rendered with options opt. This is often the same as the span given by the AbstractGrid for idx, but it might be larger in case there are additional texts or decorations on the item.
Override this to implement new itemtypes or to change the look of the existing ones.

Definition at line 162 of file kdganttitemdelegate.cpp.

void ItemDelegate::paintConstraintItem ( QPainter *  painter,
const QStyleOptionGraphicsItem &  opt,
const QPointF &  start,
const QPointF &  end,
const Constraint &  constraint 
) [virtual]

Paints the constraint between points start and end using painter and opt.

Todo:
Review opt's type

Definition at line 371 of file kdganttitemdelegate.cpp.

void ItemDelegate::paintFinishFinishConstraint ( QPainter *  p,
const QStyleOptionGraphicsItem &  opt,
const QPointF &  start,
const QPointF &  end,
const Constraint &  constraint 
) [protected]

Definition at line 451 of file kdganttitemdelegate.cpp.

void ItemDelegate::paintFinishStartConstraint ( QPainter *  p,
const QStyleOptionGraphicsItem &  opt,
const QPointF &  start,
const QPointF &  end,
const Constraint &  constraint 
) [protected]

Definition at line 393 of file kdganttitemdelegate.cpp.

void ItemDelegate::paintGanttItem ( QPainter *  painter,
const StyleOptionGanttItem &  opt,
const QModelIndex &  idx 
) [virtual]

Paints the gantt item idx using painter and opt

Definition at line 222 of file kdganttitemdelegate.cpp.

void ItemDelegate::paintStartFinishConstraint ( QPainter *  p,
const QStyleOptionGraphicsItem &  opt,
const QPointF &  start,
const QPointF &  end,
const Constraint &  constraint 
) [protected]

Definition at line 567 of file kdganttitemdelegate.cpp.

void ItemDelegate::paintStartStartConstraint ( QPainter *  p,
const QStyleOptionGraphicsItem &  opt,
const QPointF &  start,
const QPointF &  end,
const Constraint &  constraint 
) [protected]

Definition at line 509 of file kdganttitemdelegate.cpp.

void ItemDelegate::setDefaultBrush ( ItemType  type,
const QBrush &  brush 
)

Sets the default brush used for items of type type to brush. The default brush is used in the case when the model does not provide an explicit brush.

Todo:
Move this to GraphicsView to make delegate stateless.

Definition at line 120 of file kdganttitemdelegate.cpp.

void ItemDelegate::setDefaultPen ( ItemType  type,
const QPen &  pen 
)

Sets the default pen used for items of type type to pen. The default pen is used in the case when the model does not provide an explicit pen.

Todo:
Move this to GraphicsView to make delegate stateless.

Definition at line 140 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::startFinishArrow ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 616 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::startFinishLine ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 594 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::startStartArrow ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 558 of file kdganttitemdelegate.cpp.

QPolygonF ItemDelegate::startStartLine ( const QPointF &  start,
const QPointF &  end 
) const [protected]

Definition at line 537 of file kdganttitemdelegate.cpp.


The documentation for this class was generated from the following files:
  • kdganttitemdelegate.h
  • kdganttitemdelegate.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
  • 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