Documents > BPS V2 C++ API
BpsGraphicsSimpletextItem Class Reference

Simple text item. More...

#include <bpsgraphicsitem.h>

List of all members.

Public Member Functions

Bps::Alignment alignment () const
 BpsGraphicsSimpletextItem (QGraphicsItem *aParent=0)
 Constructor for the class.
QColor color () const
Bps::Direction direction () const
QFont font () const
BpsMargins margins () const
QRectF rect () const
int roundness () const
void setAlignment (Bps::Alignment aAlignment)
 Set new alignment withing the bounding rectangle.
void setColor (const QColor &aColor)
 Set a new text color (default = Qt::black).
void setDirection (Bps::Direction aDirection)
 Set a new direction.
void setFont (const QFont &aFont)
 Set a new font.
void setMargins (const BpsMargins &aMargins)
 Set new margins.
void setRect (const QRectF &aRect)
 Set a new rectangle for the item.
void setRoundness (int aRoundness)
 Define a new roundness for the rectangle corners.
void setText (const QString &aText)
 Set a new text.
QString text () const

Detailed Description

Simple text item.

Simple text item allows plain text in a fixed rectangle. It has options for printing in all four directions, margins, a frame, background, and positioning within the frame rectangle.


Constructor & Destructor Documentation

BpsGraphicsSimpletextItem::BpsGraphicsSimpletextItem ( QGraphicsItem *  aParent = 0)

Constructor for the class.

Parameters:
[in]aParentParent item.

Member Function Documentation

Bps::Alignment BpsGraphicsSimpletextItem::alignment ( ) const
Returns:
The current alignment within the bounding rectangle.
QColor BpsGraphicsSimpletextItem::color ( ) const
Returns:
The current text color.
Bps::Direction BpsGraphicsSimpletextItem::direction ( ) const
Returns:
The current direction.
QFont BpsGraphicsSimpletextItem::font ( ) const
Returns:
The current font.
BpsMargins BpsGraphicsSimpletextItem::margins ( ) const
Returns:
Get the current margins.
QRectF BpsGraphicsSimpletextItem::rect ( ) const
Returns:
The frame rectangle of the item.
int BpsGraphicsSimpletextItem::roundness ( ) const
Returns:
Get the current roundness.
void BpsGraphicsSimpletextItem::setAlignment ( Bps::Alignment  aAlignment)

Set new alignment withing the bounding rectangle.

Parameters:
[in]aAlignmentThe new alignment to set.
void BpsGraphicsSimpletextItem::setColor ( const QColor &  aColor)

Set a new text color (default = Qt::black).

Parameters:
[in]aColorThe new color.
void BpsGraphicsSimpletextItem::setDirection ( Bps::Direction  aDirection)

Set a new direction.

Parameters:
[in]aDirectionThe new direction to set.
void BpsGraphicsSimpletextItem::setFont ( const QFont &  aFont)

Set a new font.

Parameters:
[in]aFontThe new font.
void BpsGraphicsSimpletextItem::setMargins ( const BpsMargins aMargins)

Set new margins.

Parameters:
[in]aMarginsThe new margins to set.
void BpsGraphicsSimpletextItem::setRect ( const QRectF &  aRect)

Set a new rectangle for the item.

Parameters:
[in]aRectThe new rectangle.
void BpsGraphicsSimpletextItem::setRoundness ( int  aRoundness)

Define a new roundness for the rectangle corners.

The roundness is expressed in percent and can range from 0 to 100, where 0 is no roundness and 100 is maximum. The radius is calculated as percentage of the half of the shorter side of the rectangle.

Parameters:
[in]aRoundnessThe new roundness to set.
void BpsGraphicsSimpletextItem::setText ( const QString &  aText)

Set a new text.

Parameters:
[in]aTextThe new text to set.
QString BpsGraphicsSimpletextItem::text ( ) const
Returns:
The current text as set by application.

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