Formatting
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user