00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef PLAYERLINEWIDGET_HH_
00017 #define PLAYERLINEWIDGET_HH_
00018
00019 #include <vector>
00020
00021 #include "pgthemewidget.h"
00022 #include "pglabel.h"
00023 #include "pgdropdown.h"
00024 #include "pglineedit.h"
00025 #include "pglistboxbaseitem.h"
00026 #include "pgbutton.h"
00027
00028 #include "TeamrosterApp.hh"
00029 #include "../../common/Position.hh"
00030 #include "../../common/Player.hh"
00031
00032 class PlayerLineWidget : public PG_ThemeWidget
00033 {
00034 public:
00035
00036
00037
00038 PlayerLineWidget(TeamrosterApp *app, PG_Widget *parent,PG_Rect rect, Player *player);
00039 virtual ~PlayerLineWidget();
00040
00041 void updatePositionsList(std::vector<Position> vPoss);
00042
00043 void updateModel(Player* player);
00044 void updateView();
00045
00046 private:
00047 void displayError(const char* msg);
00048
00049
00050
00051
00052 bool handleEditName(PG_LineEdit* edit);
00053 bool handleSelectItemPosition(PG_ListBoxBaseItem* item);
00054 bool handleEditMa(PG_LineEdit* edit);
00055 bool handleEditSt(PG_LineEdit* edit);
00056 bool handleEditAg(PG_LineEdit* edit);
00057 bool handleEditAv(PG_LineEdit* edit);
00058
00059 bool handleEditComp(PG_LineEdit* edit);
00060 bool handleEditTd(PG_LineEdit* edit);
00061 bool handleEditInter(PG_LineEdit* edit);
00062 bool handleEditCasual(PG_LineEdit* edit);
00063 bool handleEditMvp(PG_LineEdit* edit);
00064
00065 bool handleButtonSkillsClick(PG_Button* button);
00066 bool handleButtonInjuriesClick(PG_Button* button);
00067
00068
00069
00070
00071 Player* player_;
00072
00073 PG_Widget* parent_;
00074
00075 PG_LineEdit* name_;
00076 PG_DropDown* position_;
00077 PG_LineEdit* movementAllowance_;
00078 PG_LineEdit* strength_;
00079 PG_LineEdit* agility_;
00080 PG_LineEdit* armourValue_;
00081 PG_LineEdit* skills_;
00082 PG_Button* skillsBtn_;
00083 PG_LineEdit* injuries_;
00084 PG_Button* injuriesBtn_;
00085 PG_LineEdit* completions_;
00086 PG_LineEdit* touchdowns_;
00087 PG_LineEdit* interceptions_;
00088 PG_LineEdit* casualties_;
00089 PG_LineEdit* mostValuablePlayer_;
00090 PG_Label* starPlayerPoints_;
00091 PG_Label* value_;
00092 };
00093
00094 #endif