internet: Add InternetSettingsCategory class

This commit is contained in:
Jim Broadus 2021-04-01 14:53:52 -07:00 committed by John Maguire
parent 8a7120e1e8
commit 1de6a46e86
4 changed files with 55 additions and 4 deletions

View File

@ -173,6 +173,7 @@ set(SOURCES
internet/core/internetmodel.cpp
internet/core/internetplaylistitem.cpp
internet/core/internetservice.cpp
internet/core/internetsettingscategory.cpp
internet/core/internetshowsettingspage.cpp
internet/core/internetview.cpp
internet/core/internetviewcontainer.cpp

View File

@ -0,0 +1,24 @@
/* This file is part of Clementine.
Copyright 2021, Jim Broadus <jbroadus@gmail.com>
Clementine 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.
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "internetsettingscategory.h"
#include "internetshowsettingspage.h"
InternetSettingsCategory::InternetSettingsCategory(SettingsDialog* dialog)
: SettingsCategory(SettingsDialog::Page_InternetShow,
new InternetShowSettingsPage(dialog), dialog) {}

View File

@ -0,0 +1,28 @@
/* This file is part of Clementine.
Copyright 2021, Jim Broadus <jbroadus@gmail.com>
Clementine 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.
Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INTERNETSETTINGSCATEGORY_H
#define INTERNETSETTINGSCATEGORY_H
#include "ui/settingscategory.h"
class InternetSettingsCategory : public SettingsCategory {
public:
InternetSettingsCategory(SettingsDialog* dialog);
};
#endif // INTERNETSETTINGSCATEGORY_H

View File

@ -31,7 +31,7 @@
#include "globalsearch/globalsearchsettingspage.h"
#include "globalshortcutssettingspage.h"
#include "iconloader.h"
#include "internet/core/internetshowsettingspage.h"
#include "internet/core/internetsettingscategory.h"
#include "internet/digitally/digitallyimportedsettingspage.h"
#include "internet/magnatune/magnatunesettingspage.h"
#include "internet/podcasts/podcastsettingspage.h"
@ -170,9 +170,7 @@ SettingsDialog::SettingsDialog(Application* app, BackgroundStreams* streams,
SIGNAL(NotificationPreview(OSD::Behaviour, QString, QString)));
// Internet providers
InternetShowSettingsPage* internet_page = new InternetShowSettingsPage(this);
SettingsCategory* providers =
new SettingsCategory(Page_InternetShow, internet_page, this);
SettingsCategory* providers = new InternetSettingsCategory(this);
AddCategory(providers);
#ifdef HAVE_LIBLASTFM