Frapper  1.0a
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Frapper::SegmentGraphicsItem Class Reference

Class for graphics items representing curve segments in the Curve Editor panel. More...

#include <SegmentGraphicsItem.h>

Inheritance diagram for Frapper::SegmentGraphicsItem:
Inheritance graph
[legend]
Collaboration diagram for Frapper::SegmentGraphicsItem:
Collaboration graph
[legend]

Public Member Functions

 SegmentGraphicsItem (KeyGraphicsItem *startKeyItem, KeyGraphicsItem *endKeyItem, const QColor &color=QColor(Qt::darkGray))
 Constructor of the SegmentGraphicsItem class.
 
 ~SegmentGraphicsItem ()
 Destructor of the SegmentGraphicsItem class.
 
void setWidth (const float width)
 Sets the with by the given value.
 
KeyGraphicsItemgetStartKeyItem () const
 Returns the key item where the curve segment starts.
 
void setStartKeyItem (KeyGraphicsItem *startKeyItem)
 Sets the key item where the curve segment should start.
 
KeyGraphicsItemgetEndKeyItem () const
 Returns the key item where the curve segment ends.
 
void setEndKeyItem (KeyGraphicsItem *endKeyItem)
 Sets the key item where the curve segment should end.
 
void adjust ()
 Calculates the start and end points for painting the curve segment.
 

Protected Member Functions

virtual QRectF boundingRect () const
 Returns the bounding rectangle of the graphics item.
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Paints the graphics item into a graphics view.
 

Private Attributes

KeyGraphicsItemm_startKeyItem
 The key item where the curve segment starts.
 
KeyGraphicsItemm_endKeyItem
 The key item where the curve segment ends.
 
QColor m_color
 The color to use for painting the curve segment.
 
QPointF m_startPoint
 The start point to use for painting the curve segment.
 
QPointF m_endPoint
 The end point to use for painting the curve segment.
 
qreal m_width
 the width of the timeline
 

Detailed Description

Class for graphics items representing curve segments in the Curve Editor panel.

Constructor & Destructor Documentation

Frapper::SegmentGraphicsItem::SegmentGraphicsItem ( KeyGraphicsItem startKeyItem,
KeyGraphicsItem endKeyItem,
const QColor &  color = QColor(Qt::darkGray) 
)

Constructor of the SegmentGraphicsItem class.

Constructors and Destructors.

Parameters
startKeyItemThe key item where the curve segment starts.
endKeyItemThe key item where the curve segment ends.
colorThe color to use for the curve segment.

Constructor of the SegmentGraphicsItem class.

Parameters
startKeyItemThe key item where the curve segment starts.
endKeyItemThe key item where the curve segment ends.
colorThe color to use for the curve segment.
Frapper::SegmentGraphicsItem::~SegmentGraphicsItem ( )

Destructor of the SegmentGraphicsItem class.

Member Function Documentation

void Frapper::SegmentGraphicsItem::setWidth ( const float  width)
inline

Sets the with by the given value.

Public Functions.

Parameters
widthThe value to set the item width.

Sets the with by the given value.

Parameters
widthThe value to set the item width.
KeyGraphicsItem * Frapper::SegmentGraphicsItem::getStartKeyItem ( ) const

Returns the key item where the curve segment starts.

Returns
The key item where the curve segment starts.
void Frapper::SegmentGraphicsItem::setStartKeyItem ( KeyGraphicsItem startKeyItem)
inline

Sets the key item where the curve segment should start.

Parameters
startKeyItemThe key item where the curve segment should start.
KeyGraphicsItem * Frapper::SegmentGraphicsItem::getEndKeyItem ( ) const

Returns the key item where the curve segment ends.

Returns
The key item where the curve segment ends.
void Frapper::SegmentGraphicsItem::setEndKeyItem ( KeyGraphicsItem endKeyItem)
inline

Sets the key item where the curve segment should end.

Parameters
endKeyItemThe key item where the curve segment should end.
void Frapper::SegmentGraphicsItem::adjust ( )
inline

Calculates the start and end points for painting the curve segment.

QRectF Frapper::SegmentGraphicsItem::boundingRect ( ) const
protectedvirtual

Returns the bounding rectangle of the graphics item.

Protected Functions.

Returns
The bounding rectangle of the graphics item.

Returns the bounding rectangle of the graphics item.

Returns
The bounding rectangle of the graphics item.
void Frapper::SegmentGraphicsItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
protectedvirtual

Paints the graphics item into a graphics view.

Parameters
painterThe object to use for painting.
optionStyle options for painting the graphics item.
widgetThe widget into which to paint the graphics item.

Member Data Documentation

KeyGraphicsItem* Frapper::SegmentGraphicsItem::m_startKeyItem
private

The key item where the curve segment starts.

KeyGraphicsItem* Frapper::SegmentGraphicsItem::m_endKeyItem
private

The key item where the curve segment ends.

QColor Frapper::SegmentGraphicsItem::m_color
private

The color to use for painting the curve segment.

QPointF Frapper::SegmentGraphicsItem::m_startPoint
private

The start point to use for painting the curve segment.

QPointF Frapper::SegmentGraphicsItem::m_endPoint
private

The end point to use for painting the curve segment.

qreal Frapper::SegmentGraphicsItem::m_width
private

the width of the timeline


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