summaryrefslogtreecommitdiffstats
path: root/libksirtet/common/field.h
blob: 69d11bfba3bdf5c0208474b1b65e47fef391c4bd (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef COMMON_FIELD_H
#define COMMON_FIELD_H

#include "lib/mp_simple_board.h"
#include "base/field.h"
#include "types.h"

#include "lib/libksirtet_export.h"


class ShowNextPiece;
class GiftShower;
class Shadow;
class KProgress;
class KGameProgress;
class KGameLCDClock;

class LIBKSIRTET_EXPORT Field : public MPSimpleBoard, public BaseField
{
 Q_OBJECT
  TQ_OBJECT
 public:
    Field(TQWidget *tqparent);

 public slots:
    void moveLeft();
    void moveRight();
    void dropDownStart();
    void dropDownStop();
    void oneLineDown();
    void rotateLeft();
    void rotateRight();
    void moveLeftTotal();
    void moveRightTotal();

    virtual void settingsChanged();

 protected slots:
    void scoreUpdatedSlot() { scoreUpdated(); }
    virtual void levelUpdated();
    virtual void removedUpdated();

 private:
    KGameLCDClock *showTime;
    ShowNextPiece *showNext;
    KProgress     *toLevel;
    TQLabel        *labShowNext, *levelLabel;
    KGameProgress *prevHeight, *nextHeight;
    Shadow        *shadow;
    KCanvasRootPixmap *_snRootPixmap;
    ClientPlayData _cpd;

    void _init(bool AI, bool multiplayer, bool server, bool first,
               const TQString &name);
    void showOpponents(bool show);
    void initVariableGUI();

    void _initFlag(TQDataStream &);
    void _playFlag(TQDataStream &);
    void _pauseFlag(bool pause);
    void _stopFlag(bool gameover);
    void _dataOut(TQDataStream &);
    void _gameOverDataOut(TQDataStream &);
    void _initDataOut(TQDataStream &) {}

    KExtHighscore::Score currentScore() const;
};

#endif