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

Function addTreeItemFlags

vulkanCapsViewer.cpp:1109–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1107
1108template<typename BitsType>
1109QTreeWidgetItem *addTreeItemFlags(QTreeWidgetItem *parent, const std::string& flagsName, const VkFlags flags, std::string(*const flagToString)(BitsType) )
1110{
1111 auto flagsItem = addTreeItem(parent, flagsName, flags ? vulkanResources::toHexString(flags) : std::string("none"));
1112
1113 for (typename std::underlying_type<BitsType>::type bit = 0x1; bit != 0; bit <<= 1){
1114 const QString bitName = QString::fromStdString(flagToString(static_cast<BitsType>(bit)));
1115 addTreeItemFlag(flagsItem, bitName, flags & bit);
1116 }
1117
1118 return flagsItem;
1119}
1120
1121void addVkBool32Item(QStandardItem* parent, const QVariantMap::const_iterator& iterator)
1122{

Callers 3

displayDeviceQueuesMethod · 0.85

Calls 3

addTreeItemFunction · 0.85
toHexStringFunction · 0.85
addTreeItemFlagFunction · 0.85

Tested by

no test coverage detected