init
[aspt.git] / performance.h
1 /*******************************************************************
2 Jan Cermak | johniez | aspt.johniez.com
3 Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
4 http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
5 *******************************************************************/
6
7 #ifndef PERFORMANCETAB__H__
8 #define PERFORMANCETAB__H__
9
10 #include <QWidget>
11 #include <QComboBox>
12 #include <QVBoxLayout>
13 #include <QHBoxLayout>
14 #include <QPushButton>
15 #include <QLabel>
16 #include <QSettings>
17
18 #include "playerdetail.h"
19 #include "clubtab.h"
20
21 extern void parse(const QString &);
22 extern int playerCnt;
23 extern Player pls[];
24
25 extern ClubStruct club;
26
27 class PerformanceTab: public QWidget {
28         Q_OBJECT
29         QVBoxLayout *mainLayout;
30         QComboBox *player[11];
31         QLabel *postLabel[11];
32         QLabel *plPerfLabel[11];
33         QComboBox *orders[11];
34         QComboBox *format;
35         QComboBox *aggression;
36         QComboBox *home;
37         QHBoxLayout *plCont[11];
38         QLabel *result;
39         QPushButton *cButt;
40         QHBoxLayout *container;
41         QPushButton *reorderPl;
42         
43         double defs;    //defender points count
44         int defsC;      //count of defenders
45         double mids;    //midfield points count
46         int midsC;
47         double fors;            //forward points count
48         int forsC;
49         int aggress;    //aggression
50         
51         void countPerf();
52         void postLabels();      //redraw position labels
53         void init();
54         int findFirstOnPost(const QString &);           // find first player of
55 public:
56         PerformanceTab(QWidget *parent = 0);
57         ~PerformanceTab();
58 protected slots:
59         void formatChange(int);
60         void recount();
61         void aggressChange(int);
62         void playerChange(int);
63         void dataChanged();
64         void reorderPlayers();
65 };
66
67 #endif