frequencyspectrum.h Example File
multimedia/spectrum/app/frequencyspectrum.h
#ifndef FREQUENCYSPECTRUM_H
#define FREQUENCYSPECTRUM_H
#include <QtCore/QVector>
class FrequencySpectrum {
public:
FrequencySpectrum(int numPoints = 0);
struct Element {
Element()
: frequency(0.0), amplitude(0.0), phase(0.0), clipped(false)
{ }
qreal frequency;
qreal amplitude;
qreal phase;
bool clipped;
};
typedef QVector<Element>::iterator iterator;
typedef QVector<Element>::const_iterator const_iterator;
void reset();
int count() const;
Element& operator[](int index);
const Element& operator[](int index) const;
iterator begin();
iterator end();
const_iterator begin() const;
const_iterator end() const;
private:
QVector<Element> m_elements;
};
#endif // FREQUENCYSPECTRUM_H