comparison view/View.h @ 1490:c83504eb2649

Attempt a mechanism for the View to time-align a layer on display using an aligning version of the ViewProxy
author Chris Cannam
date Fri, 02 Aug 2019 16:44:32 +0100
parents 3943d0720167
children d09345e578a7
comparison
equal deleted inserted replaced
1489:b402121d8f5f 1490:c83504eb2649
384 QPen scalePen(QPen pen) const override; 384 QPen scalePen(QPen pen) const override;
385 385
386 typedef std::set<ModelId> ModelSet; 386 typedef std::set<ModelId> ModelSet;
387 ModelSet getModels(); 387 ModelSet getModels();
388 388
389 //!!!??? poor name, probably poor api, consider this
390 void setUseAligningProxy(bool uap) {
391 m_useAligningProxy = uap;
392 }
393
389 //!!! 394 //!!!
390 ModelId getAligningModel() const; 395 ModelId getAligningModel() const;
396 void getAligningAndReferenceModels(ModelId &aligning, ModelId &reference) const;
391 sv_frame_t alignFromReference(sv_frame_t) const; 397 sv_frame_t alignFromReference(sv_frame_t) const;
392 sv_frame_t alignToReference(sv_frame_t) const; 398 sv_frame_t alignToReference(sv_frame_t) const;
393 sv_frame_t getAlignedPlaybackFrame() const; 399 sv_frame_t getAlignedPlaybackFrame() const;
394 400
395 void updatePaintRect(QRect r) override { update(r); } 401 void updatePaintRect(QRect r) override { update(r); }
532 538
533 LayerList m_layerStack; // I don't own these, but see dtor note above 539 LayerList m_layerStack; // I don't own these, but see dtor note above
534 LayerList m_fixedOrderLayers; 540 LayerList m_fixedOrderLayers;
535 bool m_haveSelectedLayer; 541 bool m_haveSelectedLayer;
536 542
543 bool m_useAligningProxy;
544
537 QString m_lastError; 545 QString m_lastError;
538 546
539 // caches for use in getScrollableBackLayers, getNonScrollableFrontLayers 547 // caches for use in getScrollableBackLayers, getNonScrollableFrontLayers
540 mutable LayerList m_lastScrollableBackLayers; 548 mutable LayerList m_lastScrollableBackLayers;
541 mutable LayerList m_lastNonScrollableBackLayers; 549 mutable LayerList m_lastNonScrollableBackLayers;