/***************************************************************************
* Copyright (C) 2011-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* 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 2 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, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QGridLayout>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QSlider>
#include <QCheckBox>
#include <QPushButton>
#include <QComboBox>
#include <QLabel>
#include <QPainter>
#include <QDialogButtonBox>
#include <QSettings>
#include <QMessageBox>
#include <QDir>
#include <qmmp/qmmpsettings.h>
#include "equalizer.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
#define horizontalAdvance width
#endif
Equalizer::Equalizer(QWidget *parent) : QDialog(parent)
{
setWindowTitle(tr("Equalizer"));
m_layout = new QVBoxLayout(this);
setLayout(m_layout);
m_layout->setSpacing(5);
m_layout->setMargin(5);
QHBoxLayout *buttonsLayout = new QHBoxLayout;
buttonsLayout->setSpacing(5);
m_enabled = new QCheckBox(tr("Enable equalizer"), this);
buttonsLayout->addWidget(m_enabled);
buttonsLayout->addSpacerItem(new QSpacerItem(30, 0, QSizePolicy::Fixed, QSizePolicy::Fixed));
QLabel *label = new QLabel(this);
label->setText(tr("Preset:"));
buttonsLayout->addWidget(label);
m_presetComboBox = new QComboBox(this);
m_presetComboBox->setEditable(true);
connect(m_presetComboBox, SIGNAL(activated(int)), SLOT(loadPreset(int)));
buttonsLayout->addWidget(m_presetComboBox);