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 | |
| void | begin (QPaintDevice *pd) |
| QBrush | brushForElement (int element) const |
| KalziumTableType * | currentTableType () const |
| void | drawAll () |
| void | drawElement (int element, const QRect &r=QRect()) |
| void | drawElements () |
| void | drawElementSelector (int element) |
| void | drawNumeration () |
| void | end () |
| KalziumGradientType * | gradient () const |
| KalziumPainter (KalziumTableType *ktt) | |
| MODE | mode () const |
| KalziumNumerationType * | numeration () const |
| KalziumSchemeType * | scheme () const |
| void | setGradient (const QByteArray &cs) |
| void | setGradient (int cs) |
| void | setMode (MODE m) |
| void | setNumeration (const QByteArray &n) |
| void | setNumeration (int n) |
| void | setScheme (const QByteArray &s) |
| void | setScheme (int s) |
| void | setTableType (KalziumTableType *ktt) |
| void | setTemperature (int temp) |
| void | setTime (int time) |
| int | temperature () const |
| int | time () const |
| virtual | ~KalziumPainter () |
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 51 of file kalziumpainter.cpp.
| virtual KalziumPainter::~KalziumPainter | ( | ) | [inline, virtual] |
Definition at line 65 of file kalziumpainter.h.
Member Function Documentation
| void KalziumPainter::begin | ( | QPaintDevice * | pd | ) |
| QBrush KalziumPainter::brushForElement | ( | int | element | ) | const |
Definition at line 362 of file kalziumpainter.cpp.
| KalziumTableType * KalziumPainter::currentTableType | ( | ) | const |
Definition at line 82 of file kalziumpainter.cpp.
| void KalziumPainter::drawAll | ( | ) |
Draw all the things it can: elements and numeration.
Definition at line 87 of file kalziumpainter.cpp.
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 108 of file kalziumpainter.cpp.
| void KalziumPainter::drawElements | ( | ) |
| void KalziumPainter::drawElementSelector | ( | int | element | ) |
Paint a marker around the element number element.
Definition at line 264 of file kalziumpainter.cpp.
| void KalziumPainter::drawNumeration | ( | ) |
| void KalziumPainter::end | ( | ) |
| KalziumGradientType * KalziumPainter::gradient | ( | ) | const |
Definition at line 334 of file kalziumpainter.cpp.
| MODE KalziumPainter::mode | ( | ) | const [inline] |
| KalziumNumerationType* KalziumPainter::numeration | ( | ) | const [inline] |
Definition at line 140 of file kalziumpainter.h.
| KalziumSchemeType * KalziumPainter::scheme | ( | ) | const |
Definition at line 311 of file kalziumpainter.cpp.
| void KalziumPainter::setGradient | ( | const QByteArray & | cs | ) |
Definition at line 325 of file kalziumpainter.cpp.
| void KalziumPainter::setGradient | ( | int | cs | ) |
Definition at line 316 of file kalziumpainter.cpp.
| void KalziumPainter::setMode | ( | MODE | m | ) |
Definition at line 288 of file kalziumpainter.cpp.
| void KalziumPainter::setNumeration | ( | const QByteArray & | n | ) |
Definition at line 348 of file kalziumpainter.cpp.
| void KalziumPainter::setNumeration | ( | int | n | ) |
| void KalziumPainter::setScheme | ( | const QByteArray & | s | ) |
Definition at line 302 of file kalziumpainter.cpp.
| void KalziumPainter::setScheme | ( | int | s | ) |
Definition at line 293 of file kalziumpainter.cpp.
| void KalziumPainter::setTableType | ( | KalziumTableType * | ktt | ) | [inline] |
Definition at line 67 of file kalziumpainter.h.
| void KalziumPainter::setTemperature | ( | int | temp | ) |
Definition at line 357 of file kalziumpainter.cpp.
| void KalziumPainter::setTime | ( | int | time | ) | [inline] |
Definition at line 150 of file kalziumpainter.h.
| int KalziumPainter::temperature | ( | ) | const [inline] |
Definition at line 146 of file kalziumpainter.h.
| int KalziumPainter::time | ( | ) | const [inline] |
Definition at line 154 of file kalziumpainter.h.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference