2011-07-21 01:03:55 +02:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
Copyright 2010, David Sansome <me@davidsansome.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/>.
|
|
|
|
*/
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
#ifndef SETTINGSPAGE_H
|
|
|
|
#define SETTINGSPAGE_H
|
2011-07-21 01:03:55 +02:00
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
#include "widgets/osd.h"
|
2011-07-21 01:03:55 +02:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
class SettingsDialog;
|
|
|
|
|
|
|
|
class SettingsPage : public QWidget {
|
2011-07-21 01:03:55 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
public:
|
2011-08-14 01:07:10 +02:00
|
|
|
SettingsPage(SettingsDialog* dialog);
|
|
|
|
|
2011-08-27 23:01:28 +02:00
|
|
|
// Return false to grey out the page's item in the list.
|
2011-08-14 01:07:10 +02:00
|
|
|
virtual bool IsEnabled() const { return true; }
|
|
|
|
|
2012-01-09 21:15:42 +01:00
|
|
|
// Load is called when the dialog is shown, Save when the user clicks OK, and
|
|
|
|
// Cancel when the user clicks on Cancel
|
2011-08-14 01:07:10 +02:00
|
|
|
virtual void Load() = 0;
|
|
|
|
virtual void Save() = 0;
|
2012-01-09 21:15:42 +01:00
|
|
|
virtual void Cancel() {}
|
2011-08-14 01:07:10 +02:00
|
|
|
|
2011-08-27 23:01:28 +02:00
|
|
|
// The dialog that this page belongs to.
|
2011-08-14 01:07:10 +02:00
|
|
|
SettingsDialog* dialog() const { return dialog_; }
|
2011-07-21 01:03:55 +02:00
|
|
|
|
2011-08-14 01:07:10 +02:00
|
|
|
signals:
|
|
|
|
void NotificationPreview(OSD::Behaviour, QString, QString);
|
|
|
|
void SetWiimotedevInterfaceActived(bool);
|
2011-07-21 01:03:55 +02:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private:
|
2011-08-14 01:07:10 +02:00
|
|
|
SettingsDialog* dialog_;
|
2011-07-21 01:03:55 +02:00
|
|
|
};
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
#endif // SETTINGSPAGE_H
|