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

kalzium

Avogadro::ElementItem

Avogadro::ElementItem Class Reference

#include <periodictableview.h>

Inheritance diagram for Avogadro::ElementItem:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Marcus D.

Hanwell An element item intended to display a single element box.

This class implements a QGraphicsItem for displaying single elements in a perdiodic table. It currently allows the setting of the proton number and gets all other information from OpenBabel.

Definition at line 46 of file libavogadro-kalzium/src/periodictableview.h.


Public Member Functions

QRectF boundingRect () const
 ElementItem (int elementNumber=0)
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
QPainterPath shape () const
 ~ElementItem ()

Constructor & Destructor Documentation

Avogadro::ElementItem::ElementItem ( int  elementNumber = 0  ) 

Constructor.

Should be called with the element number for this item. The constructor uses setData to set the element number using the key 0. This is then used by PeriodicTable to figure out which element was clicked on.

Definition at line 48 of file libavogadro-kalzium/src/periodictableview.cpp.

Avogadro::ElementItem::~ElementItem (  ) 

Definition at line 65 of file libavogadro-kalzium/src/periodictableview.cpp.


Member Function Documentation

QRectF Avogadro::ElementItem::boundingRect (  )  const

Returns:
the bounding rectangle of the element item.

Definition at line 70 of file libavogadro-kalzium/src/periodictableview.cpp.

void Avogadro::ElementItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)

This is where most of the action takes place.

The element box is drawn along with its symbol.

Reimplemented from QGraphicsItem.

Definition at line 82 of file libavogadro-kalzium/src/periodictableview.cpp.

QPainterPath Avogadro::ElementItem::shape (  )  const

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

Definition at line 75 of file libavogadro-kalzium/src/periodictableview.cpp.


The documentation for this class was generated from the following files:
  • libavogadro-kalzium/src/periodictableview.h
  • libavogadro-kalzium/src/periodictableview.cpp

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu 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