MCPcopy Create free account
hub / github.com/SaschaWillems/VulkanCapsViewer / displayDeviceProfiles

Method displayDeviceProfiles

vulkanCapsViewer.cpp:1954–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952}
1953
1954void VulkanCapsViewer::displayDeviceProfiles(VulkanDeviceInfo* device)
1955{
1956 models.profiles.clear();
1957 QStandardItem* rootItem = models.profiles.invisibleRootItem();
1958
1959 for (auto& profile : device->profiles) {
1960 QList<QStandardItem*> extItem;
1961 extItem << new QStandardItem(QString::fromStdString(profile.profileName));
1962 extItem << new QStandardItem(QString::fromStdString(vulkanResources::revisionToString(profile.specVersion)));
1963 extItem << new QStandardItem(profile.supported ? "true" : "false");
1964 extItem[2]->setForeground(profile.supported ? QColor::fromRgb(0, 128, 0) : QColor::fromRgb(255, 0, 0));
1965 rootItem->appendRow(extItem);
1966 }
1967 models.profiles.sort(0, Qt::SortOrder::AscendingOrder);
1968
1969 QStringList headers;
1970 headers << "Profile" << "Spec Version" << "Supported";
1971 models.profiles.setHorizontalHeaderLabels(headers);
1972
1973 ui.treeViewDeviceProfiles->setHeaderHidden(false);
1974 ui.treeViewDeviceProfiles->expandAll();
1975 ui.treeViewDeviceProfiles->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
1976}
1977
1978void VulkanCapsViewer::reportToJson(QString submitter, QString comment, QJsonObject& jsonObject)
1979{

Callers

nothing calls this directly

Calls 1

revisionToStringFunction · 0.85

Tested by

no test coverage detected