Advertisement
Rapido

clases.h

Oct 12th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.57 KB | None | 0 0
  1. #ifndef CLASES_H
  2. #define CLASES_H
  3.  
  4. #include <QGraphicsRectItem>
  5. #include <QGraphicsScene>
  6. #include <QGraphicsTextItem>
  7. #include <QObject>
  8. #include <QTime>
  9. #include <QTimer>
  10. #include <QBrush>
  11. #include <QColor>
  12. #include <QDebug>
  13. #include <QString>
  14.  
  15. #define ArraySize(array) ((int)(sizeof(array)/sizeof(array[0])))
  16.  
  17. //=============PANEL DE NUMEROS SORTEADOS=====================
  18. class Panel_sort : public QObject
  19. {
  20.     Q_OBJECT
  21. public:
  22.     bool numeros[61];
  23.     QGraphicsTextItem text[61];
  24.     Panel_sort(QGraphicsRectItem *rectangulo);
  25.     void reset();
  26. public slots:
  27.     void refresh_seed();
  28.     void nuevo_numero();
  29. };
  30. //===============================================
  31.  
  32. //===============CARTONES (PAPELETAS CON LOS NUMEROS)================================
  33. class Carton
  34. {
  35. public:
  36.     QGraphicsTextItem numeros[15];
  37.     int int_numeros[15];
  38.     Carton(QGraphicsRectItem *rectangulo);
  39.     QGraphicsScene *m_scene;
  40.     void Nuevo_Carton();
  41. };
  42. //===============================================
  43.  
  44. //===============  JUEGO  ================================
  45. class Game : public QObject
  46. {
  47.     Q_OBJECT
  48. public:
  49.     QTimer t;
  50.     bool lineas[3], bingo;
  51.     int numeros_lanzados, score;
  52.     QGraphicsTextItem num_lanz, score_text, message;
  53.     Panel_sort *m_sorteo;
  54.     Carton *m_carton;
  55.     Game(Panel_sort *num_sort, Carton *carton);
  56.     QTimer mt;
  57.     int message_step;
  58.     void mensaje(QString text);
  59.     void partida();
  60. public slots:
  61.     void lanzada();
  62.     void mensaje_slot();
  63. };
  64. //===============================================
  65.  
  66.  
  67. #endif // CLASES_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement