#include <qwavmonowaveview.h>
Inheritance diagram for QwavMonoWaveView:
Public Slots | |
void | activatePeakLayer (bool) |
void | activateAverageLayer (bool) |
void | activateZeroLineLayer (bool) |
Customization | |
void | setBgColor (const QColor &c) |
const QColor & | bgColor (void) const |
void | setPeakColor (const QColor &c) |
const QColor & | peakColor (void) const |
void | setAvgColor (const QColor &c) |
const QColor & | avgColor (void) const |
Samples and pixels | |
void | setSamplesVisible (const long &newVal) |
void | setZoomFac (double zoomFac) |
void | setZoomYFac (double zoomYFac) |
void | setFirstSample (ulong sample) |
void | setChannel (uint channel=1) |
uint | channel (void) const |
void | scrollBy (int pixel) |
Signals | |
void | selBeginChanged (long sample) |
void | selEndChanged (long sample) |
void | zoomFacChanged (double fac) |
void | positionChanged (ulong sample) |
void | firstSampleChanged (ulong sample) |
Public Methods | |
const State & | state (void) const |
Constructor & Destructor | |
QwavMonoWaveView (QwavWaveDataInterface *waveData, QWidget *parent, const char *name=0, int wflags=0) | |
QwavMonoWaveView (const string &filename, QWidget *parent, const char *name=0) throw (InvalidNrOfChannels, FileOpenError, FileReadError) | |
virtual | ~QwavMonoWaveView () |
Document / View | |
virtual void | update (QwavMonoWaveView *pSender) |
Layer | |
int | addLayer (QwavViewLayer *layer) |
QwavViewLayer * | getLayer (const string &name) |
QwavViewLayer * | getLayer (uint index) |
uint | getNrOfLayers (void) const |
QPixmap * | getBackbuf (void) |
Samples and pixels | |
int | sample2Pixel (long sample) const |
long | pixel2Sample (int pixel) const |
bool | isSampleVisible (long sample) const |
const int | nrOfPixels (void) const |
double | zoomFac (void) const |
double | zoomYFac (void) const |
double | maxZoomFac (void) const |
const ulong | firstSample (void) const |
const long | lastSample (void) const |
const long | samplesVisible (void) const |
void | setPeakInterpolator (QwavPeakInterpolator *s) |
QwavPeakInterpolator * | peakInterpolator () const |
Position | |
void | setPosition (const ulong sample) |
const ulong & | position () const |
Selection | |
uint | addSelection (const QwavSelection &s) |
uint | getNrOfSelections (void) const |
const QwavSelection & | getSelection (uint index=0) const |
QwavSelection & | getSelection (uint index=0) |
int | isSelectionBegin (int pixel) |
int | isSelectionEnd (int pixel) |
int | activeSelection (void) const |
void | clearSelections (void) |
Protected Slots | |
void | onZoomFacChanged (double) |
void | onZoomFacInQwavWaveViewChanged (double) |
void | onZoomFacEntered () |
void | onPeakColor () |
void | onBgColor () |
void | onHScrollBarChanged (int) |
void | onSelChanged (long) |
void | onFirstSampleChanged (ulong) |
Protected Methods | |
virtual void | resizeEvent (QResizeEvent *e) |
void | updateHorScrollBar () |
|
Constructor. Used to construct a view on the waveform in the soundfile file. The view is constructed as parent's child and can be given a name.
|
|
Constructor. Used to construct a view on the waveform in the soundfile file. The view is constructed as parent's child and can be given a name.
|
|
Destructor. |
|
Activates the layer that paints the zero and two helper lines.
|
|
Returns the index of the active selection or -1 of no active selection. The returned index can be just with getQwavSelection() to obtain the active selection.
Implements QwavWaveViewInterface. |
|
Adds a layer to this view. If there is no layer of layer's type present, layer is added and it's index returned. If a layer with the same type as layer is already present (the type is determined by layer->getName()), layer is not added and -1 is returned.
Implements QwavWaveViewInterface. |
|
Adds the selection s to the selection vector. For now only single selection is implemented. The selection s is added as a deep copy.
Implements QwavWaveViewInterface. |
|
Returns the average color of this view.
Implements QwavWaveViewInterface. |
|
Returns the background color of this view.
Implements QwavWaveViewInterface. |
|
Clears the selection vector and repaints the view. Implements QwavWaveViewInterface. |
|
Returns the first visible sample in this view.
Implements QwavWaveViewInterface. |
|
Is emitted when the first visible sample has changed. Implements QwavWaveViewInterface. |
|
Returns a pointer to the backbuffer QPixmap which is used for flicker-free drawing.
Implements QwavWaveViewInterface. |
|
Returns the view layer with the specified index.
Implements QwavWaveViewInterface. |
|
Returns a pointer to the layer name if present, otherwise 0 is returned.
Implements QwavWaveViewInterface. |
|
Returns the number of layers currently used.
Implements QwavWaveViewInterface. |
|
Returns the number of selections.
Implements QwavWaveViewInterface. |
|
Returns a reference to the selection with the given index. If no selection with index exists, Selection::NullSelection is returned.
Implements QwavWaveViewInterface. |
|
Returns a reference to the selection with the given index. If no selection with index exists, Selection::NullSelection is returned.
Implements QwavWaveViewInterface. |
|
Checks if sample is visible in this view. If sample is visible true is returned, otherwise false.
Implements QwavWaveViewInterface. |
|
If pixel is the begin of an available selection, the index of that selection is returned. If pixel is not the begin of any selection -1 is returned. Implements QwavWaveViewInterface. |
|
If pixel is the end of an available selection, the index of that selection is returned. If pixel is not the end of any selection -1 is returned. Implements QwavWaveViewInterface. |
|
Returns the first visible sample in this view.
Implements QwavWaveViewInterface. |
|
Returns the maximum zoom factor.
Implements QwavWaveViewInterface. |
|
Returns the number of pixels available. The number of pixel is equal to the width of this widget.
Implements QwavWaveViewInterface. |
|
This slot is called when the background button was clicked. |
|
Returns the peak color of this view.
Implements QwavWaveViewInterface. |
|
Returns the peak interpolator used.
Implements QwavWaveViewInterface. |
|
Converts pixel from pixel-space to sample-space. pixel is not bounds checked to allow negative pixel's for some drawing calculations. The returned position in sample-space is possibly lesser than zero or greater than the number of samples in the waveform.
Implements QwavWaveViewInterface. |
|
Returns the current position of the position marker.
Implements QwavWaveViewInterface. |
|
Is emitted when the current position has changed. Implements QwavWaveViewInterface. |
|
Converts sample from sample-space to pixel-space. sample is not bounds checked to allow negative sample's for some drawing calculations. The returned position in pixel-space is possibly lesser than zero or greater than the width of the widget.
Implements QwavWaveViewInterface. |
|
Returns the number of samples visible in this view.
Implements QwavWaveViewInterface. |
|
Is emitted when the selection begin has changed. Implements QwavWaveViewInterface. |
|
Is emitted when the selection end has changed. Implements QwavWaveViewInterface. |
|
Sets the average color of this view to the color c.
Implements QwavWaveViewInterface. |
|
Sets the background color of this view to the color c.
Implements QwavWaveViewInterface. |
|
Sets the first visible sample to be sample.
Implements QwavWaveViewInterface. |
|
Sets the peak color of this view to the color c.
Implements QwavWaveViewInterface. |
|
Sets the position of the position marker to sample.
Implements QwavWaveViewInterface. |
|
Sets the zoom factor of this view.
Implements QwavWaveViewInterface. |
|
Sets the vertical zoom factor of this view.
Implements QwavWaveViewInterface. |
|
Returns the state of this view.
Implements QwavWaveViewInterface. |
|
gets called to redraw the document contents if it has been modified |
|
Returns the zoom factor of this view. The zoom factor is the quotient The zoom factor is measured in samples per pixel. It tells how much samples are visualised by one pixel. Thus if zoom is 1.0 you get a 1:1 visualization (one sample=one pixel). To zoom out from the waveform use zoom values greater than 1. The maximum value for zoom is limited to the double of the number of samples.
Implements QwavWaveViewInterface. |
|
Is emitted when the zoom factor has changed. Implements QwavWaveViewInterface. |
|
Return the vertical zoom factor of this view.
Implements QwavWaveViewInterface. |