#include "playertab.h"
+/**
+ * \brief Player Container constructor.
+ *
+ * Add player to adequate Tab by player possition (GK, LB etc.).
+ */
PlayerCont::PlayerCont(int pos, QWidget *parent) : QWidget(parent) {
tabWidget = new QTabWidget;
tabWidget->setTabPosition(QTabWidget::West);
setLayout(mainLayout);
}
+/**
+ * \brief Player Container destructor.
+ */
PlayerCont::~PlayerCont() {
delete tabWidget;
delete mainLayout;
}
+/**
+ * \brief Players Tab constructor.
+ *
+ * Hold player possition Tabs (GK, LB...).
+ */
PlayerTab::PlayerTab(QWidget *parent) : QWidget(parent) {
initTabs();
}
+/**
+ * \brief Players Tab destructor.
+ */
PlayerTab::~PlayerTab() {
delete tabWidget;
delete mainLayout;
}
+/**
+ * \brief Init Player Tab - add Tabs with player possition.
+ */
void PlayerTab::initTabs() {
tabWidget = new QTabWidget;
tabWidget->setTabPosition(QTabWidget::North);
setLayout(mainLayout);
}
+/**
+ * \brief Slot assigned to data change action.
+ */
void PlayerTab::dataChanged() {
rebuildUI();
}
+/**
+ * \brief Redraw UI with new data.
+ */
void PlayerTab::rebuildUI() {
delete tabWidget;
delete mainLayout;