MCPcopy Create free account
hub / github.com/IENT/YUView / currentSelectedItemsChanged

Method currentSelectedItemsChanged

YUViewLib/src/ui/views/SplitViewWidget.cpp:1403–1434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1401}
1402
1403void splitViewWidget::currentSelectedItemsChanged(playlistItem *item1, playlistItem *item2)
1404{
1405 Q_ASSERT_X(this->isMasterView, Q_FUNC_INFO, "Call this function only on the primary widget.");
1406
1407 if (!item1 && !item2)
1408 return;
1409
1410 QSettings settings;
1411 bool savePositionAndZoomPerItem = settings.value("SavePositionAndZoomPerItem", false).toBool();
1412 if (savePositionAndZoomPerItem)
1413 {
1414 // Restore the zoom and position which was saved in the playlist item
1415 const bool getOtherViewValuesFromOtherSlot = !enableLink;
1416 if (item1)
1417 {
1418 item1->getZoomAndPosition(this->moveOffset, this->zoomFactor, false);
1419 item1->getZoomAndPosition(this->getOtherWidget()->moveOffset,
1420 this->getOtherWidget()->zoomFactor,
1421 getOtherViewValuesFromOtherSlot);
1422 }
1423 else if (item2)
1424 {
1425 item2->getZoomAndPosition(moveOffset, this->zoomFactor, false);
1426 item2->getZoomAndPosition(this->getOtherWidget()->moveOffset,
1427 this->getOtherWidget()->zoomFactor,
1428 getOtherViewValuesFromOtherSlot);
1429 }
1430 DEBUG_LOAD_DRAW("splitViewWidget::currentSelectedItemsChanged restore from item "
1431 << item1->properties().id << " moveOffset " << this->moveOffset << " zoom "
1432 << this->zoomFactor);
1433 }
1434}
1435
1436QImage splitViewWidget::getScreenshot(bool fullItem)
1437{

Callers

nothing calls this directly

Calls 3

getOtherWidgetMethod · 0.95
getZoomAndPositionMethod · 0.80
propertiesMethod · 0.80

Tested by

no test coverage detected