| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2018 Rerrah |
| 3 |
* SPDX-License-Identifier: MIT |
| 4 |
*/ |
| 5 |
|
| 6 |
#pragma once |
| 7 |
|
| 8 |
#include <memory> |
| 9 |
#include "../abstract_command.hpp" |
| 10 |
#include "module.hpp" |
| 11 |
|
| 12 |
enum class EffectDisplayControl |
| 13 |
{ |
| 14 |
Unset, ReverseFMVolumeDelay, ReverseFMBrightness |
| 15 |
}; |
| 16 |
|
| 17 |
class SetEffectValueToStepCommand final : public AbstractCommand |
| 18 |
{ |
| 19 |
public: |
| 20 |
SetEffectValueToStepCommand(std::weak_ptr<Module> mod, int songNum, int trackNum, |
| 21 |
int orderNum, int stepNum, int n, int value, |
| 22 |
EffectDisplayControl ctrl, bool secondEntry); |
| 23 |
bool redo() override; |
| 24 |
bool undo() override; |
| 25 |
bool mergeWith(const AbstractCommand* other) override; |
| 26 |
|
| 27 |
private: |
| 28 |
std::weak_ptr<Module> mod_; |
| 29 |
const int song_, track_, order_, step_, n_; |
| 30 |
int val_, prevVal_; |
| 31 |
const EffectDisplayControl ctrl_; |
| 32 |
bool isSecondEntry_; |
| 33 |
}; |