MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / onSplitterMoved

Method onSplitterMoved

Source/GUI/MainWindow.cpp:446–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446void MainWindow::onSplitterMoved(const int pos, const int index)
447{
448 (void)pos;
449 (void)index;
450
451 SConfig::getInstance().setSplitterState(m_splitter->saveState());
452
453 const QList<int> currentSizes{m_splitter->sizes()};
454 const int totalSize{std::accumulate(currentSizes.begin(), currentSizes.end(), 0)};
455 const double scannerSize{static_cast<double>(currentSizes[0])};
456 const bool scannerVisible{scannerSize > 0};
457 if (scannerVisible)
458 {
459 const double scannerFactor{scannerSize / static_cast<double>(totalSize)};
460 m_splitter->setProperty("previous_scanner_factor", scannerFactor);
461 }
462
463 {
464 QSignalBlocker signalBlocker(m_actScanner);
465 m_actScanner->setChecked(scannerVisible);
466 }
467}
468
469void MainWindow::onOpenWatchFile()
470{

Callers

nothing calls this directly

Calls 1

setSplitterStateMethod · 0.80

Tested by

no test coverage detected