mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 11:38:49 -07:00
Add country code to user info box.
People might not know all the flags
This commit is contained in:
parent
739ca6a02e
commit
b5fbebc883
2 changed files with 6 additions and 3 deletions
|
|
@ -31,6 +31,7 @@ UserInfoBox::UserInfoBox(AbstractClient *_client, bool _fullInfo, QWidget *paren
|
|||
mainLayout->addWidget(&genderLabel2, 3, 1, 1, 2);
|
||||
mainLayout->addWidget(&countryLabel1, 4, 0, 1, 1);
|
||||
mainLayout->addWidget(&countryLabel2, 4, 1, 1, 2);
|
||||
mainLayout->addWidget(&countryLabel3, 4, 2, 1, 1);
|
||||
mainLayout->addWidget(&userLevelLabel1, 5, 0, 1, 1);
|
||||
mainLayout->addWidget(&userLevelLabel2, 5, 1, 1, 1);
|
||||
mainLayout->addWidget(&userLevelLabel3, 5, 2, 1, 1);
|
||||
|
|
@ -65,7 +66,9 @@ void UserInfoBox::updateInfo(const ServerInfo_User &user)
|
|||
nameLabel.setText(QString::fromStdString(user.name()));
|
||||
realNameLabel2.setText(QString::fromStdString(user.real_name()));
|
||||
genderLabel2.setPixmap(GenderPixmapGenerator::generatePixmap(15, user.gender()));
|
||||
countryLabel2.setPixmap(CountryPixmapGenerator::generatePixmap(15, QString::fromStdString(user.country())));
|
||||
QString country = QString::fromStdString(user.country());
|
||||
countryLabel2.setPixmap(CountryPixmapGenerator::generatePixmap(15, country));
|
||||
countryLabel3.setText(QString("(%1)").arg(country));
|
||||
userLevelLabel2.setPixmap(UserLevelPixmapGenerator::generatePixmap(15, userLevel));
|
||||
QString userLevelText;
|
||||
if (userLevel.testFlag(ServerInfo_User::IsAdmin))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue