20 #include <QProgressBar> 22 #include "base/ZoomConstraint.h" 23 #include "base/PropertyContainer.h" 25 #include "base/XmlExportable.h" 50 class View :
public QFrame,
115 bool logarithmic)
const;
124 bool logarithmic)
const;
141 virtual void zoom(
bool in);
146 virtual void scroll(
bool right,
bool lots,
bool doEmit =
true);
255 QRect rect,
bool focus)
const;
276 virtual PropertyContainer::PropertyList
getProperties()
const;
280 int *min,
int *max,
int *deflt)
const;
307 virtual void toXml(QTextStream &stream, QString indent =
"",
308 QString extraAttributes =
"")
const;
373 View(QWidget *,
bool showProgress);
377 virtual bool render(QPainter &paint,
int x0,
int f0,
int f1);
387 ZoomConstraint::RoundingDirection dir =
388 ZoomConstraint::RoundNearest)
const;
int getFrameForX(int x) const
Return the closest frame to the given pixel x-coordinate.
virtual void globalCentreFrameChanged(int)
virtual const PropertyContainer * getPropertyContainer(int i) const
QString getPropertyLabel(const PropertyName &n) const
int getModelsSampleRate() const
void propertyContainerNameChanged(PropertyContainer *pc)
The base class for visual representations of the data found in a Model.
virtual QString getPropertyContainerName() const
int getZoomConstraintBlockSize(int blockSize, ZoomConstraint::RoundingDirection dir=ZoomConstraint::RoundNearest) const
void checkProgress(void *object)
LayerList m_fixedOrderLayers
void propertyContainerSelected(PropertyContainer *pc)
std::set< Model * > ModelSet
bool m_followPlayIsDetached
virtual void setProperty(const PropertyName &, int value)
void propertyContainerRemoved(PropertyContainer *pc)
virtual QColor getForeground() const
float getYForFrequency(float frequency, float minFreq, float maxFreq, bool logarithmic) const
Return the pixel y-coordinate corresponding to a given frequency, if the frequency range is as specif...
virtual bool getValueExtents(QString unit, float &min, float &max, bool &log) const
virtual int getLayerCount() const
Return the number of layers, regardless of whether visible or dormant, i.e.
int getModelsStartFrame() const
virtual PropertyContainer::PropertyType getPropertyType(const PropertyName &) const
virtual void modelReplaced()
QString getPropertyValueLabel(const PropertyName &n, int value) const
virtual bool shouldShowFeatureLabels() const
LayerList getNonScrollableFrontLayers(bool testChanged, bool &changed) const
virtual void zoom(bool in)
Zoom in or out.
virtual ~View()
Deleting a View does not delete any of its layers.
ProgressMap m_progressBars
virtual void viewCentreFrameChanged(View *, int)
virtual ViewManager * getViewManager() const
virtual int getPropertyRangeAndValue(const PropertyName &, int *min, int *max, int *deflt) const
int getAlignedPlaybackFrame() const
virtual void selectionChanged()
std::vector< Layer * > LayerList
virtual QImage * toNewImage()
void zoomLevelChanged(int, bool)
void propertyContainerPropertyChanged(PropertyContainer *pc)
virtual void paintEvent(QPaintEvent *e)
LayerList getScrollableBackLayers(bool testChanged, bool &changed) const
virtual bool shouldIlluminateLocalFeatures(const Layer *, QPoint &) const
bool shouldShowFeatureLabels() const
virtual void layerParameterRangesChanged()
virtual bool hasLightBackground() const
virtual void addLayer(Layer *v)
Add a layer to the view.
virtual PlaybackFollowMode getPlaybackFollow() const
virtual Layer * getTopLayer()
Return the "top" layer in the view, whether visible or dormant.
virtual int getTextLabelHeight(const Layer *layer, QPainter &) const
virtual void setViewManager(ViewManager *m)
int getZoomLevel() const
Return the zoom level, i.e.
void propertyContainerAdded(PropertyContainer *pc)
bool hasTopLayerTimeXAxis() const
QString getPropertyContainerIconName() const
virtual void setPaintFont(QPainter &paint)
virtual int getFirstVisibleFrame() const
int alignToReference(int) const
virtual void modelAlignmentCompletionChanged()
virtual bool shouldIlluminateLocalSelection(QPoint &, bool &, bool &) const
PropertyList getProperties() const
Model * getAligningModel() const
!!
void movePlayPointer(int f)
virtual void cancelClicked()
void propertyChanged(PropertyContainer::PropertyName)
virtual QSize getImageSize()
virtual bool getFollowGlobalPan() const
int getStartFrame() const
Retrieve the first visible sample frame on the widget.
int alignFromReference(int) const
virtual int getPropertyContainerCount() const
bool areLayersScrollable() const
virtual void modelCompletionChanged()
virtual void layerParametersChanged()
virtual void modelChanged()
virtual void modelChangedWithin(int startFrame, int endFrame)
virtual ~ViewPropertyContainer()
int getEndFrame() const
Retrieve the last visible sample frame on the widget.
virtual Layer * getFixedOrderLayer(int n)
Return the nth layer, counted in the order they were added.
virtual QString getPropertyValueLabel(const PropertyName &, int value) const
PropertyContainer::PropertyName PropertyName
virtual void drawSelections(QPainter &)
int getProgressBarWidth() const
virtual void setProperty(const PropertyName &n, int value)
virtual void layerNameChanged()
virtual Layer * getLayer(int n)
Return the nth layer, counted in stacking order.
PlaybackFollowMode m_followPlay
void contextHelpChanged(const QString &)
virtual void progressCheckStalledTimerElapsed()
LayerList m_lastScrollableBackLayers
virtual void setFollowGlobalPan(bool f)
QString getPropertyContainerName() const
virtual bool shouldLabelSelections() const
int getModelsEndFrame() const
void propertyContainerPropertyRangeChanged(PropertyContainer *pc)
virtual void setPlaybackFollow(PlaybackFollowMode m)
View is the base class of widgets that display one or more overlaid views of data against a horizonta...
virtual void removeLayer(Layer *v)
Remove a layer from the view.
The ViewManager manages properties that may need to be synchronised between separate Views.
virtual void toolModeChanged()
virtual void setZoomLevel(int z)
Set the zoom level, i.e.
virtual void zoomWheelsEnabledChanged()
View(QWidget *, bool showProgress)
virtual QString getPropertyLabel(const PropertyName &) const
std::map< Layer *, ProgressBarRec > ProgressMap
virtual void viewZoomLevelChanged(View *, int, bool)
virtual void drawVisibleText(QPainter &p, int x, int y, QString text, TextStyle style) const
LayerList m_lastNonScrollableBackLayers
int getCentreFrame() const
Return the centre frame of the visible widget.
virtual bool getFollowGlobalZoom() const
virtual void viewManagerPlaybackFrameChanged(int)
virtual Layer * getSelectedLayer()
Return the layer most recently selected by the user.
virtual void overlayModeChanged()
virtual void scroll(bool right, bool lots, bool doEmit=true)
Scroll left or right by a smallish or largish amount.
virtual int getLastVisibleFrame() const
virtual void setFollowGlobalZoom(bool f)
void setCentreFrame(int f)
Set the centre frame of the visible widget.
float getFrequencyForY(int y, float minFreq, float maxFreq, bool logarithmic) const
Return the closest frequency to the given pixel y-coordinate, if the frequency range is as specified.
virtual bool render(QPainter &paint, int x0, int f0, int f1)
virtual void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const
virtual PropertyContainer::PropertyList getProperties() const
void setStartFrame(int)
Set the widget pan based on the given first visible frame.
virtual QColor getBackground() const
bool areLayerColoursSignificant() const
virtual Layer * getInteractionLayer()
Return the layer currently active for tool interaction.
virtual QString getPropertyContainerIconName() const =0
virtual void layerMeasurementRectsChanged()
int getPropertyRangeAndValue(const PropertyName &n, int *min, int *max, int *deflt) const
int getXForFrame(int frame) const
Return the pixel x-coordinate corresponding to a given sample frame (which may be negative).
virtual void drawMeasurementRect(QPainter &p, const Layer *, QRect rect, bool focus) const
ViewPropertyContainer * m_propertyContainer
ViewPropertyContainer(View *v)
PropertyType getPropertyType(const PropertyName &n) const
void centreFrameChanged(int frame, bool globalScroll, PlaybackFollowMode followMode)