mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
support for women
This commit is contained in:
parent
4777d18fe3
commit
b7ab2d97bd
29 changed files with 5743 additions and 1965 deletions
|
|
@ -17,6 +17,8 @@ UserInfoBox::UserInfoBox(AbstractClient *_client, bool _fullInfo, QWidget *paren
|
|||
nameLabel->setFont(nameFont);
|
||||
realNameLabel1 = new QLabel;
|
||||
realNameLabel2 = new QLabel;
|
||||
genderLabel1 = new QLabel;
|
||||
genderLabel2 = new QLabel;
|
||||
countryLabel1 = new QLabel;
|
||||
countryLabel2 = new QLabel;
|
||||
userLevelLabel1 = new QLabel;
|
||||
|
|
@ -28,11 +30,13 @@ UserInfoBox::UserInfoBox(AbstractClient *_client, bool _fullInfo, QWidget *paren
|
|||
mainLayout->addWidget(nameLabel, 1, 0, 1, 3);
|
||||
mainLayout->addWidget(realNameLabel1, 2, 0, 1, 1);
|
||||
mainLayout->addWidget(realNameLabel2, 2, 1, 1, 2);
|
||||
mainLayout->addWidget(countryLabel1, 3, 0, 1, 1);
|
||||
mainLayout->addWidget(countryLabel2, 3, 1, 1, 2);
|
||||
mainLayout->addWidget(userLevelLabel1, 4, 0, 1, 1);
|
||||
mainLayout->addWidget(userLevelLabel2, 4, 1, 1, 1);
|
||||
mainLayout->addWidget(userLevelLabel3, 4, 2, 1, 1);
|
||||
mainLayout->addWidget(genderLabel1, 3, 0, 1, 1);
|
||||
mainLayout->addWidget(genderLabel2, 3, 1, 1, 2);
|
||||
mainLayout->addWidget(countryLabel1, 4, 0, 1, 1);
|
||||
mainLayout->addWidget(countryLabel2, 4, 1, 1, 2);
|
||||
mainLayout->addWidget(userLevelLabel1, 5, 0, 1, 1);
|
||||
mainLayout->addWidget(userLevelLabel2, 5, 1, 1, 1);
|
||||
mainLayout->addWidget(userLevelLabel3, 5, 2, 1, 1);
|
||||
mainLayout->setColumnStretch(2, 10);
|
||||
|
||||
setWindowTitle(tr("User information"));
|
||||
|
|
@ -43,6 +47,7 @@ UserInfoBox::UserInfoBox(AbstractClient *_client, bool _fullInfo, QWidget *paren
|
|||
void UserInfoBox::retranslateUi()
|
||||
{
|
||||
realNameLabel1->setText(tr("Real name:"));
|
||||
genderLabel1->setText(tr("Gender:"));
|
||||
countryLabel1->setText(tr("Location:"));
|
||||
userLevelLabel1->setText(tr("User level:"));
|
||||
}
|
||||
|
|
@ -58,13 +63,14 @@ void UserInfoBox::updateInfo(ServerInfo_User *user)
|
|||
|
||||
nameLabel->setText(user->getName());
|
||||
realNameLabel2->setText(user->getRealName());
|
||||
genderLabel2->setPixmap(GenderPixmapGenerator::generatePixmap(15, user->getGender()));
|
||||
countryLabel2->setPixmap(CountryPixmapGenerator::generatePixmap(15, user->getCountry()));
|
||||
userLevelLabel2->setPixmap(UserLevelPixmapGenerator::generatePixmap(15, userLevel));
|
||||
QString userLevelText;
|
||||
if (userLevel & ServerInfo_User::IsAdmin)
|
||||
userLevelText = tr("Administrator");
|
||||
else if (userLevel & ServerInfo_User::IsJudge)
|
||||
userLevelText = tr("Judge");
|
||||
else if (userLevel & ServerInfo_User::IsModerator)
|
||||
userLevelText = tr("Moderator");
|
||||
else if (userLevel & ServerInfo_User::IsRegistered)
|
||||
userLevelText = tr("Registered user");
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue