MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / updateListItems

Method updateListItems

src/settingsdialogplugins.cpp:102–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void PluginsSettingsTab::updateListItems()
103{
104 for (auto i = 0; i < ui->pluginsList->topLevelItemCount(); ++i) {
105 auto* topLevelItem = ui->pluginsList->topLevelItem(i);
106 for (auto j = 0; j < topLevelItem->childCount(); ++j) {
107 auto* item = topLevelItem->child(j);
108 auto* plugin = this->plugin(item);
109
110 bool inactive = !m_pluginContainer->implementInterface<IPluginGame>(plugin) &&
111 !m_pluginContainer->isEnabled(plugin);
112
113 auto font = item->font(0);
114 font.setItalic(inactive);
115 item->setFont(0, font);
116 for (auto k = 0; k < item->childCount(); ++k) {
117 item->child(k)->setFont(0, font);
118 }
119 }
120 }
121}
122
123void PluginsSettingsTab::filterPluginList()
124{

Callers

nothing calls this directly

Calls 3

pluginMethod · 0.95
fontMethod · 0.80
isEnabledMethod · 0.45

Tested by

no test coverage detected