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

64 lines
1.6 KiB
C
Raw Normal View History

2019-06-17 23:54:24 +02:00
/*
* Strawberry Music Player
2021-03-20 21:14:47 +01:00
* Copyright 2019-2021, Jonas Kvinge <jonas@jkvinge.net>
2019-06-17 23:54:24 +02:00
*
* 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 SUBSONICSETTINGSPAGE_H
#define SUBSONICSETTINGSPAGE_H
2020-02-12 00:07:05 +01:00
#include "config.h"
2019-06-17 23:54:24 +02:00
#include <QObject>
#include <QString>
2020-02-09 02:29:35 +01:00
#include <QUrl>
2019-06-17 23:54:24 +02:00
#include "settings/settingspage.h"
2020-02-09 02:29:35 +01:00
class QEvent;
class SettingsDialog;
2019-06-17 23:54:24 +02:00
class SubsonicService;
class Ui_SubsonicSettingsPage;
class SubsonicSettingsPage : public SettingsPage {
Q_OBJECT
public:
2021-06-12 20:53:23 +02:00
explicit SubsonicSettingsPage(SettingsDialog *parent = nullptr);
2020-06-15 21:55:05 +02:00
~SubsonicSettingsPage() override;
2019-06-17 23:54:24 +02:00
static const char *kSettingsGroup;
2020-06-15 21:55:05 +02:00
void Load() override;
void Save() override;
2019-06-17 23:54:24 +02:00
2020-06-15 21:55:05 +02:00
bool eventFilter(QObject *object, QEvent *event) override;
2019-06-17 23:54:24 +02:00
signals:
2021-01-26 16:48:04 +01:00
void Test(QUrl url, QString username, QString password, bool redirect = false);
2019-06-17 23:54:24 +02:00
private slots:
void TestClicked();
void TestSuccess();
void TestFailure(QString failure_reason);
private:
2021-06-12 20:53:23 +02:00
Ui_SubsonicSettingsPage *ui_;
2019-06-17 23:54:24 +02:00
SubsonicService *service_;
};
#endif // SUBSONICSETTINGSPAGE_H