summaryrefslogtreecommitdiffstats
path: root/ktuberling/todraw.h
blob: 4e46200a5454ef06be9404b77caa033d5e0e515d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* -------------------------------------------------------------
   KDE Tuberling
   Object to draw on the game board
   mailto:e.bischoff@noos.fr
 ------------------------------------------------------------- */


#ifndef _TODRAW_H_
#define _TODRAW_H_

#include <qrect.h>

#include <stdio.h>

class ToDraw
{
  public:
    ToDraw();
    ToDraw(const ToDraw &);
    ToDraw(int, const QRect &);
    ToDraw &operator=(const ToDraw &);
    void draw(QPainter &, const QRect &, const QRect *, const QPixmap *, const QBitmap *) const;
    void save(FILE *) const;
    bool load(FILE *, int, bool &);

    inline int getNumber() const { return number; }
    inline void setNumber(int newValue) { number = newValue; }
    inline const QRect &getPosition() const { return position; }

  private:
    int number;
    QRect position;
};

#endif