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

kalzium

KalziumTableType Class Reference

#include <kalziumtabletype.h>

Inheritance diagram for KalziumTableType:

Inheritance graph
[legend]

List of all members.


Detailed Description

This is one of the most important classes.

It represents a table type, with all its attributes and metrics.

Author:
Pino Toscano

Definition at line 75 of file kalziumtabletype.h.


Public Member Functions

virtual ~KalziumTableType ()
virtual QByteArray name () const =0
virtual QString description () const =0
virtual QSize size () const =0
virtual int elementAtCoords (const QPoint &coords) const =0
virtual QRect elementRect (const int numelem) const =0
virtual QRect numerationRect (const int numelem, KalziumNumerationType *nt) const
virtual int previousOf (int element) const
virtual int nextOf (int element) const
virtual int firstElement () const
virtual QList< int > elementList () const

Static Public Member Functions

static KalziumTableType * instance ()

Protected Member Functions

 KalziumTableType ()
QPoint elementUnderMouse (const QPoint &coords) const

Protected Attributes

QList< int > m_elementList

Constructor & Destructor Documentation

KalziumTableType::~KalziumTableType (  )  [virtual]

Definition at line 191 of file kalziumtabletype.cpp.

KalziumTableType::KalziumTableType (  )  [protected]

Definition at line 187 of file kalziumtabletype.cpp.


Member Function Documentation

KalziumTableType * KalziumTableType::instance (  )  [static]

Get its instance.

Reimplemented in KalziumClassicTableType, KalziumShortTableType, KalziumDTableType, and KalziumDZTableType.

Definition at line 182 of file kalziumtabletype.cpp.

virtual QByteArray KalziumTableType::name (  )  const [pure virtual]

Returns the ID of this table type.

Mainly used when saving/loading.

Implemented in KalziumClassicTableType, KalziumShortTableType, KalziumDTableType, and KalziumDZTableType.

virtual QString KalziumTableType::description (  )  const [pure virtual]

Returns the description of this table type.

Used in all the visible places.

Implemented in KalziumClassicTableType, KalziumShortTableType, KalziumDTableType, and KalziumDZTableType.

virtual QSize KalziumTableType::size (  )  const [pure virtual]

Returns the size of this table type.

Implemented in KalziumClassicTableType, KalziumShortTableType, KalziumDTableType, and KalziumDZTableType.

virtual int KalziumTableType::elementAtCoords ( const QPoint &  coords  )  const [pure virtual]

Returns:
the number of the element at the coordinates coords.

If there is no element it will return 0. For example, for Carbon "6" will be returned

Implemented in KalziumClassicTableType, KalziumShortTableType, KalziumDTableType, and KalziumDZTableType.

virtual QRect KalziumTableType::elementRect ( const int  numelem  )  const [pure virtual]

Returns the rect for the element with atomic number numelem.

Implemented in KalziumClassicTableType, KalziumShortTableType, KalziumDTableType, and KalziumDZTableType.

QRect KalziumTableType::numerationRect ( const int  numelem,
KalziumNumerationType *  nt 
) const [virtual]

Returns the rect for the numelement 'th item of the numeration nt.

Definition at line 215 of file kalziumtabletype.cpp.

int KalziumTableType::previousOf ( int  element  )  const [virtual]

Returns the element that comes right before the specified element.

-1 means that element is the first in this table type.

The default implementation returns element - 1 if element is not 1, else -1.

Reimplemented in KalziumShortTableType, and KalziumDTableType.

Definition at line 195 of file kalziumtabletype.cpp.

int KalziumTableType::nextOf ( int  element  )  const [virtual]

Returns the element that comes right after the specified element.

-1 means that element is the last in this table type.

The default implementation returns element + 1 if element is not the latest element, else -1.

Reimplemented in KalziumShortTableType, and KalziumDTableType.

Definition at line 200 of file kalziumtabletype.cpp.

int KalziumTableType::firstElement (  )  const [virtual]

Returns the first element of the table.

The default implementation returns 1.

Reimplemented in KalziumDTableType.

Definition at line 205 of file kalziumtabletype.cpp.

QList< int > KalziumTableType::elementList (  )  const [virtual]

Returns:
the list of elements the specific KalziumTableType displays

Definition at line 210 of file kalziumtabletype.cpp.

QPoint KalziumTableType::elementUnderMouse ( const QPoint &  coords  )  const [protected]

Returns:
the coordinates of the element under the point coords.

For example, H will be 1/1 and Li will be 1/2

Definition at line 226 of file kalziumtabletype.cpp.


Member Data Documentation

QList<int> KalziumTableType::m_elementList [protected]

This QList stores the numbers of the elements the table will display.

Definition at line 154 of file kalziumtabletype.h.


The documentation for this class was generated from the following files:
  • kalziumtabletype.h
  • kalziumtabletype.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
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
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