#include <AlignmentView.h>

Inheritance diagram for AlignmentView:
Inheritance graph
Collaboration diagram for AlignmentView:
Collaboration graph

Public Types

typedef PropertyContainer::PropertyName PropertyName
 
typedef std::set< ModelId > ModelSet
 

Public Slots

void globalCentreFrameChanged (sv_frame_t) override
 
void viewCentreFrameChanged (View *, sv_frame_t) override
 
virtual void viewAboveZoomLevelChanged (ZoomLevel, bool)
 
virtual void viewBelowZoomLevelChanged (ZoomLevel, bool)
 
void viewManagerPlaybackFrameChanged (sv_frame_t) override
 
void keyFramesChanged ()
 
virtual void propertyContainerSelected (View *, PropertyContainer *pc)
 A property container has been selected, for example in the associated property stack. More...
 
virtual void modelChanged (ModelId)
 
virtual void modelChangedWithin (ModelId, sv_frame_t startFrame, sv_frame_t endFrame)
 
virtual void modelCompletionChanged (ModelId)
 
virtual void modelAlignmentCompletionChanged (ModelId)
 
virtual void modelReplaced ()
 
virtual void layerParametersChanged ()
 
virtual void layerParameterRangesChanged ()
 
virtual void layerMeasurementRectsChanged ()
 
virtual void layerNameChanged ()
 
virtual void viewZoomLevelChanged (View *, ZoomLevel, bool)
 
virtual void selectionChanged ()
 
virtual void toolModeChanged ()
 
virtual void overlayModeChanged ()
 
virtual void zoomWheelsEnabledChanged ()
 
virtual void cancelClicked ()
 
virtual void progressCheckStalledTimerElapsed ()
 

Signals

void propertyContainerAdded (PropertyContainer *pc)
 
void propertyContainerRemoved (PropertyContainer *pc)
 
void propertyContainerPropertyChanged (PropertyContainer *pc)
 
void propertyContainerPropertyRangeChanged (PropertyContainer *pc)
 
void propertyContainerNameChanged (PropertyContainer *pc)
 
void propertyContainerSelected (PropertyContainer *pc)
 
void propertyChanged (PropertyContainer::PropertyName)
 
void layerModelChanged ()
 
void cancelButtonPressed (Layer *)
 
void centreFrameChanged (sv_frame_t frame, bool globalScroll, PlaybackFollowMode followMode)
 
void zoomLevelChanged (ZoomLevel level, bool locked)
 
void contextHelpChanged (const QString &)
 

Public Member Functions

 AlignmentView (QWidget *parent=0)
 
QString getPropertyContainerIconName () const override
 
void setAboveView (View *view)
 
void setBelowView (View *view)
 
void setReferenceView (View *view)
 
int getId () const override
 Retrieve the id of this object. More...
 
sv_frame_t getStartFrame () const override
 Retrieve the first visible sample frame on the widget. More...
 
void setStartFrame (sv_frame_t)
 Set the widget pan based on the given first visible frame. More...
 
sv_frame_t getCentreFrame () const override
 Return the centre frame of the visible widget. More...
 
void setCentreFrame (sv_frame_t f)
 Set the centre frame of the visible widget. More...
 
sv_frame_t getEndFrame () const override
 Retrieve the last visible sample frame on the widget. More...
 
int getXForFrame (sv_frame_t frame) const override
 Return the pixel x-coordinate corresponding to a given sample frame. More...
 
sv_frame_t getFrameForX (int x) const override
 Return the closest frame to the given pixel x-coordinate. More...
 
int getXForViewX (int viewx) const override
 Return the closest pixel x-coordinate corresponding to a given view x-coordinate. More...
 
int getViewXForX (int x) const override
 Return the closest view x-coordinate corresponding to a given pixel x-coordinate. More...
 
double getYForFrequency (double frequency, double minFreq, double maxFreq, bool logarithmic) const override
 Return the pixel y-coordinate corresponding to a given frequency, if the frequency range is as specified. More...
 
double getFrequencyForY (double y, double minFreq, double maxFreq, bool logarithmic) const override
 Return the closest frequency to the given pixel y-coordinate, if the frequency range is as specified. More...
 
ZoomLevel getZoomLevel () const override
 Return the zoom level, i.e. More...
 
virtual void setZoomLevel (ZoomLevel z)
 Set the zoom level, i.e. More...
 
virtual void zoom (bool in)
 Zoom in or out. More...
 
virtual void scroll (bool right, bool lots, bool doEmit=true)
 Scroll left or right by a smallish or largish amount. More...
 
virtual void addLayer (Layer *v)
 Add a layer to the view. More...
 
virtual void removeLayer (Layer *v)
 Remove a layer from the view. More...
 
virtual int getLayerCount () const
 Return the number of layers, regardless of whether visible or dormant, i.e. More...
 
virtual LayergetLayer (int n)
 Return the nth layer, counted in stacking order. More...
 
virtual LayergetFixedOrderLayer (int n)
 Return the nth layer, counted in the order they were added. More...
 
virtual LayergetInteractionLayer ()
 Return the layer currently active for tool interaction. More...
 
virtual const LayergetInteractionLayer () const
 
virtual LayergetSelectedLayer ()
 Return the layer most recently selected by the user. More...
 
virtual const LayergetSelectedLayer () const
 
virtual LayergetTopLayer ()
 Return the "top" layer in the view, whether visible or dormant. More...
 
virtual void setViewManager (ViewManager *m)
 
virtual void setViewManager (ViewManager *m, sv_frame_t initialFrame)
 
ViewManagergetViewManager () const override
 
virtual void setFollowGlobalPan (bool f)
 
virtual bool getFollowGlobalPan () const
 
virtual void setFollowGlobalZoom (bool f)
 
virtual bool getFollowGlobalZoom () const
 
bool hasLightBackground () const override
 
QColor getForeground () const override
 
QColor getBackground () const override
 
void drawMeasurementRect (QPainter &p, const Layer *, QRect rect, bool focus) const override
 
bool shouldShowFeatureLabels () const override
 
bool shouldIlluminateLocalFeatures (const Layer *, QPoint &) const override
 
virtual bool shouldIlluminateLocalSelection (QPoint &, bool &, bool &) const
 
virtual void setPlaybackFollow (PlaybackFollowMode m)
 
virtual PlaybackFollowMode getPlaybackFollow () const
 
virtual PropertyContainer::PropertyList getProperties () const
 
virtual QString getPropertyLabel (const PropertyName &) const
 
virtual PropertyContainer::PropertyType getPropertyType (const PropertyName &) const
 
virtual int getPropertyRangeAndValue (const PropertyName &, int *min, int *max, int *deflt) const
 
virtual QString getPropertyValueLabel (const PropertyName &, int value) const
 
virtual void setProperty (const PropertyName &, int value)
 
virtual QString getPropertyContainerName () const
 
virtual int getPropertyContainerCount () const
 
virtual const PropertyContainer * getPropertyContainer (int i) const
 
virtual PropertyContainer * getPropertyContainer (int i)
 
virtual QImage * renderToNewImage ()
 Render the view contents to a new QImage (which may be wider than the visible View). More...
 
virtual QImage * renderPartToNewImage (sv_frame_t f0, sv_frame_t f1)
 Render the view contents between the given frame extents to a new QImage (which may be wider than the visible View). More...
 
virtual QSize getRenderedImageSize ()
 Calculate and return the size of image that will be generated by renderToNewImage(). More...
 
virtual QSize getRenderedPartImageSize (sv_frame_t f0, sv_frame_t f1)
 Calculate and return the size of image that will be generated by renderPartToNewImage(f0, f1). More...
 
virtual bool renderToSvgFile (QString filename)
 Render the view contents to a new SVG file. More...
 
virtual bool renderPartToSvgFile (QString filename, sv_frame_t f0, sv_frame_t f1)
 Render the view contents between the given frame extents to a new SVG file. More...
 
bool getVisibleExtentsForUnit (QString unit, double &min, double &max, bool &log) const override
 Return the visible vertical extents for the given unit, if any. More...
 
bool getVisibleExtentsForAnyUnit (double &min, double &max, bool &logarithmic, QString &unit) const
 Return some visible vertical extents and unit. More...
 
int getTextLabelYCoord (const Layer *layer, QPainter &) const override
 Return a y-coordinate at which text labels for individual items in a layer may be drawn, so as not to overlap with those of other layers. More...
 
void toXml (QTextStream &stream, QString indent="", QString extraAttributes="") const override
 
virtual sv_frame_t getFirstVisibleFrame () const
 
virtual sv_frame_t getLastVisibleFrame () const
 
sv_frame_t getModelsStartFrame () const override
 
sv_frame_t getModelsEndFrame () const override
 
QRect getPaintRect () const override
 To be called from a layer, to obtain the extent of the surface that the layer is currently painting to. More...
 
QSize getPaintSize () const override
 
int getPaintWidth () const override
 
int getPaintHeight () const override
 
double scaleSize (double size) const override
 
int scalePixelSize (int size) const override
 
double scalePenWidth (double width) const override
 
QPen scalePen (QPen pen) const override
 
ModelSet getModels ()
 
void setUseAligningProxy (bool uap)
 !!??? poor name, probably poor api, consider this More...
 
ModelId getAligningModel () const
 !! More...
 
void getAligningAndReferenceModels (ModelId &aligning, ModelId &reference) const
 
sv_frame_t alignFromReference (sv_frame_t) const
 
sv_frame_t alignToReference (sv_frame_t) const
 
sv_frame_t getAlignedPlaybackFrame () const
 
void updatePaintRect (QRect r) override
 
ViewgetView () override
 
const ViewgetView () const override
 

Protected Types

typedef std::vector< Layer * > LayerList
 
typedef std::map< Layer *, ProgressBarRecProgressMap
 

Protected Member Functions

void paintEvent (QPaintEvent *e) override
 
bool shouldLabelSelections () const override
 
void buildMaps ()
 
std::vector< sv_frame_t > getKeyFrames (View *, sv_frame_t &resolution)
 
std::vector< sv_frame_t > getDefaultKeyFrames ()
 
ModelId getSalientModel (View *)
 
void reconnectModels ()
 
bool setCentreFrame (sv_frame_t f, bool doEmit)
 
virtual void drawSelections (QPainter &)
 
virtual void drawPlayPointer (QPainter &)
 
virtual bool render (QPainter &paint, int x0, sv_frame_t f0, sv_frame_t f1)
 
virtual void setPaintFont (QPainter &paint)
 
QSize scaledSize (const QSize &s, int factor)
 
QRect scaledRect (const QRect &r, int factor)
 
sv_samplerate_t getModelsSampleRate () const
 
bool areLayersScrollable () const
 
LayerList getScrollableBackLayers (bool testChanged, bool &changed) const
 
LayerList getNonScrollableFrontLayers (bool testChanged, bool &changed) const
 
LayergetScaleProvidingLayerForUnit (QString unit) const
 
ZoomLevel getZoomConstraintLevel (ZoomLevel level, ZoomConstraint::RoundingDirection dir=ZoomConstraint::RoundNearest) const
 
int countZoomLevels () const
 
int getZoomLevelIndex (ZoomLevel level) const
 
ZoomLevel getZoomLevelByIndex (int ix) const
 
bool areLayerColoursSignificant () const
 
bool hasTopLayerTimeXAxis () const
 
void movePlayPointer (sv_frame_t f)
 
void checkProgress (ModelId)
 
void checkAlignmentProgress (ModelId)
 
bool waitForLayersToBeReady ()
 
int getProgressBarWidth () const
 
int effectiveDevicePixelRatio () const
 

Static Protected Member Functions

static int getNextId ()
 

Protected Attributes

Viewm_above
 
Viewm_below
 
Viewm_reference
 
QMutex m_mapsMutex
 
std::multimap< sv_frame_t, sv_frame_t > m_fromAboveMap
 
std::multimap< sv_frame_t, sv_frame_t > m_fromReferenceMap
 
sv_frame_t m_leftmostAbove
 
sv_frame_t m_rightmostAbove
 
int m_id
 
sv_frame_t m_centreFrame
 
ZoomLevel m_zoomLevel
 
bool m_followPan
 
bool m_followZoom
 
PlaybackFollowMode m_followPlay
 
bool m_followPlayIsDetached
 
sv_frame_t m_playPointerFrame
 
bool m_lightBackground
 
bool m_showProgress
 
QPixmap * m_cache
 
QPixmap * m_buffer
 
bool m_cacheValid
 
sv_frame_t m_cacheCentreFrame
 
ZoomLevel m_cacheZoomLevel
 
bool m_selectionCached
 
bool m_deleting
 
LayerList m_layerStack
 
LayerList m_fixedOrderLayers
 
bool m_haveSelectedLayer
 
bool m_useAligningProxy
 
QString m_lastError
 
LayerList m_lastScrollableBackLayers
 
LayerList m_lastNonScrollableBackLayers
 
ProgressMap m_progressBars
 
AlignmentProgressBarRec m_alignmentProgressBar
 
ViewManagerm_manager
 
ViewPropertyContainerm_propertyContainer
 

Detailed Description

Definition at line 21 of file AlignmentView.h.

Member Typedef Documentation

typedef PropertyContainer::PropertyName View::PropertyName
inherited

Definition at line 292 of file View.h.

typedef std::set<ModelId> View::ModelSet
inherited

Definition at line 400 of file View.h.

typedef std::vector<Layer *> View::LayerList
protectedinherited

Definition at line 498 of file View.h.

typedef std::map<Layer *, ProgressBarRec> View::ProgressMap
protectedinherited

Definition at line 577 of file View.h.

Constructor & Destructor Documentation

AlignmentView::AlignmentView ( QWidget *  parent = 0)

Definition at line 29 of file AlignmentView.cpp.

Member Function Documentation

QString AlignmentView::getPropertyContainerIconName ( ) const
inlineoverridevirtual
void AlignmentView::setReferenceView ( View view)

Definition at line 147 of file AlignmentView.cpp.

References m_reference.

Referenced by getPropertyContainerIconName().

void AlignmentView::globalCentreFrameChanged ( sv_frame_t  f)
overrideslot

Definition at line 55 of file AlignmentView.cpp.

References View::globalCentreFrameChanged().

Referenced by getPropertyContainerIconName().

void AlignmentView::viewCentreFrameChanged ( View v,
sv_frame_t  f 
)
overrideslot
void AlignmentView::viewAboveZoomLevelChanged ( ZoomLevel  level,
bool   
)
virtualslot

Definition at line 80 of file AlignmentView.cpp.

References View::m_zoomLevel.

Referenced by getPropertyContainerIconName(), and setAboveView().

void AlignmentView::viewBelowZoomLevelChanged ( ZoomLevel  ,
bool   
)
virtualslot

Definition at line 87 of file AlignmentView.cpp.

Referenced by getPropertyContainerIconName(), and setBelowView().

void AlignmentView::viewManagerPlaybackFrameChanged ( sv_frame_t  )
overrideslot

Definition at line 74 of file AlignmentView.cpp.

Referenced by getPropertyContainerIconName().

void AlignmentView::keyFramesChanged ( )
slot
bool AlignmentView::shouldLabelSelections ( ) const
inlineoverrideprotectedvirtual

Reimplemented from View.

Definition at line 46 of file AlignmentView.h.

References buildMaps(), getDefaultKeyFrames(), getKeyFrames(), getSalientModel(), and reconnectModels().

vector< sv_frame_t > AlignmentView::getKeyFrames ( View view,
sv_frame_t &  resolution 
)
protected

Definition at line 364 of file AlignmentView.cpp.

References getDefaultKeyFrames(), and getSalientModel().

Referenced by buildMaps(), and shouldLabelSelections().

vector< sv_frame_t > AlignmentView::getDefaultKeyFrames ( )
protected
ModelId AlignmentView::getSalientModel ( View view)
protected
void AlignmentView::reconnectModels ( )
protected
sv_frame_t View::getStartFrame ( ) const
overridevirtualinherited

Retrieve the first visible sample frame on the widget.

This is a calculated value based on the centre-frame, widget width and zoom level. The result may be negative.

Implements LayerGeometryProvider.

Definition at line 445 of file View.cpp.

References View::getFrameForX().

Referenced by Pane::drawModelTimeExtents(), View::drawPlayPointer(), Pane::edgeScrollMaybe(), View::getFirstVisibleFrame(), View::getId(), ViewProxy::getStartFrame(), View::modelChangedWithin(), View::movePlayPointer(), Overview::paintEvent(), View::paintEvent(), View::scroll(), Pane::wheelHorizontalFine(), and Pane::zoomToRegion().

void View::setStartFrame ( sv_frame_t  f)
inherited

Set the widget pan based on the given first visible frame.

The frame value may be negative.

Definition at line 457 of file View.cpp.

References View::m_zoomLevel, and View::setCentreFrame().

Referenced by View::getId(), and Pane::zoomToRegion().

sv_frame_t View::getCentreFrame ( ) const
inlineoverridevirtualinherited

Return the centre frame of the visible widget.

This is an exact value that does not depend on the zoom block size. Other frame values (start, end) are calculated from this based on the zoom and other factors.

Implements LayerGeometryProvider.

Definition at line 93 of file View.h.

References View::m_centreFrame.

Referenced by View::drawPlayPointer(), ViewProxy::getCentreFrame(), View::getFrameForX(), and View::getXForFrame().

bool View::setCentreFrame ( sv_frame_t  f,
bool  doEmit 
)
protectedinherited
sv_frame_t View::getEndFrame ( ) const
overridevirtualinherited

Retrieve the last visible sample frame on the widget.

This is a calculated value based on the centre-frame, widget width and zoom level.

Implements LayerGeometryProvider.

Definition at line 451 of file View.cpp.

References View::getFrameForX().

Referenced by Pane::drawModelTimeExtents(), View::drawPlayPointer(), Pane::edgeScrollMaybe(), ViewProxy::getEndFrame(), View::getLastVisibleFrame(), View::modelChangedWithin(), View::movePlayPointer(), View::scroll(), View::setCentreFrame(), Pane::wheelHorizontalFine(), and Pane::zoomToRegion().

int View::getXForFrame ( sv_frame_t  frame) const
overridevirtualinherited

Return the pixel x-coordinate corresponding to a given sample frame.

The frame is permitted to be negative, and the result may be outside the currently visible area. But this should not be called with frame values very far away from the currently visible area, as that could lead to overflow. In that situation an error will be logged and 0 returned.

Implements LayerGeometryProvider.

Definition at line 527 of file View.cpp.

References View::getCentreFrame(), View::getFrameForX(), View::getId(), View::m_centreFrame, and View::m_zoomLevel.

Referenced by Pane::dragTopLayer(), Pane::drawEditingSelection(), Pane::drawModelTimeExtents(), View::drawPlayPointer(), View::drawSelections(), Pane::editSelectionEnd(), View::getFrameForX(), Pane::getSelectionAt(), ViewProxy::getXForFrame(), View::movePlayPointer(), paintEvent(), Overview::paintEvent(), View::paintEvent(), View::setCentreFrame(), and Overview::viewManagerPlaybackFrameChanged().

int View::getXForViewX ( int  viewx) const
inlineoverridevirtualinherited

Return the closest pixel x-coordinate corresponding to a given view x-coordinate.

Default is no scaling, ViewProxy handles scaling case.

Implements LayerGeometryProvider.

Definition at line 127 of file View.h.

int View::getViewXForX ( int  x) const
inlineoverridevirtualinherited

Return the closest view x-coordinate corresponding to a given pixel x-coordinate.

Default is no scaling, ViewProxy handles scaling case.

Implements LayerGeometryProvider.

Definition at line 134 of file View.h.

References View::addLayer(), View::getFrequencyForY(), View::getYForFrequency(), View::getZoomLevel(), View::removeLayer(), View::scroll(), View::setZoomLevel(), and View::zoom().

double View::getYForFrequency ( double  frequency,
double  minFreq,
double  maxFreq,
bool  logarithmic 
) const
overridevirtualinherited

Return the pixel y-coordinate corresponding to a given frequency, if the frequency range is as specified.

This does not imply any policy about layer frequency ranges, but it might be useful for layers to match theirs up if desired.

Not thread-safe in logarithmic mode. Call only from GUI thread.

Implements LayerGeometryProvider.

Definition at line 666 of file View.cpp.

Referenced by View::getViewXForX(), and ViewProxy::getYForFrequency().

double View::getFrequencyForY ( double  y,
double  minFreq,
double  maxFreq,
bool  logarithmic 
) const
overridevirtualinherited

Return the closest frequency to the given pixel y-coordinate, if the frequency range is as specified.

Not thread-safe in logarithmic mode. Call only from GUI thread.

Implements LayerGeometryProvider.

Definition at line 700 of file View.cpp.

Referenced by ViewProxy::getFrequencyForY(), and View::getViewXForX().

ZoomLevel View::getZoomLevel ( ) const
overridevirtualinherited

Return the zoom level, i.e.

the number of frames per pixel or pixels per frame

Implements LayerGeometryProvider.

Definition at line 732 of file View.cpp.

References View::m_zoomLevel.

Referenced by View::getRenderedPartImageSize(), View::getViewXForX(), ViewProxy::getZoomLevel(), Pane::renderPartToNewImage(), View::renderPartToNewImage(), View::renderPartToSvgFile(), and Pane::updateHeadsUpDisplay().

void View::setZoomLevel ( ZoomLevel  z)
virtualinherited

Set the zoom level, i.e.

the number of frames per pixel or pixels per frame. The centre frame will be unchanged; the start and end frames will change.

!! int dpratio = effectiveDevicePixelRatio();

Definition at line 760 of file View.cpp.

References View::m_followZoom, View::m_zoomLevel, and View::zoomLevelChanged().

Referenced by View::getViewXForX(), Pane::horizontalThumbwheelMoved(), View::setViewManager(), View::viewZoomLevelChanged(), Pane::wheelVertical(), View::zoom(), and Pane::zoomToRegion().

void View::zoom ( bool  in)
virtualinherited

Zoom in or out.

Definition at line 1879 of file View.cpp.

References View::getZoomConstraintLevel(), View::m_zoomLevel, and View::setZoomLevel().

Referenced by View::getViewXForX().

void View::scroll ( bool  right,
bool  lots,
bool  doEmit = true 
)
virtualinherited

Scroll left or right by a smallish or largish amount.

Definition at line 1899 of file View.cpp.

References View::getEndFrame(), View::getModelsEndFrame(), View::getStartFrame(), View::m_centreFrame, and View::setCentreFrame().

Referenced by View::getViewXForX().

void View::removeLayer ( Layer v)
virtualinherited
virtual Layer* View::getFixedOrderLayer ( int  n)
inlinevirtualinherited

Return the nth layer, counted in the order they were added.

Unlike the stacking order used in getLayer(), which changes each time a layer is selected, this ordering remains fixed. The returned layer may be visible or it may be dormant, i.e. invisible.

Definition at line 217 of file View.h.

References View::getInteractionLayer(), View::getSelectedLayer(), and View::m_fixedOrderLayers.

Layer * View::getInteractionLayer ( )
virtualinherited
const Layer * View::getInteractionLayer ( ) const
virtualinherited

Definition at line 980 of file View.cpp.

References View::getInteractionLayer().

Layer * View::getSelectedLayer ( )
virtualinherited

Return the layer most recently selected by the user.

This is the layer that any non-tool-driven commands should operate on, in the case where this view is the "current" one.

If the user has selected the view itself more recently than any of the layers on it, this function will return 0, and any non-tool-driven layer commands should be deactivated while this view is current. It will also return 0 if there are no layers in the view.

Note that, unlike getInteractionLayer(), this could return an invisible (dormant) layer.

Definition at line 986 of file View.cpp.

References View::getLayer(), View::getLayerCount(), View::m_haveSelectedLayer, and View::m_layerStack.

Referenced by View::getFixedOrderLayer(), View::getInteractionLayer(), and View::getSelectedLayer().

const Layer * View::getSelectedLayer ( ) const
virtualinherited

Definition at line 996 of file View.cpp.

References View::getSelectedLayer().

virtual Layer* View::getTopLayer ( )
inlinevirtualinherited

Return the "top" layer in the view, whether visible or dormant.

This is the same as getLayer(getLayerCount()-1) if there is at least one layer, and 0 otherwise.

For most purposes involving interaction or commands, you probably want either getInteractionLayer() or getSelectedLayer() instead.

Definition at line 258 of file View.h.

References View::m_layerStack, and View::setViewManager().

Referenced by Pane::getRenderedPartImageSize(), Pane::getTopLayerDisplayExtents(), Pane::mouseDoubleClickEvent(), Pane::mouseMoveEvent(), Pane::mousePressEvent(), Pane::mouseReleaseEvent(), Pane::paintEvent(), Pane::render(), Pane::renderPartToNewImage(), and Pane::setTopLayerDisplayExtents().

void View::setViewManager ( ViewManager m,
sv_frame_t  initialFrame 
)
virtualinherited

Definition at line 1076 of file View.cpp.

References View::setCentreFrame(), and View::setViewManager().

ViewManager* View::getViewManager ( ) const
inlineoverridevirtualinherited

Implements LayerGeometryProvider.

Definition at line 264 of file View.h.

References View::m_manager, and View::setFollowGlobalPan().

Referenced by ViewProxy::getViewManager().

void View::setFollowGlobalPan ( bool  f)
virtualinherited
virtual bool View::getFollowGlobalPan ( ) const
inlinevirtualinherited

Definition at line 267 of file View.h.

References View::m_followPan, and View::setFollowGlobalZoom().

void View::setFollowGlobalZoom ( bool  f)
virtualinherited
virtual bool View::getFollowGlobalZoom ( ) const
inlinevirtualinherited
QColor View::getBackground ( ) const
overridevirtualinherited
void View::drawMeasurementRect ( QPainter &  p,
const Layer topLayer,
QRect  rect,
bool  focus 
) const
overridevirtualinherited
bool View::shouldShowFeatureLabels ( ) const
inlineoverridevirtualinherited
bool View::shouldIlluminateLocalFeatures ( const Layer ,
QPoint &   
) const
inlineoverridevirtualinherited

Implements LayerGeometryProvider.

Definition at line 282 of file View.h.

Referenced by ViewProxy::shouldIlluminateLocalFeatures().

virtual bool View::shouldIlluminateLocalSelection ( QPoint &  ,
bool &  ,
bool &   
) const
inlinevirtualinherited

Reimplemented in Pane.

Definition at line 285 of file View.h.

References View::setPlaybackFollow().

Referenced by View::drawSelections().

void View::setPlaybackFollow ( PlaybackFollowMode  m)
virtualinherited
virtual PlaybackFollowMode View::getPlaybackFollow ( ) const
inlinevirtualinherited

Definition at line 290 of file View.h.

References View::m_followPlay.

PropertyContainer::PropertyList View::getProperties ( ) const
virtualinherited

Definition at line 94 of file View.cpp.

QString View::getPropertyLabel ( const PropertyName pn) const
virtualinherited

Definition at line 104 of file View.cpp.

PropertyContainer::PropertyType View::getPropertyType ( const PropertyName name) const
virtualinherited

Definition at line 113 of file View.cpp.

int View::getPropertyRangeAndValue ( const PropertyName name,
int *  min,
int *  max,
int *  deflt 
) const
virtualinherited
QString View::getPropertyValueLabel ( const PropertyName name,
int  value 
) const
virtualinherited

Definition at line 145 of file View.cpp.

void View::setProperty ( const PropertyName name,
int  value 
)
virtualinherited
int View::getPropertyContainerCount ( ) const
virtualinherited
const PropertyContainer * View::getPropertyContainer ( int  i) const
virtualinherited
PropertyContainer * View::getPropertyContainer ( int  i)
virtualinherited

Definition at line 190 of file View.cpp.

References View::m_fixedOrderLayers, and View::m_propertyContainer.

QImage * View::renderToNewImage ( )
virtualinherited

Render the view contents to a new QImage (which may be wider than the visible View).

Reimplemented in Pane.

Definition at line 3151 of file View.cpp.

References View::getModelsEndFrame(), View::getModelsStartFrame(), View::renderPartToNewImage(), and View::waitForLayersToBeReady().

Referenced by View::getPropertyContainerName(), and Pane::renderToNewImage().

QImage * View::renderPartToNewImage ( sv_frame_t  f0,
sv_frame_t  f1 
)
virtualinherited

Render the view contents between the given frame extents to a new QImage (which may be wider than the visible View).

Reimplemented in Pane.

Definition at line 3164 of file View.cpp.

References View::getZoomLevel(), and View::render().

Referenced by View::getPropertyContainerName(), and View::renderToNewImage().

QSize View::getRenderedImageSize ( )
virtualinherited

Calculate and return the size of image that will be generated by renderToNewImage().

Reimplemented in Pane.

Definition at line 3183 of file View.cpp.

References View::getModelsEndFrame(), View::getModelsStartFrame(), and View::getRenderedPartImageSize().

Referenced by View::getPropertyContainerName(), and Pane::getRenderedImageSize().

QSize View::getRenderedPartImageSize ( sv_frame_t  f0,
sv_frame_t  f1 
)
virtualinherited

Calculate and return the size of image that will be generated by renderPartToNewImage(f0, f1).

Reimplemented in Pane.

Definition at line 3192 of file View.cpp.

References View::getZoomLevel().

Referenced by View::getPropertyContainerName(), View::getRenderedImageSize(), and Pane::getRenderedPartImageSize().

bool View::renderToSvgFile ( QString  filename)
virtualinherited

Render the view contents to a new SVG file.

Definition at line 3201 of file View.cpp.

References View::getModelsEndFrame(), View::getModelsStartFrame(), and View::renderPartToSvgFile().

Referenced by View::getPropertyContainerName().

bool View::renderPartToSvgFile ( QString  filename,
sv_frame_t  f0,
sv_frame_t  f1 
)
virtualinherited

Render the view contents between the given frame extents to a new SVG file.

Definition at line 3210 of file View.cpp.

References View::getZoomLevel(), and View::render().

Referenced by View::getPropertyContainerName(), and View::renderToSvgFile().

bool View::getVisibleExtentsForUnit ( QString  unit,
double &  min,
double &  max,
bool &  log 
) const
overridevirtualinherited

Return the visible vertical extents for the given unit, if any.

Overridden from LayerGeometryProvider (see docs there).

Implements LayerGeometryProvider.

Definition at line 197 of file View.cpp.

References Layer::getDisplayExtents(), View::getId(), View::getScaleProvidingLayerForUnit(), Layer::getValueExtents(), and View::m_layerStack.

Referenced by View::getPropertyContainerName(), and ViewProxy::getVisibleExtentsForUnit().

bool View::getVisibleExtentsForAnyUnit ( double &  min,
double &  max,
bool &  logarithmic,
QString &  unit 
) const
inherited

Return some visible vertical extents and unit.

That is, if at least one non-dormant layer has a non-empty unit and returns some values from its getDisplayExtents() method, return the extents and unit from the topmost of those. Otherwise return false.

Definition at line 323 of file View.cpp.

References Layer::getDisplayExtents(), Layer::getValueExtents(), Layer::isLayerDormant(), and View::m_layerStack.

Referenced by View::getPropertyContainerName().

int View::getTextLabelYCoord ( const Layer layer,
QPainter &   
) const
overridevirtualinherited

Return a y-coordinate at which text labels for individual items in a layer may be drawn, so as not to overlap with those of other layers.

The returned coordinate will be near the top of the visible widget, but adjusted downward depending on how many other visible layers return true from their implementation of Layer::needsTextLabelHeight().

Implements LayerGeometryProvider.

Definition at line 367 of file View.cpp.

References View::m_layerStack, and View::scalePixelSize().

Referenced by View::getPropertyContainerName(), and ViewProxy::getTextLabelYCoord().

void View::toXml ( QTextStream &  stream,
QString  indent = "",
QString  extraAttributes = "" 
) const
overrideinherited
sv_frame_t View::getFirstVisibleFrame ( ) const
virtualinherited

Reimplemented in Pane.

Definition at line 1433 of file View.cpp.

References View::getModelsStartFrame(), and View::getStartFrame().

Referenced by Pane::getFirstVisibleFrame(), and View::getPropertyContainerName().

sv_frame_t View::getLastVisibleFrame ( ) const
virtualinherited

Definition at line 1442 of file View.cpp.

References View::getEndFrame(), and View::getModelsEndFrame().

Referenced by View::getPropertyContainerName().

QRect View::getPaintRect ( ) const
overridevirtualinherited

To be called from a layer, to obtain the extent of the surface that the layer is currently painting to.

This may be the extent of the view (if 1x display scaling is in effect) or of a larger cached pixmap (if greater display scaling is in effect).

Implements LayerGeometryProvider.

Definition at line 2219 of file View.cpp.

Referenced by View::getPaintHeight(), ViewProxy::getPaintRect(), View::getPaintSize(), View::getPaintWidth(), and View::getPropertyContainerName().

QSize View::getPaintSize ( ) const
inlineoverridevirtualinherited

Reimplemented from LayerGeometryProvider.

Definition at line 391 of file View.h.

References View::getPaintRect().

int View::getPaintWidth ( ) const
inlineoverridevirtualinherited

Reimplemented from LayerGeometryProvider.

Definition at line 392 of file View.h.

References View::getPaintRect().

int View::getPaintHeight ( ) const
inlineoverridevirtualinherited
double View::scaleSize ( double  size) const
overridevirtualinherited
int View::scalePixelSize ( int  size) const
overridevirtualinherited
double View::scalePenWidth ( double  width) const
overridevirtualinherited
QPen View::scalePen ( QPen  pen) const
overridevirtualinherited

Implements LayerGeometryProvider.

Definition at line 1853 of file View.cpp.

References View::scalePenWidth().

Referenced by Pane::drawCentreLine(), and View::getPaintHeight().

View::ModelSet View::getModels ( )
inherited

Definition at line 1521 of file View.cpp.

References View::getLayer(), View::getLayerCount(), and Layer::getModel().

void View::setUseAligningProxy ( bool  uap)
inlineinherited
void View::getAligningAndReferenceModels ( ModelId &  aligning,
ModelId &  reference 
) const
inherited
sv_frame_t View::alignFromReference ( sv_frame_t  f) const
inherited
void View::updatePaintRect ( QRect  r)
inlineoverridevirtualinherited

Implements LayerGeometryProvider.

Definition at line 415 of file View.h.

View* View::getView ( )
inlineoverridevirtualinherited

Implements LayerGeometryProvider.

Definition at line 417 of file View.h.

void View::propertyContainerAdded ( PropertyContainer *  pc)
signalinherited
void View::propertyContainerRemoved ( PropertyContainer *  pc)
signalinherited

Referenced by View::getView(), and View::removeLayer().

void View::propertyContainerPropertyChanged ( PropertyContainer *  pc)
signalinherited
void View::propertyContainerPropertyRangeChanged ( PropertyContainer *  pc)
signalinherited
void View::propertyContainerNameChanged ( PropertyContainer *  pc)
signalinherited
void View::propertyContainerSelected ( PropertyContainer *  pc)
signalinherited
void View::propertyContainerSelected ( View client,
PropertyContainer *  pc 
)
virtualslotinherited

A property container has been selected, for example in the associated property stack.

The property container may be a layer, in which case the effect should be to raise that layer to the front of the view and select it; or it may be the view's own property container, in which case the effect is to switch to a mode in which no layer is selected.

(This is the main slot for raising a layer.)

Definition at line 390 of file View.cpp.

References View::m_cacheValid, View::m_haveSelectedLayer, View::m_layerStack, View::m_propertyContainer, and View::propertyContainerSelected().

void View::propertyChanged ( PropertyContainer::PropertyName  )
signalinherited

Referenced by View::getView().

void View::layerModelChanged ( )
signalinherited
void View::cancelButtonPressed ( Layer )
signalinherited
void View::centreFrameChanged ( sv_frame_t  frame,
bool  globalScroll,
PlaybackFollowMode  followMode 
)
signalinherited
void View::zoomLevelChanged ( ZoomLevel  level,
bool  locked 
)
signalinherited
void View::modelChanged ( ModelId  modelId)
virtualslotinherited
void View::modelChangedWithin ( ModelId  modelId,
sv_frame_t  startFrame,
sv_frame_t  endFrame 
)
virtualslotinherited
void View::modelCompletionChanged ( ModelId  modelId)
virtualslotinherited

Definition at line 1184 of file View.cpp.

References View::checkProgress(), and View::getId().

Referenced by View::addLayer(), View::getView(), and View::removeLayer().

void View::modelAlignmentCompletionChanged ( ModelId  modelId)
virtualslotinherited
void View::modelReplaced ( )
virtualslotinherited
void View::layerParametersChanged ( )
virtualslotinherited
void View::layerParameterRangesChanged ( )
virtualslotinherited
void View::layerMeasurementRectsChanged ( )
virtualslotinherited

Definition at line 1236 of file View.cpp.

Referenced by View::addLayer(), and View::getView().

void View::layerNameChanged ( )
virtualslotinherited

Definition at line 1243 of file View.cpp.

References View::propertyContainerNameChanged().

Referenced by View::addLayer(), View::getView(), and View::removeLayer().

void View::viewZoomLevelChanged ( View p,
ZoomLevel  z,
bool  locked 
)
virtualslotinherited
void View::selectionChanged ( )
virtualslotinherited

Definition at line 1423 of file View.cpp.

References View::m_cacheValid, and View::m_selectionCached.

Referenced by View::getView(), and View::setViewManager().

void View::toolModeChanged ( )
virtualslotinherited

Definition at line 426 of file View.cpp.

Referenced by View::getView(), and View::setViewManager().

void View::overlayModeChanged ( )
virtualslotinherited

Definition at line 432 of file View.cpp.

References View::m_cacheValid.

Referenced by View::getView(), and View::setViewManager().

void View::zoomWheelsEnabledChanged ( )
virtualslotinherited

Definition at line 439 of file View.cpp.

Referenced by View::getView(), and View::setViewManager().

void View::cancelClicked ( )
virtualslotinherited

Definition at line 1925 of file View.cpp.

References View::cancelButtonPressed(), and View::m_progressBars.

Referenced by View::addLayer(), and View::getView().

void View::progressCheckStalledTimerElapsed ( )
virtualslotinherited

Definition at line 2146 of file View.cpp.

References View::getId(), and View::m_progressBars.

Referenced by View::addLayer(), and View::getView().

bool View::render ( QPainter &  paint,
int  x0,
sv_frame_t  f0,
sv_frame_t  f1 
)
protectedvirtualinherited
void View::setPaintFont ( QPainter &  paint)
protectedvirtualinherited
QSize View::scaledSize ( const QSize &  s,
int  factor 
)
inlineprotectedinherited

Definition at line 490 of file View.h.

Referenced by View::paintEvent().

QRect View::scaledRect ( const QRect &  r,
int  factor 
)
inlineprotectedinherited

Definition at line 493 of file View.h.

Referenced by View::paintEvent().

sv_samplerate_t View::getModelsSampleRate ( ) const
protectedinherited

!! Just go for the first, for now. If we were supporting

!! nah, this wants to always return the sr of the main model!

Definition at line 1500 of file View.cpp.

References View::m_layerStack.

Referenced by Pane::drawEditingSelection(), View::drawSelections(), and Pane::paintEvent().

bool View::areLayersScrollable ( ) const
protectedinherited

Definition at line 1630 of file View.cpp.

References View::m_layerStack.

View::LayerList View::getScrollableBackLayers ( bool  testChanged,
bool &  changed 
) const
protectedinherited
View::LayerList View::getNonScrollableFrontLayers ( bool  testChanged,
bool &  changed 
) const
protectedinherited

Definition at line 1676 of file View.cpp.

References View::m_lastNonScrollableBackLayers, and View::m_layerStack.

Referenced by View::paintEvent().

Layer * View::getScaleProvidingLayerForUnit ( QString  unit) const
protectedinherited
ZoomLevel View::getZoomConstraintLevel ( ZoomLevel  level,
ZoomConstraint::RoundingDirection  dir = ZoomConstraint::RoundNearest 
) const
protectedinherited
int View::countZoomLevels ( ) const
protectedinherited

Definition at line 1738 of file View.cpp.

References View::getZoomConstraintLevel().

Referenced by Pane::updateHeadsUpDisplay().

int View::getZoomLevelIndex ( ZoomLevel  level) const
protectedinherited

Definition at line 1782 of file View.cpp.

References View::getZoomConstraintLevel().

Referenced by Pane::updateHeadsUpDisplay().

ZoomLevel View::getZoomLevelByIndex ( int  ix) const
protectedinherited

Definition at line 1757 of file View.cpp.

References View::getZoomConstraintLevel().

Referenced by Pane::horizontalThumbwheelMoved().

bool View::areLayerColoursSignificant ( ) const
protectedinherited

Definition at line 1859 of file View.cpp.

References Layer::ColourHasMeaningfulValue, and View::m_layerStack.

Referenced by View::drawSelections().

bool View::hasTopLayerTimeXAxis ( ) const
protectedinherited
void View::checkAlignmentProgress ( ModelId  modelId)
protectedinherited
bool View::waitForLayersToBeReady ( )
protectedinherited

Definition at line 3006 of file View.cpp.

References View::m_layerStack.

Referenced by View::render(), and View::renderToNewImage().

int View::getProgressBarWidth ( ) const
protectedinherited
int View::effectiveDevicePixelRatio ( ) const
protectedinherited

Definition at line 741 of file View.cpp.

Referenced by View::paintEvent(), and View::setPaintFont().

static int LayerGeometryProvider::getNextId ( )
inlinestaticprotectedinherited

Definition at line 48 of file LayerGeometryProvider.h.

Member Data Documentation

View* AlignmentView::m_above
protected
View* AlignmentView::m_below
protected
View* AlignmentView::m_reference
protected

Definition at line 59 of file AlignmentView.h.

Referenced by paintEvent(), and setReferenceView().

QMutex AlignmentView::m_mapsMutex
protected

Definition at line 61 of file AlignmentView.h.

Referenced by keyFramesChanged(), and paintEvent().

std::multimap<sv_frame_t, sv_frame_t> AlignmentView::m_fromAboveMap
protected

Definition at line 62 of file AlignmentView.h.

Referenced by buildMaps(), keyFramesChanged(), and paintEvent().

std::multimap<sv_frame_t, sv_frame_t> AlignmentView::m_fromReferenceMap
protected

Definition at line 63 of file AlignmentView.h.

Referenced by buildMaps(), keyFramesChanged(), and paintEvent().

sv_frame_t AlignmentView::m_leftmostAbove
protected

Definition at line 64 of file AlignmentView.h.

Referenced by buildMaps(), and paintEvent().

sv_frame_t AlignmentView::m_rightmostAbove
protected

Definition at line 65 of file AlignmentView.h.

Referenced by buildMaps(), and paintEvent().

int View::m_id
protectedinherited

Definition at line 481 of file View.h.

Referenced by View::getId().

bool View::m_followPlayIsDetached
protectedinherited

Definition at line 545 of file View.h.

Referenced by View::movePlayPointer().

sv_frame_t View::m_playPointerFrame
protectedinherited
bool View::m_lightBackground
protectedinherited

Definition at line 547 of file View.h.

bool View::m_showProgress
protectedinherited

Definition at line 548 of file View.h.

Referenced by View::checkAlignmentProgress(), and View::checkProgress().

QPixmap* View::m_cache
protectedinherited

Definition at line 550 of file View.h.

Referenced by View::paintEvent(), and View::~View().

QPixmap* View::m_buffer
protectedinherited

Definition at line 551 of file View.h.

Referenced by View::paintEvent(), and View::~View().

sv_frame_t View::m_cacheCentreFrame
protectedinherited

Definition at line 553 of file View.h.

Referenced by View::paintEvent().

ZoomLevel View::m_cacheZoomLevel
protectedinherited

Definition at line 554 of file View.h.

Referenced by View::paintEvent().

bool View::m_selectionCached
protectedinherited

Definition at line 555 of file View.h.

Referenced by View::selectionChanged().

bool View::m_deleting
protectedinherited

Definition at line 557 of file View.h.

Referenced by View::removeLayer(), and View::~View().

LayerList View::m_fixedOrderLayers
protectedinherited
bool View::m_haveSelectedLayer
protectedinherited

Definition at line 561 of file View.h.

Referenced by View::getSelectedLayer(), and View::propertyContainerSelected().

bool View::m_useAligningProxy
protectedinherited

Definition at line 563 of file View.h.

Referenced by View::paintEvent(), and View::setUseAligningProxy().

QString View::m_lastError
protectedinherited

Definition at line 565 of file View.h.

Referenced by View::checkProgress().

LayerList View::m_lastScrollableBackLayers
mutableprotectedinherited

Definition at line 568 of file View.h.

Referenced by View::getScrollableBackLayers().

LayerList View::m_lastNonScrollableBackLayers
mutableprotectedinherited

Definition at line 569 of file View.h.

Referenced by View::getNonScrollableFrontLayers().

AlignmentProgressBarRec View::m_alignmentProgressBar
protectedinherited

The documentation for this class was generated from the following files: