MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / WidgetSettingEnum

Method WidgetSettingEnum

vkconfig_gui/widget_setting_enum.cpp:48–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48WidgetSettingEnum::WidgetSettingEnum(QTreeWidget* tree, QTreeWidgetItem* item, const SettingMetaEnum& meta,
49 SettingDataSet& data_set)
50 : WidgetSettingBase(tree, item), meta(meta), data_set(data_set), field(new ComboBox(this)), last_resize(0, 0) {
51 this->field->setFocusPolicy(Qt::StrongFocus);
52 this->field->show();
53
54 this->item->setText(0, GetLabel(this->meta).c_str());
55 this->item->setFont(0, this->tree->font());
56 this->item->setToolTip(0, this->meta.description.c_str());
57 this->item->setSizeHint(0, QSize(0, ITEM_HEIGHT));
58 this->tree->setItemWidget(this->item, 0, this);
59
60 this->Refresh(REFRESH_ENABLE_AND_STATE);
61
62 this->connect(this->field, SIGNAL(currentIndexChanged(int)), this, SLOT(OnIndexChanged(int)));
63}
64
65void WidgetSettingEnum::Refresh(RefreshAreas refresh_areas) {
66 const SettingDependenceMode enabled = ::CheckDependence(this->meta, data_set);

Callers

nothing calls this directly

Calls 2

RefreshMethod · 0.95
GetLabelFunction · 0.70

Tested by

no test coverage detected