void Dashboard::setPlayer(const Player *player){ this->player = player; connect(player, SIGNAL(state_changed()), this, SLOT(refresh())); connect(player, SIGNAL(kingdom_changed()), this, SLOT(updateAvatar())); updateAvatar(); }
void Dashboard::setPlayer(const ClientPlayer *player){ connect(player, SIGNAL(state_changed()), this, SLOT(refresh())); connect(player, SIGNAL(kingdom_changed()), this, SLOT(updateAvatar())); connect(player, SIGNAL(general_changed()), this, SLOT(updateAvatar())); connect(player, SIGNAL(action_taken()), this, SLOT(setActionState())); mark_item->setDocument(player->getMarkDoc()); updateAvatar(); }
void Player::setKingdom(const QString &kingdom){ if(this->kingdom != kingdom){ this->kingdom = kingdom; emit kingdom_changed(); } }