lolautoaccept/src/champrow.cpp

29 lines
567 B
C++

#include "champrow.h"
ChampRow::ChampRow(QListWidget* parent) : QListWidgetItem(parent) {
}
ChampRow::~ChampRow() {
}
void ChampRow::setChamp(const DataDragon::ChampData& cd, QPixmap icon) {
setText(cd.name);
champid = cd.key;
this->icon = icon;
setIcon(QIcon(icon));
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;
}