AccountHistorie.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. #ifndef AccountHistorie_H
  2. #define AccountHistorie_H
  3. #include <Zeichnung.h>
  4. #include <Thread.h>
  5. #include <Knopf.h>
  6. #include <Array.h>
  7. #include <AuswahlBox.h>
  8. #include <Fenster.h>
  9. #include <Animation.h>
  10. #include <AccountHistorieStatistikV.h>
  11. #include <AufzeichnungV.h>
  12. #include <Rahmen.h>
  13. using namespace Framework;
  14. class AHSpielStatistik : public Thread
  15. {
  16. private:
  17. Fenster *statistikF;
  18. Animation2D *laden;
  19. Text *dllName;
  20. HINSTANCE dllHandle;
  21. AccountHistorieStatistikV *statistik;
  22. double tickVal;
  23. unsigned char alpha;
  24. bool sichtbar;
  25. int spielId;
  26. public:
  27. // Konstruktor
  28. AHSpielStatistik();
  29. // Destruktor
  30. ~AHSpielStatistik();
  31. // nicht constant
  32. void reset();
  33. bool ladeDaten( int spielId, int spielArtId );
  34. void thread();
  35. void setPosition( int x, int y );
  36. void setSichtbar( bool sichtbar );
  37. void doPublicMausEreignis( MausEreignis &me );
  38. void doTastaturEreignis( TastaturEreignis &te );
  39. bool tick( double tickVal );
  40. void render( Bild &zRObj );
  41. // constant
  42. bool istNochSichtbar() const;
  43. };
  44. class AHSpielVideo : public Thread
  45. {
  46. private:
  47. Fenster *videoF;
  48. Animation2D *laden;
  49. Text *dllName;
  50. HINSTANCE dllHandle;
  51. AufzeichnungV *video;
  52. double tickVal;
  53. unsigned char alpha;
  54. bool sichtbar;
  55. int spielId;
  56. public:
  57. // Konstruktor
  58. AHSpielVideo();
  59. // Destruktor
  60. ~AHSpielVideo();
  61. // nicht constant
  62. void reset();
  63. bool ladeDaten( int spielId, int spielArtId );
  64. void thread();
  65. void setSichtbar( bool sichtbar );
  66. bool tick( double tickVal );
  67. void render( Bild &zRObj );
  68. // constant
  69. bool istNochSichtbar() const;
  70. };
  71. class AHSLETeamListeSpieler : public virtual ReferenceCounter
  72. {
  73. private:
  74. TextFeld *nameTF;
  75. TextFeld *punkteTF;
  76. TextFeld *statusTF;
  77. LRahmen *ram;
  78. public:
  79. // Konstruktor
  80. AHSLETeamListeSpieler( char *name, int punkte, char *status, int farbe, int br );
  81. // Destruktor
  82. ~AHSLETeamListeSpieler();
  83. // nicht constant
  84. void render( int yOff, Bild &zRObj );
  85. };
  86. class AHSLETeamListeTeam : public virtual ReferenceCounter
  87. {
  88. private:
  89. TextFeld *nameTF;
  90. TextFeld *sAnzahlTF;
  91. TextFeld *statusTF;
  92. LRahmen *ram;
  93. RCArray< AHSLETeamListeSpieler > *members;
  94. public:
  95. // Konstruktor
  96. AHSLETeamListeTeam( char *name, int sAnz, char *status, int farbe, int br );
  97. // Destruktor
  98. ~AHSLETeamListeTeam();
  99. // nicht constant
  100. void addSpieler( AHSLETeamListeSpieler *s );
  101. void render( int xOff, int yOff, Bild &zRObj );
  102. // constant
  103. int getHeight() const;
  104. };
  105. class AHSLETeamListe : public virtual ReferenceCounter
  106. {
  107. private:
  108. RCArray< AHSLETeamListeTeam > *members;
  109. int xPos;
  110. public:
  111. // Konstruktor
  112. AHSLETeamListe( int xPos );
  113. // Destruktor
  114. ~AHSLETeamListe();
  115. // nicht constant
  116. void addTeam( AHSLETeamListeTeam *t );
  117. void render( Bild &zRObj );
  118. // constant
  119. int getHeight() const;
  120. int getBreite() const;
  121. };
  122. class AHSpielListeEintrag : public virtual ReferenceCounter
  123. {
  124. private:
  125. TextFeld *spielTF;
  126. TextFeld *karteTF;
  127. TextFeld *datumTF;
  128. TextFeld *statusTF;
  129. Text *spiel;
  130. Text *karte;
  131. Text *datum;
  132. Text *status;
  133. Knopf *detailsK;
  134. TextFeld *dauerTF;
  135. TextFeld *spielStatusTF;
  136. TextFeld *gewinnerTF;
  137. TextFeld *sAnzahlTF;
  138. Knopf *statistikK;
  139. Knopf *videoK;
  140. AHSLETeamListe *liste;
  141. LRahmen *ram;
  142. Bild *einklappen;
  143. Bild *ausklappen;
  144. int karteId;
  145. int id;
  146. double tickVal;
  147. int aktion;
  148. int maxHö;
  149. public:
  150. // Konstruktor
  151. AHSpielListeEintrag( int id, int karteId, char *spiel, char *karte, char *datum, char *status,
  152. char *dauer, char *spielStatus, char *gewinner, int sAnzahl );
  153. // Destruktor
  154. ~AHSpielListeEintrag();
  155. // nicht constant
  156. void addTeam( AHSLETeamListeTeam *t );
  157. bool tick( double tickVal );
  158. void doPublicMausEreignis( MausEreignis &me );
  159. void render( int yOff, Bild &zRObj );
  160. int getAktion();
  161. // constant
  162. int getKarteId() const;
  163. int getHeight() const;
  164. int getId() const;
  165. int getListeBreite() const;
  166. Text *zSpiel() const;
  167. Text *zKarte() const;
  168. Text *zDatum() const;
  169. Text *zStatus() const;
  170. };
  171. class AHSpielListe : public Zeichnung
  172. {
  173. private:
  174. LRahmen *ram;
  175. VScrollBar *scroll;
  176. RCArray< AHSpielListeEintrag > *members;
  177. Text *sortSpalte;
  178. bool sortAbsteigend;
  179. // privat
  180. int getReihenfolge( int *arr );
  181. public:
  182. // Konstruktor
  183. AHSpielListe();
  184. // Destruktor
  185. ~AHSpielListe();
  186. // nicht constant
  187. void setSortSpalte( char *sp );
  188. void setSortRichtung( bool absteigend );
  189. void reset();
  190. void addSpiel( AHSpielListeEintrag *s );
  191. bool tick( double tickVal ) override;
  192. void doPublicMausEreignis( MausEreignis &me ) override;
  193. void render( Bild &zRObj ) override;
  194. // constant
  195. int getAktion( int *spielId, int *karteId ) const;
  196. };
  197. class AccountHistorie : public Thread
  198. {
  199. private:
  200. Fenster *historieF;
  201. AuswahlBox *sortSpalte;
  202. AuswahlBox *sortRichtung;
  203. AHSpielListe *liste;
  204. AHSpielStatistik *statistik;
  205. AHSpielVideo *video;
  206. int status;
  207. int accId;
  208. int animation;
  209. unsigned char alpha;
  210. unsigned char alpha2;
  211. unsigned char alpha3;
  212. double tickVal;
  213. bool rend;
  214. public:
  215. // Konstruktor
  216. AccountHistorie();
  217. // Destruktor
  218. ~AccountHistorie();
  219. // nicht constant
  220. void reset();
  221. void ladeStatistik( int accId );
  222. virtual void thread();
  223. void setSichtbar( bool sichtbar, bool nachRechts );
  224. bool tick( double zeit );
  225. void doPublicMausEreignis( MausEreignis &me );
  226. void doTastaturEreignis( TastaturEreignis &te );
  227. void render( Bild &zRObj );
  228. // constant
  229. int getStatus() const;
  230. };
  231. #endif