Use C++11 enum class

This commit is contained in:
Jonas Kvinge
2023-02-18 14:09:27 +01:00
parent e6c5f76872
commit dd72fb4ca5
237 changed files with 2915 additions and 2840 deletions

View File

@@ -108,7 +108,7 @@ void Analyzer::Base::paintEvent(QPaintEvent *e) {
p.fillRect(e->rect(), palette().color(QPalette::Window));
switch (engine_->state()) {
case Engine::Playing: {
case Engine::State::Playing: {
const Engine::Scope &thescope = engine_->scope(timeout_);
int i = 0;
@@ -126,7 +126,7 @@ void Analyzer::Base::paintEvent(QPaintEvent *e) {
break;
}
case Engine::Paused:
case Engine::State::Paused:
is_playing_ = false;
analyze(p, lastscope_, new_frame_);
break;

View File

@@ -110,7 +110,7 @@ void BoomAnalyzer::transform(Scope &s) {
void BoomAnalyzer::analyze(QPainter &p, const Scope &scope, const bool new_frame) {
if (!new_frame || engine_->state() == Engine::Paused) {
if (!new_frame || engine_->state() == Engine::State::Paused) {
p.drawPixmap(0, 0, canvas_);
return;
}

View File

@@ -44,7 +44,7 @@ void Sonogram::resizeEvent(QResizeEvent *e) {
void Sonogram::analyze(QPainter &p, const Analyzer::Scope &s, bool new_frame) {
if (!new_frame || engine_->state() == Engine::Paused) {
if (!new_frame || engine_->state() == Engine::State::Paused) {
p.drawPixmap(0, 0, canvas_);
return;
}