Diffstat (limited to 'noncore/games/kcheckers/field.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/kcheckers/field.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/noncore/games/kcheckers/field.h b/noncore/games/kcheckers/field.h index d929e49..297d94e 100644 --- a/noncore/games/kcheckers/field.h +++ b/noncore/games/kcheckers/field.h | |||
@@ -7,21 +7,38 @@ | |||
7 | 7 | ||
8 | #define SIZE 28 | 8 | #define SIZE 28 |
9 | 9 | ||
10 | class Field:public QWidget | 10 | class Field:public QWidget |
11 | { | 11 | { |
12 | Q_OBJECT | 12 | Q_OBJECT |
13 | public: | 13 | public: |
14 | Field(QWidget*,int); | 14 | Field(QWidget*,int); |
15 | void draw(QImage*); | 15 | |
16 | void setFrame(QImage*); | ||
17 | void setPicture(QImage*); | ||
18 | void setPattern(QImage*); | ||
19 | void setLabel(const QString &); | ||
20 | |||
16 | signals: | 21 | signals: |
17 | void click(int); | 22 | void click(int); |
23 | |||
18 | protected: | 24 | protected: |
19 | void paintEvent(QPaintEvent*); | 25 | void paintEvent(QPaintEvent*); |
20 | void mousePressEvent(QMouseEvent*); | 26 | void mousePressEvent(QMouseEvent*); |
27 | |||
21 | private: | 28 | private: |
29 | void draw(); | ||
30 | |||
22 | int number; | 31 | int number; |
32 | |||
33 | // pixmap = pattern + label + picture + frame; | ||
34 | |||
35 | QImage* frame; | ||
36 | QImage* picture; | ||
37 | QImage* pattern; | ||
38 | QString label; | ||
39 | |||
23 | QPixmap *pixmap; | 40 | QPixmap *pixmap; |
24 | 41 | ||
25 | }; | 42 | }; |
26 | 43 | ||
27 | #endif | 44 | #endif |