-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicsWidget.h
More file actions
45 lines (41 loc) · 1019 Bytes
/
GraphicsWidget.h
File metadata and controls
45 lines (41 loc) · 1019 Bytes
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
#ifndef GRAPHICSWIDGET_H
#define GRAPHICSWIDGET_H
#include <QWidget>
#include <QPixmap>
#include <QGridLayout>
#include <QFrame>
#include "PixmapLabel.h"
#include "SoundEffects.h"
#include "CardDealer.h"
class GraphicsWidget : public QFrame
{
Q_OBJECT
public:
explicit GraphicsWidget(QWidget *parent = 0);
~GraphicsWidget();
public slots:
void onCardClicked(PixmapLabel* actSelection);
void dealCard(CardDealer* dealer);
void setEffects(bool on){effectsOn = on;}
void dealReady();
signals:
void finished();
void result(int val);
void waitForPlayerDlg();
void play(SoundEffects::SoundId id);
void clearTable();
void firstclicked();
private:
QPixmap pixmaps[10];
QGridLayout* grid;
PixmapLabel* lastSelection;
int countFound;
int score;
QEventLoop* loop;
QTimer* timer;
SoundEffects* effects;
QThread* sndThread;
bool effectsOn;
bool firstclick;
};
#endif // GRAPHICSWIDGET_H