Class Avogadro::QtGui::ElementDetail#

class Avogadro::QtGui::ElementDetail : public QGraphicsItem#

Public Functions

explicit ElementDetail(int elementNumber = 0)#

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

QRectF boundingRect() const override#
Returns

the bounding rectangle of the element item.

QPainterPath shape() const override#
Returns

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

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.

void setElement(int element)#

Change the element displayed in the detail object.