lolautoaccept/src/champrow.cpp

29 lines
567 B
C++
Raw Normal View History

#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;
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));
}
QString ChampRow::getChamp() const {
return text();
}
uint32_t ChampRow::getChampID() const {
return champid;
}
QPixmap ChampRow::getIcon() {
return icon;
}