Player12
An open source football management simulator
Loading...
Searching...
No Matches
player_view.cpp File Reference
#include "gui/view_models/player_view.h"
#include <algorithm>
#include <cctype>
#include "controller/game_controller.h"
#include "global/language_manager.h"
#include "gui/widgets/format.h"
#include "model/player.h"
#include "model/role_utils.h"

Namespaces

namespace  PlayerView
 Cached, display-ready player data for tables and profiles.
 

Functions

PlayerRow PlayerView::makeRow (const GameController &controller, const Player &player)
 Builds a display row for a player.
 
PositionGroup PlayerView::groupOf (PlayerRole role)
 Broad group of a role.
 
const char * PlayerView::groupKey (PositionGroup group)
 Localisation key for a position group (short label).
 
std::vector< RoleFit > PlayerView::roleFits (const Player &player, const StatsConfig &config)
 Rates the player in every broad position group with the same role-focus weights used for the overall rating, best first.
 
std::string PlayerView::statLabel (std::string_view statName)
 Localised name of a player attribute (falls back to the raw name).
 
std::string PlayerView::toLower (std::string_view text)
 Lower-cases ASCII text for case-insensitive search.