-
Notifications
You must be signed in to change notification settings - Fork 2
/
plantcard.h
49 lines (43 loc) · 929 Bytes
/
plantcard.h
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
#ifndef PLANTCARD_H
#define PLANTCARD_H
#include <QtGui>
#include "sunlight.h"
#include "timer.h"
class Plant;
class PlantCard : public QWidget
{
Q_OBJECT
public:
explicit PlantCard(QString plantName, int sun, int time, SunLight *parent);
~PlantCard();
const QString name;
QPushButton* button;
Timer* timer;
QProgressBar* bar;
int getSunNeeded();
signals:
void tryPlanting(Plant* plant, PlantCard* card);
public slots:
void restart();
void pause();
void restore();
void destroyMe();
void recharge(void);
void sunUpdate(int num);
void charging(void);
protected:
int waiting;
int sunNeeded;
QPixmap* pixmap;
QVBoxLayout* layout;
bool paused;
private slots:
void buttonEnable(void);
void buttonClicked(void);
private:
const int rechargeTime;
int sunCost;
SunLight* theSun;
bool sufficientSun;
};
#endif // PLANTCARD_H