Use less pointers in frontend

This commit is contained in:
SimoneN64
2024-09-24 13:05:10 +02:00
parent 60870165d5
commit bd98a3b4ee
16 changed files with 270 additions and 261 deletions

View File

@@ -3,12 +3,20 @@
#include <QCheckBox>
#include <QSlider>
#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
class AudioSettings : public QWidget {
QCheckBox *lockChannels = new QCheckBox;
std::unique_ptr<QCheckBox> lockChannels = std::make_unique<QCheckBox>();
std::unique_ptr<QLabel> labelLock = std::make_unique<QLabel>("Lock channels:");
std::unique_ptr<QLabel> labelL = std::make_unique<QLabel>("Volume L");
std::unique_ptr<QLabel> labelR = std::make_unique<QLabel>("Volume R");
std::unique_ptr<QVBoxLayout> mainLayout = std::make_unique<QVBoxLayout>();
std::unique_ptr<QHBoxLayout> volLayout = std::make_unique<QHBoxLayout>();
Q_OBJECT
public:
QSlider *volumeL = new QSlider(Qt::Horizontal), *volumeR = new QSlider(Qt::Horizontal);
std::unique_ptr<QSlider> volumeL = std::make_unique<QSlider>(Qt::Horizontal),
volumeR = std::make_unique<QSlider>(Qt::Horizontal);
AudioSettings(nlohmann::json &);
nlohmann::json &settings;
Q_SIGNALS: