mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-24 10:23:02 -07:00
[Client] Rename LocalizedCard:: helpers namespace to CardLocalization
The namespace now matches its header file name, as the review pointed out; LocalizedCard reads more like a class or struct. Callers (card info text widget, board card name rendering) are updated to match.
This commit is contained in:
parent
c35aff8b7f
commit
1b4ea4297f
3 changed files with 5 additions and 5 deletions
|
|
@ -174,7 +174,7 @@ void AbstractCardItem::paintPicture(QPainter *painter, const QSizeF &translatedS
|
||||||
if (SettingsCache::instance().debug().getShowCardId()) {
|
if (SettingsCache::instance().debug().getShowCardId()) {
|
||||||
prefix = "#" + QString::number(id) + " ";
|
prefix = "#" + QString::number(id) + " ";
|
||||||
}
|
}
|
||||||
nameStr = prefix + LocalizedCard::displayName(getCardInfo());
|
nameStr = prefix + CardLocalization::displayName(getCardInfo());
|
||||||
}
|
}
|
||||||
painter->drawText(QRectF(3 * scaleFactor, 3 * scaleFactor, translatedSize.width() - 6 * scaleFactor,
|
painter->drawText(QRectF(3 * scaleFactor, 3 * scaleFactor, translatedSize.width() - 6 * scaleFactor,
|
||||||
translatedSize.height() - 6 * scaleFactor),
|
translatedSize.height() - 6 * scaleFactor),
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <libcockatrice/card/card_info.h>
|
#include <libcockatrice/card/card_info.h>
|
||||||
#include <libcockatrice/settings/cards_display_settings.h>
|
#include <libcockatrice/settings/cards_display_settings.h>
|
||||||
|
|
||||||
namespace LocalizedCard
|
namespace CardLocalization
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief The language code selected for localized card text and images.
|
* @brief The language code selected for localized card text and images.
|
||||||
|
|
@ -54,6 +54,6 @@ inline QString displayText(const CardInfo &card)
|
||||||
{
|
{
|
||||||
return card.getLocalizedText(displayLang());
|
return card.getLocalizedText(displayLang());
|
||||||
}
|
}
|
||||||
} // namespace LocalizedCard
|
} // namespace CardLocalization
|
||||||
|
|
||||||
#endif // COCKATRICE_CARD_LOCALIZATION_H
|
#endif // COCKATRICE_CARD_LOCALIZATION_H
|
||||||
|
|
@ -67,7 +67,7 @@ void CardInfoTextWidget::setCard(const ExactCard &exactCard)
|
||||||
|
|
||||||
QString text = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=0>";
|
QString text = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=0>";
|
||||||
text += QString("<tr><td>%1</td><td width=\"5\"></td><td>%2</td></tr>")
|
text += QString("<tr><td>%1</td><td width=\"5\"></td><td>%2</td></tr>")
|
||||||
.arg(tr("Name:"), LocalizedCard::displayName(card).toHtmlEscaped());
|
.arg(tr("Name:"), CardLocalization::displayName(card).toHtmlEscaped());
|
||||||
|
|
||||||
if (!exactCard.getPrinting().isEmpty()) {
|
if (!exactCard.getPrinting().isEmpty()) {
|
||||||
QString setShort = exactCard.getPrinting().getSet()->getShortName().toHtmlEscaped();
|
QString setShort = exactCard.getPrinting().getSet()->getShortName().toHtmlEscaped();
|
||||||
|
|
@ -101,7 +101,7 @@ void CardInfoTextWidget::setCard(const ExactCard &exactCard)
|
||||||
}
|
}
|
||||||
|
|
||||||
text += "</table>";
|
text += "</table>";
|
||||||
setTexts(text, LocalizedCard::displayText(card));
|
setTexts(text, CardLocalization::displayText(card));
|
||||||
currentCard = exactCard;
|
currentCard = exactCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue