Açıklama Yok

tessellation.h 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #ifndef TESSELATION_H
  2. #define TESSELATION_H
  3. #include <QWidget>
  4. #include <QPainter>
  5. /// \~English
  6. /// A class to create tessellations.
  7. /// \~Spanish
  8. /// Una clase para crear mosaicos
  9. class Tessellation : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. /// \fn Tessellation::Tessellation(QWidget *parent)
  14. /// \~English
  15. /// \brief Constructor. Creates a tesselation like this:
  16. /// ![http://i.imgur.com/WuMRMsi.png](http://i.imgur.com/WuMRMsi.png)
  17. /// \param parent parent of this tesselation, you should pass a reference to the window
  18. /// where this tesselation 'lives'.
  19. /// \~Spanish
  20. /// \brief Constructor. Crea un mosaico como este: ![http://i.imgur.com/WuMRMsi.png](http://i.imgur.com/WuMRMsi.png)
  21. /// \param parent padre este mosaico, debes pasar una referencia a la ventana donde este mosaico 'reside'.
  22. explicit Tessellation(QWidget *parent = 0);
  23. /// \fn int Tessellation::getRotation()
  24. /// \~English
  25. /// \brief Getter for the rotation.
  26. /// \return The rotation
  27. /// \~Spanish
  28. /// \brief Devuelve la rotacion.
  29. /// \return La rotacion
  30. int getRotation();
  31. /// \fn int Tessellation::getWidth()
  32. /// \~English
  33. /// \brief Getter for the tesseltation width
  34. /// \return tesselation width
  35. /// \~Spanish
  36. /// \brief Devuelve el ancho del mosaico
  37. /// \return ancho del mosaico
  38. int getWidth();
  39. /// \fn int Tessellation::getHeight()
  40. /// \~English
  41. /// \brief Getter for the tesseltation height
  42. /// \return tesselation height
  43. /// \~Spanish
  44. /// \brief Devuelve la altura del mosaico
  45. /// \return altura del mosaico
  46. int getHeight();
  47. /// \fn void Tessellation::setRotation(int r)
  48. /// \~English
  49. /// \brief Setter for the tesselation rotation
  50. /// \param r tessellation rotation
  51. /// \~Spanish
  52. /// \brief Ajusta la rotacion del mosaico
  53. /// \param r rotacion para el mosaico
  54. void setRotation(int r);
  55. /// \fn void Tessellation::setWidth(int w)
  56. /// \~English
  57. /// \brief Setter for the tesselation width
  58. /// \param w tessellation width
  59. /// \~Spanish
  60. /// \brief Ajusta el ancho del mosaico
  61. /// \param w Ancho del mosaico
  62. void setWidth(int w);
  63. /// \fn void Tessellation::setHeight(int h)
  64. /// \~English
  65. /// \brief Setter for the tesselation height
  66. /// \param h tessellation height
  67. /// \~Spanish
  68. /// \brief Ajusta la altura del mosaico
  69. /// \param h Altura del mosaico
  70. void setHeight(int h);
  71. signals:
  72. public slots:
  73. protected:
  74. /// \fn void Tessellation::paintEvent(QPaintEvent *)
  75. /// \~English
  76. /// \brief Paints a tessellation in the window every time that a paint event
  77. /// occurs.
  78. /// \~Spanish
  79. /// \brief Pinta un mosaico en la pantalla cada ves que ocurre un evento de
  80. /// pintar.
  81. void paintEvent(QPaintEvent *);
  82. private:
  83. int rotation; /**< tesselation rotation / rotacion del mosaico */
  84. int width, /**< tesselation width / ancho del mosaico */
  85. height; /**< tesselation height / altura del mosaico */
  86. };
  87. #endif // TESSELATION_H