Formatting
This commit is contained in:
@@ -61,7 +61,7 @@ constexpr int kLowFramerate = 20;
|
||||
constexpr int kMediumFramerate = 25;
|
||||
constexpr int kHighFramerate = 30;
|
||||
constexpr int kSuperHighFramerate = 60;
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
AnalyzerContainer::AnalyzerContainer(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
|
||||
@@ -101,8 +101,7 @@ void AnalyzerContainer::AddAnalyzerType() {
|
||||
group_->addAction(action);
|
||||
action->setCheckable(true);
|
||||
actions_ << action;
|
||||
QObject::connect(action, &QAction::triggered, [this, id]() { ChangeAnalyzer(id); } );
|
||||
|
||||
QObject::connect(action, &QAction::triggered, [this, id]() { ChangeAnalyzer(id); });
|
||||
}
|
||||
|
||||
#endif // ANALYZERCONTAINER_H
|
||||
|
||||
@@ -107,7 +107,6 @@ void BlockAnalyzer::resizeEvent(QResizeEvent *e) {
|
||||
}
|
||||
|
||||
drawBackground();
|
||||
|
||||
}
|
||||
|
||||
void BlockAnalyzer::determineStep() {
|
||||
@@ -119,7 +118,6 @@ void BlockAnalyzer::determineStep() {
|
||||
const double fallTime = static_cast<double>(timeout() < 20 ? 20 * rows_ : 30 * rows_);
|
||||
|
||||
step_ = static_cast<double>(rows_ * timeout()) / fallTime;
|
||||
|
||||
}
|
||||
|
||||
void BlockAnalyzer::framerateChanged() {
|
||||
@@ -135,7 +133,6 @@ void BlockAnalyzer::transform(Scope &s) {
|
||||
|
||||
// the second half is pretty dull, so only show it if the user has a large analyzer by setting to scope_.size() if large we prevent interpolation of large analyzers, this is good!
|
||||
s.resize(scope_.size() <= kMaxColumns / 2 ? kMaxColumns / 2 : scope_.size());
|
||||
|
||||
}
|
||||
|
||||
void BlockAnalyzer::analyze(QPainter &p, const Scope &s, const bool new_frame) {
|
||||
@@ -203,7 +200,6 @@ void BlockAnalyzer::analyze(QPainter &p, const Scope &s, const bool new_frame) {
|
||||
}
|
||||
|
||||
p.drawPixmap(0, 0, canvas_);
|
||||
|
||||
}
|
||||
|
||||
static inline void adjustToLimits(const int b, int &f, int &amount) {
|
||||
@@ -230,7 +226,6 @@ static inline void adjustToLimits(const int b, int &f, int &amount) {
|
||||
f = 255;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,7 +332,6 @@ QColor ensureContrast(const QColor &bg, const QColor &fg, int amount) {
|
||||
}
|
||||
|
||||
return Qt::blue;
|
||||
|
||||
}
|
||||
|
||||
void BlockAnalyzer::paletteChange(const QPalette &_palette) {
|
||||
@@ -388,7 +382,6 @@ void BlockAnalyzer::paletteChange(const QPalette &_palette) {
|
||||
}
|
||||
|
||||
drawBackground();
|
||||
|
||||
}
|
||||
|
||||
void BlockAnalyzer::drawBackground() {
|
||||
@@ -411,5 +404,4 @@ void BlockAnalyzer::drawBackground() {
|
||||
p.fillRect(x * (kWidth + 1), y * (kHeight + 1) + y_, kWidth, kHeight, bgdark);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,14 +41,14 @@ class BlockAnalyzer : public AnalyzerBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Q_INVOKABLE explicit BlockAnalyzer(QWidget*);
|
||||
Q_INVOKABLE explicit BlockAnalyzer(QWidget *parent);
|
||||
|
||||
static const char *kName;
|
||||
|
||||
protected:
|
||||
void transform(Scope&) override;
|
||||
void transform(Scope &s) override;
|
||||
void analyze(QPainter &p, const Scope &s, const bool new_frame) override;
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
virtual void paletteChange(const QPalette &_palette);
|
||||
void framerateChanged() override;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class BoomAnalyzer : public AnalyzerBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Q_INVOKABLE explicit BoomAnalyzer(QWidget*);
|
||||
Q_INVOKABLE explicit BoomAnalyzer(QWidget *parent);
|
||||
|
||||
static const char *kName;
|
||||
|
||||
@@ -70,7 +70,6 @@ class BoomAnalyzer : public AnalyzerBase {
|
||||
|
||||
QPixmap barPixmap_;
|
||||
QPixmap canvas_;
|
||||
|
||||
};
|
||||
|
||||
#endif // BOOMANALYZER_H
|
||||
|
||||
@@ -55,7 +55,7 @@ class FHT {
|
||||
/**
|
||||
* Recursive in-place Hartley transform. For internal use only!
|
||||
*/
|
||||
void _transform(float*, int, int);
|
||||
void _transform(float *p, int n, int k);
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -68,7 +68,7 @@ class FHT {
|
||||
~FHT();
|
||||
int sizeExp() const;
|
||||
int size() const;
|
||||
void scale(float*, float) const;
|
||||
void scale(float *p, float d) const;
|
||||
|
||||
/**
|
||||
* Exponentially Weighted Moving Average (EWMA) filter.
|
||||
@@ -90,12 +90,12 @@ class FHT {
|
||||
/**
|
||||
* Semi-logarithmic audio spectrum.
|
||||
*/
|
||||
void semiLogSpectrum(float*);
|
||||
void semiLogSpectrum(float *p);
|
||||
|
||||
/**
|
||||
* Fourier spectrum.
|
||||
*/
|
||||
void spectrum(float*);
|
||||
void spectrum(float *p);
|
||||
|
||||
/**
|
||||
* Calculates a mathematically correct FFT power spectrum.
|
||||
@@ -103,7 +103,7 @@ class FHT {
|
||||
* and factor the 0.5 in the final scaling factor.
|
||||
* @see FHT::power2()
|
||||
*/
|
||||
void power(float*);
|
||||
void power(float *p);
|
||||
|
||||
/**
|
||||
* Calculates an FFT power spectrum with doubled values as a
|
||||
@@ -112,14 +112,14 @@ class FHT {
|
||||
* of @f$2^n@f$ input values. This is the fastest transform.
|
||||
* @see FHT::power()
|
||||
*/
|
||||
void power2(float*);
|
||||
void power2(float *p);
|
||||
|
||||
/**
|
||||
* Discrete Hartley transform of data sets with 8 values.
|
||||
*/
|
||||
static void transform8(float*);
|
||||
static void transform8(float *p);
|
||||
|
||||
void transform(float*);
|
||||
void transform(float *p);
|
||||
};
|
||||
|
||||
#endif // FHT_H
|
||||
|
||||
Reference in New Issue
Block a user