2022-07-02 22:25:20 +02:00
|
|
|
#include "champrow.h"
|
|
|
|
|
|
|
|
ChampRow::ChampRow(QListWidget* parent) : QListWidgetItem(parent) {
|
|
|
|
}
|
|
|
|
|
|
|
|
ChampRow::~ChampRow() {
|
|
|
|
}
|
|
|
|
|
2022-08-28 01:43:14 +02:00
|
|
|
void ChampRow::setChamp(const DataDragon::ChampData& cd, QPixmap icon) {
|
2023-05-31 22:22:23 +02:00
|
|
|
setText(cd.name);
|
2022-08-28 01:43:14 +02:00
|
|
|
champid = cd.key;
|
2022-07-02 22:25:20 +02:00
|
|
|
this->icon = icon;
|
|
|
|
setIcon(QIcon(icon));
|
2022-08-28 01:43:14 +02:00
|
|
|
|
2023-05-31 22:22:23 +02:00
|
|
|
setToolTip(QWidget::tr("Champion: %1\nType: %2\nTitle: %3\nID: %4").arg(cd.name).arg(cd.partype).arg(cd.title).arg(cd.key));
|
2022-07-02 22:25:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
QString ChampRow::getChamp() const {
|
|
|
|
return text();
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t ChampRow::getChampID() const {
|
|
|
|
return champid;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap ChampRow::getIcon() {
|
|
|
|
return icon;
|
|
|
|
}
|