| 2389 | QList<BufferViewer *> BufferViewer::m_CBufferViews; |
| 2390 | |
| 2391 | BufferViewer::BufferViewer(ICaptureContext &ctx, bool meshview, QWidget *parent) |
| 2392 | : QFrame(parent), ui(new Ui::BufferViewer), m_Ctx(ctx) |
| 2393 | { |
| 2394 | ui->setupUi(this); |
| 2395 | |
| 2396 | ui->render->SetContext(m_Ctx); |
| 2397 | |
| 2398 | byteRangeStart = (RDSpinBox64 *)ui->byteRangeStart; |
| 2399 | byteRangeLength = (RDSpinBox64 *)ui->byteRangeLength; |
| 2400 | |
| 2401 | byteRangeStart->configure(); |
| 2402 | byteRangeLength->configure(); |
| 2403 | |
| 2404 | byteRangeStart->setMinimum(0ULL); |
| 2405 | byteRangeLength->setMinimum(0ULL); |
| 2406 | |
| 2407 | m_ModelIn = new BufferItemModel(ui->inTable, true, meshview, this); |
| 2408 | m_ModelOut1 = new BufferItemModel(ui->out1Table, false, meshview, this); |
| 2409 | m_ModelOut2 = new BufferItemModel(ui->out2Table, false, meshview, this); |
| 2410 | |
| 2411 | if(meshview) |
| 2412 | { |
| 2413 | ui->inTable->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); |
| 2414 | ui->inTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); |
| 2415 | ui->out1Table->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); |
| 2416 | ui->out1Table->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); |
| 2417 | ui->out2Table->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); |
| 2418 | ui->out2Table->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); |
| 2419 | } |
| 2420 | |
| 2421 | m_MeshDebugSelector = new ComputeDebugSelector(this); |
| 2422 | |
| 2423 | // we keep the old UI names for serialised layouts compatibility |
| 2424 | QString containerNames[] = { |
| 2425 | lit("vsinData"), |
| 2426 | lit("vsoutData"), |
| 2427 | lit("gsoutData"), |
| 2428 | }; |
| 2429 | |
| 2430 | for(size_t i = 0; i < 3; i++) |
| 2431 | { |
| 2432 | m_Containers[i] = new QWidget(this); |
| 2433 | // for layout compatibility |
| 2434 | m_Containers[i]->setObjectName(containerNames[i]); |
| 2435 | |
| 2436 | QVBoxLayout *layout = new QVBoxLayout(m_Containers[i]); |
| 2437 | layout->setSpacing(0); |
| 2438 | layout->setContentsMargins(0, 0, 0, 0); |
| 2439 | } |
| 2440 | |
| 2441 | if(meshview) |
| 2442 | { |
| 2443 | m_Containers[0]->layout()->addWidget(ui->inTable); |
| 2444 | m_Containers[0]->layout()->addWidget(ui->fixedVars); |
| 2445 | m_Containers[1]->layout()->addWidget(ui->out1Table); |
| 2446 | m_Containers[2]->layout()->addWidget(ui->out2Table); |
| 2447 | |
| 2448 | ui->fixedVars->setVisible(false); |
nothing calls this directly
no test coverage detected