strawberry-audio-player-win.../src/settings/backendsettingspage.h

91 lines
2.2 KiB
C++

/*
* Strawberry Music Player
* Copyright 2013, Jonas Kvinge <jonas@strawbs.net>
*
* Strawberry 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.
*
* Strawberry 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 Strawberry. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef BACKENDSETTINGSPAGE_H
#define BACKENDSETTINGSPAGE_H
#include "config.h"
#include <stdbool.h>
#include <QObject>
#include <QVariant>
#include <QString>
#include <QSettings>
#include "engine/enginetype.h"
#include "dialogs/errordialog.h"
#include "settingspage.h"
#include "settingsdialog.h"
#include "core/application.h"
#include "core/player.h"
#include "engine/enginebase.h"
class SettingsDialog;
class Ui_BackendSettingsPage;
class BackendSettingsPage : public SettingsPage {
Q_OBJECT
public:
BackendSettingsPage(SettingsDialog *dialog);
~BackendSettingsPage();
static const char *kSettingsGroup;
void Load();
void Save();
EngineBase *engine() const { return dialog()->app()->player()->engine(); }
private slots:
void EngineChanged(int index);
void OutputChanged(int index);
void DeviceSelectionChanged(int index);
void DeviceStringChanged();
void RgPreampChanged(int value);
void BufferMinFillChanged(int value);
private:
Ui_BackendSettingsPage *ui_;
void ConnectSignals();
bool EngineInitialised();
void EngineChanged(Engine::EngineType enginetype);
void Load_Engine(Engine::EngineType enginetype);
void Load_Output(QString output, QVariant device);
void Load_Device(QString output, QVariant device);
void ShowWarning(QString text);
void ResetWarning();
void XineWarning();
QSettings s_;
bool configloaded_;
bool engineloaded_;
ErrorDialog errordialog_;
bool enginereset_;
bool xinewarning_;
};
#endif // BACKENDSETTINGSPAGE_H