/* EqualizerSetting.h */

/* Copyright (C) 2011 Michael Lugmair (Lucio Carreras)
 *
 * This file is part of sayonara player
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef EQUALIZER_SETTING_H_
#define EQUALIZER_SETTING_H_

#include "Utils/Pimpl.h"

#include <QString>
#include <array>

class EqualizerSetting
{
		PIMPL(EqualizerSetting)

	public:
		using ValueArray = std::array<int, 10>;

		explicit EqualizerSetting(int id = -1, const QString& name = QString());
		EqualizerSetting(int id, const QString& name, const ValueArray& values);
		EqualizerSetting(int id, const QString& name, const ValueArray& values, const ValueArray& defaultValues);

		EqualizerSetting(const EqualizerSetting& other);
		~EqualizerSetting();

		EqualizerSetting& operator=(const EqualizerSetting& s);

		[[nodiscard]] QString name() const;

		void setName(const QString& name);

		[[nodiscard]] int id() const;
		void setId(int id);

		[[nodiscard]] const ValueArray& values() const;

		[[nodiscard]] const ValueArray& defaultValues() const;

		[[nodiscard]] int value(int idx) const;

		void setValue(int idx, int val);

		void setValues(const ValueArray& values);

		void setDefaultValues(const ValueArray& values);

		[[nodiscard]] bool isDefault() const;

		[[nodiscard]] ValueArray::const_iterator begin() const;
		[[nodiscard]] ValueArray::const_iterator end() const;
};

#endif
