mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
add comments
This commit is contained in:
parent
277fe9b697
commit
58ec4c395f
1 changed files with 14 additions and 2 deletions
|
|
@ -100,7 +100,16 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
|
||||||
|
|
||||||
QMap<QString, QPixmap> CountryPixmapGenerator::pmCache;
|
QMap<QString, QPixmap> CountryPixmapGenerator::pmCache;
|
||||||
|
|
||||||
void SetAttrRecur(QDomElement &elem,
|
/**
|
||||||
|
* Updates tags in the svg
|
||||||
|
*
|
||||||
|
* @param elem The svg
|
||||||
|
* @param tagName tag with attribute to update
|
||||||
|
* @param attrName attribute to be updated
|
||||||
|
* @param idName id that the tag has to match
|
||||||
|
* @param attrValue the value to update the attribute to
|
||||||
|
*/
|
||||||
|
void setAttrRecur(QDomElement &elem,
|
||||||
const QString &tagName,
|
const QString &tagName,
|
||||||
const QString &attrName,
|
const QString &attrName,
|
||||||
const QString &idName,
|
const QString &idName,
|
||||||
|
|
@ -117,10 +126,13 @@ void SetAttrRecur(QDomElement &elem,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto docElem = elem.childNodes().at(i).toElement();
|
auto docElem = elem.childNodes().at(i).toElement();
|
||||||
SetAttrRecur(docElem, tagName, attrName, idName, attrValue);
|
setAttrRecur(docElem, tagName, attrName, idName, attrValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an icon of the svg that has its color filled in
|
||||||
|
*/
|
||||||
QIcon changeSVGColor(const QString &iconPath, const QString &colorLeft, const std::optional<QString> &colorRight)
|
QIcon changeSVGColor(const QString &iconPath, const QString &colorLeft, const std::optional<QString> &colorRight)
|
||||||
{
|
{
|
||||||
QFile file(iconPath);
|
QFile file(iconPath);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue