AccountHistorie.h 5.8 KB

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