|
|
#include "fakestardundeespwusbgui.h"
|
|
|
#include "ui_fakestardundeespwusbgui.h"
|
|
|
#include "fakestardundeespwusb_lib.h"
|
|
|
|
|
|
FakeStardundeeSpwUsbGui::FakeStardundeeSpwUsbGui(QWidget *parent) :
|
|
|
QWidget(parent),
|
|
|
ui(new Ui::FakeStardundeeSpwUsbGui)
|
|
|
{
|
|
|
ui->setupUi(this);
|
|
|
}
|
|
|
|
|
|
FakeStardundeeSpwUsbGui::~FakeStardundeeSpwUsbGui()
|
|
|
{
|
|
|
delete ui;
|
|
|
}
|
|
|
|
|
|
void FakeStardundeeSpwUsbGui::update()
|
|
|
{
|
|
|
const QList<funcToresolve> stat=FakeStarDundeeSpwUSB_Lib::status();
|
|
|
QTableWidgetItem* item;
|
|
|
this->ui->symbolsList->clear();
|
|
|
this->ui->symbolsList->setHorizontalHeaderLabels(QStringList()<<"Symbol"<<"Status");
|
|
|
this->ui->symbolsList->setRowCount(stat.count());
|
|
|
for(int i=0;i<stat.count();i++)
|
|
|
{
|
|
|
item=new QTableWidgetItem(stat[i].symbolName);
|
|
|
item->setFlags(item->flags()^Qt::ItemIsEditable);
|
|
|
this->ui->symbolsList->setItem(i,0,item);
|
|
|
if(*(stat[i].function)==NULL)
|
|
|
{
|
|
|
item=new QTableWidgetItem("Not found");
|
|
|
item->setForeground(Qt::red);
|
|
|
item->setFlags(item->flags()^Qt::ItemIsEditable);
|
|
|
this->ui->symbolsList->setItem(i,1,item);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
item=new QTableWidgetItem("Loaded");
|
|
|
item->setForeground(Qt::green);
|
|
|
item->setFlags(item->flags()^Qt::ItemIsEditable);
|
|
|
this->ui->symbolsList->setItem(i,1,item);
|
|
|
}
|
|
|
}
|
|
|
this->ui->symbolsList->resizeColumnsToContents();
|
|
|
}
|
|
|
|
|
|
void FakeStardundeeSpwUsbGui::changeEvent(QEvent *e)
|
|
|
{
|
|
|
QWidget::changeEvent(e);
|
|
|
switch (e->type()) {
|
|
|
case QEvent::LanguageChange:
|
|
|
ui->retranslateUi(this);
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|