MCPcopy Create free account
hub / github.com/TASEmulators/fceux / resetDefaultsCB

Method resetDefaultsCB

src/drivers/Qt/HotKeyConf.cpp:221–248  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

219}
220//----------------------------------------------------------------------------
221void HotKeyConfDialog_t::resetDefaultsCB(void)
222{
223 QTreeWidgetItem *groupItem;
224 HotKeyConfTreeItem_t *item;
225 std::string confName;
226 std::string prefix = "SDL.Hotkeys.";
227 const char *name, *keySeq;
228
229 for (int i=0; i<tree->topLevelItemCount(); i++)
230 {
231 groupItem = tree->topLevelItem(i);
232
233 for (int j=0; j<groupItem->childCount(); j++)
234 {
235 item = static_cast<HotKeyConfTreeItem_t*>(groupItem->child(j));
236
237 getHotKeyConfig( item->hkIdx, &name, &keySeq );
238
239 confName = prefix + name;
240
241 g_config->setOption( confName, keySeq );
242
243 item->setText(1, tr(keySeq));
244 }
245 }
246 setHotKeys();
247
248}
249//----------------------------------------------------------------------------
250void HotKeyConfDialog_t::keyPressEvent(QKeyEvent *event)
251{

Callers

nothing calls this directly

Calls 5

getHotKeyConfigFunction · 0.85
setOptionMethod · 0.80
setTextMethod · 0.80
setHotKeysFunction · 0.70
trFunction · 0.50

Tested by

no test coverage detected