Loading...
Searching...
No Matches
ElementDetail Class Reference
Inheritance diagram for ElementDetail:

## Public Member Functions

| ElementDetail (int elementNumber=0)
QRectF | boundingRect () const override
QPainterPath | shape () const override
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void | setElement (int element)

## Constructor & Destructor Documentation

## ElementDetail()

ElementDetail | ( | int | elementNumber = 0 | ) |

explicit

Constructor. Should be called with the element number for this item.

## Member Function Documentation

## boundingRect()

QRectF boundingRect | ( |  | ) | const

override

Returns
  the bounding rectangle of the element item.

## shape()

QPainterPath shape | ( |  | ) | const

override

Returns
  the painter path which is also a rectangle in this case.

## paint()

void paint | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget )

override

This is where most of the action takes place. The element box is drawn along with its symbol, proton number, mass and full name.

## setElement()

void setElement | ( | int | element | ) |

Change the element displayed in the detail object.

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

- elementdetail_p.h