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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/***************************************************************************
lskatview.h - description
-------------------
begin : Tue May 2 15:47:11 CEST 2000
copyright : (C) 2000 by Martin Heni
email : martin@heni-online.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef LSKATVIEW_H
#define LSKATVIEW_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <qwidget.h>
#include <qrect.h>
#include "lskat.h"
class LSkatDoc;
/** The LSkatView class provides the view widget for the LSkatApp instance.
* The View instance inherits QWidget as a base class and represents the view object of a KTMainWindow. As LSkatView is part of the
* docuement-view model, it needs a reference to the document object connected with it by the LSkatApp class to manipulate and display
* the document structure provided by the LSkatDoc class.
*
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 0.4 code generation
*/
class LSkatView : public QWidget
{
Q_OBJECT
public:
/** Constructor for the main view */
LSkatView(QWidget *parent = 0, const char *name=0);
/** returns a pointer to the document connected to the view instance. Mind that this method requires a LSkatApp instance as a parent
* widget to get to the window document pointer by calling the LSkatApp::getDocument() method.
*
* @see LSkatApp#getDocument
*/
LSkatDoc *getDocument() const;
void paintEvent( QPaintEvent * p);
void Paint(QPainter *p);
void InitMove(int player,int x,int y);
void updateStatus();
protected:
void drawDeck(QPainter *p);
void drawIntro(QPainter *p);
void drawMove(QPainter *p);
void drawStatus(QPainter *p);
void drawFinal(QPainter *p);
void drawBorder(QPainter *p,QRect rect,int offset,int width,int mode);
QPoint calcCardPos(int x,int y);
void mousePressEvent ( QMouseEvent *m );
protected slots:
void moveTimerReady();
void introTimerReady();
void drawTabText(QPainter *p,QRect rect,QString s,int *ts);
private:
QRect status_rect1;
QRect status_rect2;
QRect status_rect3;
QTimer *moveTimer;
QTimer *introTimer;
int introcnt;
int cardmovecnt;
int cardmovex,cardmovey;
int cardmoveunder;
QPoint cardorigin;
QPoint cardend;
int introCards[NO_OF_CARDS];
};
#endif // LSKATVIEW_H
|