Formatting

This commit is contained in:
Jonas Kvinge
2021-07-11 07:40:57 +02:00
parent 87b9a8c4c8
commit a6742d401c
149 changed files with 595 additions and 565 deletions

View File

@@ -56,8 +56,7 @@ BlockAnalyzer::BlockAnalyzer(QWidget *parent)
fade_bars_(kFadeSize),
fade_pos_(1 << 8, 50),
fade_intensity_(1 << 8, 32),
step_(0)
{
step_(0) {
setMinimumSize(kMinColumns * (kWidth + 1) - 1, kMinRows * (kHeight + 1) - 1); //-1 is padding, no drawing takes place there
setMaximumWidth(kMaxColumns * (kWidth + 1) - 1);

View File

@@ -50,10 +50,8 @@ BoomAnalyzer::BoomAnalyzer(QWidget *parent)
bands_(0),
scope_(kMinBandCount),
fg_(palette().color(QPalette::Highlight)),
K_barHeight_(1.271) // 1.471
,
F_peakSpeed_(1.103) // 1.122
,
K_barHeight_(1.271), // 1.471
F_peakSpeed_(1.103), // 1.122
F_(1.0),
bar_height_(kMaxBandCount, 0),
peak_height_(kMaxBandCount, 0),

View File

@@ -64,8 +64,7 @@ Rainbow::RainbowAnalyzer::RainbowAnalyzer(const RainbowType rbtype, QWidget *par
available_rainbow_width_(0),
px_per_frame_(0),
x_offset_(0),
background_brush_(QColor(0x0f, 0x43, 0x73))
{
background_brush_(QColor(0x0f, 0x43, 0x73)) {
rainbowtype = rbtype;
cat_dash_[0] = QPixmap(":/pictures/nyancat.png");

View File

@@ -47,7 +47,7 @@ class RainbowAnalyzer : public Analyzer::Base {
public:
enum RainbowType {
Nyancat = 0,
Dash = 1
Dash = 1
};
RainbowAnalyzer(const RainbowType rbtype, QWidget *parent);
@@ -106,7 +106,7 @@ class RainbowAnalyzer : public Analyzer::Base {
// The y positions of each point on the rainbow.
float history_[kHistorySize * kRainbowBands]{};
// A cache of the last frame's rainbow,
// A cache of the last frame's rainbow,
// so it can be used in the next frame.
QPixmap buffer_[2];
int current_buffer_;
@@ -118,7 +118,7 @@ class RainbowAnalyzer : public Analyzer::Base {
// X spacing between each point in the polyline.
int px_per_frame_;
// Amount the buffer_ is shifted to the left (off the edge of the widget)
// Amount the buffer_ is shifted to the left (off the edge of the widget)
// to make the rainbow extend from 0 to available_rainbow_width_.
int x_offset_;
@@ -130,7 +130,7 @@ class NyanCatAnalyzer : public RainbowAnalyzer {
public:
Q_INVOKABLE explicit NyanCatAnalyzer(QWidget *parent);
static const char *kName;
};