XPlor/app/techsetviewer.cpp

34 lines
1.1 KiB
C++

#include "techsetviewer.h"
#include "ui_techsetviewer.h"
TechSetViewer::TechSetViewer(QWidget *parent)
: QWidget(parent)
, ui(new Ui::TechSetViewer)
{
ui->setupUi(this);
}
TechSetViewer::~TechSetViewer()
{
delete ui;
}
void TechSetViewer::SetTechSet(const XMaterialTechniqueSet* aTechSet) {
//ui->listWidget_Ptrs->clear();
ui->label_Title->setText(aTechSet->GetName());
ui->lineEdit_TechniqueName->setText(aTechSet->DisplayName());
ui->spinBox_WorldVertFormat->setValue(aTechSet->WorldVertFormat());
for (const XMaterialTechnique &technique : aTechSet->Techniques())
{
ui->listWidget_Techniques->addItem(technique.DisplayName());
}
connect(ui->listWidget_Techniques, &QListWidget::currentRowChanged, this, [&](int aRow) {
const XMaterialTechnique &technique = aTechSet->Techniques()[aRow];
ui->lineEdit_TechniqueName->setText(technique.DisplayName());
ui->spinBox_Flags->setValue(technique.Flags());
ui->spinBox_PassCount->setValue(technique.PassCount());
});
}