kalzium
KalziumPainter Class Reference
#include <kalziumpainter.h>
Detailed Description
The KalziumPainter is /the/ way to draw a table, any kind of it.One of the best features of it is that you can construct it once and do multiple drawing session without destroying it.
A typical usage would be:
// build the classic periodic table KalziumTableType *table = KalziumTableTypeFactory::instance()->build( "Classic" ); // creating the painter with the table type KalziumPainter painter = new KalziumPainter( table ); // setting the various options ... painter->begin( widget/pixmap/paintdevice ); painter->drawAll(); // draw the element selector for the element with atomic number 20 (Calcium) painter->drawElementSelector( 20 ); painter->end();
Definition at line 58 of file kalziumpainter.h.
Public Types | |
| enum | MODE { NORMAL = 0, SOM, TIME, GRADIENT } |
Public Member Functions | |
| KalziumPainter (KalziumTableType *ktt) | |
| virtual | ~KalziumPainter () |
| void | setTableType (KalziumTableType *ktt) |
| void | begin (QPaintDevice *pd) |
| void | end () |
| KalziumTableType * | currentTableType () const |
| void | drawAll () |
| void | drawElements () |
| void | drawElement (int element, const QRect &r=QRect()) |
| void | drawNumeration () |
| void | drawElementSelector (int element) |
| void | setMode (MODE m) |
| MODE | mode () const |
| void | setScheme (int s) |
| void | setScheme (const QByteArray &s) |
| KalziumSchemeType * | scheme () const |
| void | setGradient (int cs) |
| void | setGradient (const QByteArray &cs) |
| KalziumGradientType * | gradient () const |
| void | setNumeration (int n) |
| void | setNumeration (const QByteArray &n) |
| KalziumNumerationType * | numeration () const |
| void | setTemperature (int temp) |
| int | temperature () const |
| void | setTime (int time) |
| int | time () const |
| QBrush | brushForElement (int element) const |
Member Enumeration Documentation
| enum KalziumPainter::MODE |
Definition at line 71 of file kalziumpainter.h.
Constructor & Destructor Documentation
| KalziumPainter::KalziumPainter | ( | KalziumTableType * | ktt | ) |
Construct a new KalziumPainter for the table type ktt.
Definition at line 50 of file kalziumpainter.cpp.
| virtual KalziumPainter::~KalziumPainter | ( | ) | [inline, virtual] |
Definition at line 65 of file kalziumpainter.h.
Member Function Documentation
| void KalziumPainter::setTableType | ( | KalziumTableType * | ktt | ) | [inline] |
Definition at line 67 of file kalziumpainter.h.
| void KalziumPainter::begin | ( | QPaintDevice * | pd | ) |
| void KalziumPainter::end | ( | ) |
| KalziumTableType * KalziumPainter::currentTableType | ( | ) | const |
Definition at line 81 of file kalziumpainter.cpp.
| void KalziumPainter::drawAll | ( | ) |
Draw all the things it can: elements and numeration.
Definition at line 86 of file kalziumpainter.cpp.
| void KalziumPainter::drawElements | ( | ) |
Draw the element with atomic number element.
Pass a QRect() to the r parameter if you want to use the default rect for that element.
Definition at line 107 of file kalziumpainter.cpp.
| void KalziumPainter::drawNumeration | ( | ) |
| void KalziumPainter::drawElementSelector | ( | int | element | ) |
Paint a marker around the element number element.
Definition at line 263 of file kalziumpainter.cpp.
| void KalziumPainter::setMode | ( | MODE | m | ) |
Definition at line 285 of file kalziumpainter.cpp.
| MODE KalziumPainter::mode | ( | ) | const [inline] |
| void KalziumPainter::setScheme | ( | int | s | ) |
Definition at line 290 of file kalziumpainter.cpp.
| void KalziumPainter::setScheme | ( | const QByteArray & | s | ) |
Definition at line 299 of file kalziumpainter.cpp.
| KalziumSchemeType * KalziumPainter::scheme | ( | ) | const |
Definition at line 308 of file kalziumpainter.cpp.
| void KalziumPainter::setGradient | ( | int | cs | ) |
Definition at line 313 of file kalziumpainter.cpp.
| void KalziumPainter::setGradient | ( | const QByteArray & | cs | ) |
Definition at line 322 of file kalziumpainter.cpp.
| KalziumGradientType * KalziumPainter::gradient | ( | ) | const |
Definition at line 331 of file kalziumpainter.cpp.
| void KalziumPainter::setNumeration | ( | int | n | ) |
| void KalziumPainter::setNumeration | ( | const QByteArray & | n | ) |
Definition at line 345 of file kalziumpainter.cpp.
| KalziumNumerationType* KalziumPainter::numeration | ( | ) | const [inline] |
Definition at line 140 of file kalziumpainter.h.
| void KalziumPainter::setTemperature | ( | int | temp | ) |
Definition at line 354 of file kalziumpainter.cpp.
| int KalziumPainter::temperature | ( | ) | const [inline] |
Definition at line 146 of file kalziumpainter.h.
| void KalziumPainter::setTime | ( | int | time | ) | [inline] |
Definition at line 150 of file kalziumpainter.h.
| int KalziumPainter::time | ( | ) | const [inline] |
Definition at line 154 of file kalziumpainter.h.
| QBrush KalziumPainter::brushForElement | ( | int | element | ) | const |
Definition at line 359 of file kalziumpainter.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference