13 QMapPainter( QWidget * parent = 0,
const char * name = 0, WFlags f = 0);
16 template <
typename Cell >
17 void setPixmap(
unsigned int xsize,
unsigned int ysize, Cell** values);
18 template <
typename Iterator >
19 void drawPoints(
const Iterator& begin,
const Iterator& end,
unsigned char r,
unsigned char g,
unsigned char b);
20 void start(
int period);
25 virtual void paintEvent ( QPaintEvent *paintevent );
29 template <
typename Cell>
31 QSize s(xsize, ysize);
35 for (
unsigned int x=0; x<(
unsigned int)xsize; x++)
36 for (
unsigned int y=0; y<(
unsigned int)ysize; y++){
37 double v=(double) values[x][y];
40 unsigned int grayVal=(
unsigned char) (255-(
unsigned char)(255*v));
41 painter.setPen(QColor(grayVal, grayVal, grayVal));
43 painter.setPen(QColor(255, 100, 100));
45 painter.drawPoint(x,ysize-y);
49 template <
typename Iterator >
50 void QMapPainter::drawPoints(
const Iterator& begin,
const Iterator& end,
unsigned char r,
unsigned char g,
unsigned char b){
52 painter.setPen(QColor(r,g,b));
53 for (Iterator it=begin; it!=end; it++){
55 painter.drawPoint(p.
x, height()-p.
y);