FactDev  0.1
coffeeeastereggwidget.h
1 #ifndef COFFEEEASTEREGGWIDGET_H
2 #define COFFEEEASTEREGGWIDGET_H
3 
4 #include <QWidget>
5 #include <QTimer>
6 #include <QDebug>
7 #include "gui/utils/image.h"
8 
9 namespace Ui {
10 class CoffeeEasterEggWidget;
11 }
12 
13 namespace Gui {
14 namespace Widgets {
15 
20  INIT,
21  FIRST_STEP,
22  SECOND_STEP,
23  THIRD_STEP,
24  FOURTH_STEP,
25  READY
26 };
27 
33 class CoffeeEasterEggWidget : public QWidget
34 {
35  Q_OBJECT
36 
37 public:
43  explicit CoffeeEasterEggWidget(QWidget *parent = 0);
45 
49  void setupUI();
50 
55  void makeCoffeeFirstStep();
56 
61  void makeCoffeeSecondStep();
62 
67  void makeCoffeeThirdStep();
68 
73  void makeCoffeeFourthStep();
74 
79  void makeCoffeeReadyStep();
80 
86  bool isDrinked();
87 
88 public slots:
92  void makeCoffeeInProgress();
93 
98  void nextState();
99 private:
100  Ui::CoffeeEasterEggWidget *ui;
101  QTimer *_timer;
102  CoffeeState _state;
103  int _drinked;
104 };
105 }
106 }
107 
108 #endif // COFFEEEASTEREGGWIDGET_H
void makeCoffeeSecondStep()
CoffeeEasterEggWidget::makeCoffeeSecondStep Second step to make coffee.
Definition: coffeeeastereggwidget.cpp:50
The CoffeeEasterEggWidget class Easter egg class because we need coffee.
Definition: coffeeeastereggwidget.h:33
CoffeeState
The CoffeeState enum.
Definition: coffeeeastereggwidget.h:19
void makeCoffeeReadyStep()
CoffeeEasterEggWidget::makeCoffeeReadyStep Last step to make coffee.
Definition: coffeeeastereggwidget.cpp:86
void makeCoffeeFirstStep()
CoffeeEasterEggWidget::makeCoffeeFirstStep First step to make coffee.
Definition: coffeeeastereggwidget.cpp:38
void makeCoffeeInProgress()
CoffeeEasterEggWidget::makeCoffeeInProgress Make Coffee.
Definition: coffeeeastereggwidget.cpp:31
bool isDrinked()
CoffeeEasterEggWidget::isDrinked Return TRUE if coffee has been drinked, else FALSE.
Definition: coffeeeastereggwidget.cpp:106
void makeCoffeeThirdStep()
CoffeeEasterEggWidget::makeCoffeeThirdStep Third step to make coffee.
Definition: coffeeeastereggwidget.cpp:62
void nextState()
CoffeeEasterEggWidget::nextState Go to the next state to make coffee.
Definition: coffeeeastereggwidget.cpp:110
CoffeeEasterEggWidget(QWidget *parent=0)
CoffeeEasterEggWidget::CoffeeEasterEggWidget Construct a CoffeeEasterEggWidget.
Definition: coffeeeastereggwidget.cpp:6
void setupUI()
CoffeeEasterEggWidget::setupUI Init user interface.
Definition: coffeeeastereggwidget.cpp:19
void makeCoffeeFourthStep()
CoffeeEasterEggWidget::makeCoffeeFourthStep Fourth step to make coffee.
Definition: coffeeeastereggwidget.cpp:74