2012-01-08 23:56:17 +01:00
|
|
|
/* This file is part of Clementine.
|
|
|
|
Copyright 2012, 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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef APPEARANCESETTINGSPAGE_H
|
|
|
|
#define APPEARANCESETTINGSPAGE_H
|
|
|
|
|
2012-02-18 19:57:36 +01:00
|
|
|
#include "playlist/playlistview.h"
|
2020-09-18 16:15:19 +02:00
|
|
|
#include "settingspage.h"
|
2012-02-18 19:57:36 +01:00
|
|
|
|
2012-01-08 23:56:17 +01:00
|
|
|
class QWidget;
|
|
|
|
|
|
|
|
class Ui_AppearanceSettingsPage;
|
|
|
|
|
|
|
|
class AppearanceSettingsPage : public SettingsPage {
|
|
|
|
Q_OBJECT
|
2012-11-19 14:32:39 +01:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
public:
|
2012-01-08 23:56:17 +01:00
|
|
|
AppearanceSettingsPage(SettingsDialog* dialog);
|
|
|
|
~AppearanceSettingsPage();
|
|
|
|
|
|
|
|
void Load();
|
|
|
|
void Save();
|
|
|
|
void Cancel();
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private slots:
|
2012-01-08 23:56:17 +01:00
|
|
|
void SelectForegroundColor();
|
|
|
|
void SelectBackgroundColor();
|
|
|
|
void UseCustomColorSetOptionChanged(bool);
|
2012-02-18 19:57:36 +01:00
|
|
|
void SelectBackgroundImage();
|
2012-11-09 20:17:26 +01:00
|
|
|
void BlurLevelChanged(int);
|
2013-02-15 13:41:56 +01:00
|
|
|
void OpacityLevelChanged(int);
|
2013-02-17 18:20:24 +01:00
|
|
|
void DisableBlurAndOpacitySliders(bool);
|
2012-01-08 23:56:17 +01:00
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
private:
|
2012-05-28 00:44:49 +02:00
|
|
|
static const int kMoodbarPreviewWidth;
|
|
|
|
static const int kMoodbarPreviewHeight;
|
|
|
|
|
2012-01-08 23:56:17 +01:00
|
|
|
// Set the widget's background to new_color
|
2014-02-07 16:34:20 +01:00
|
|
|
void UpdateColorSelectorColor(QWidget* color_selector,
|
|
|
|
const QColor& new_color);
|
2012-01-08 23:56:17 +01:00
|
|
|
// Init (or refresh) the colorSelectors colors
|
|
|
|
void InitColorSelectorsColors();
|
|
|
|
|
2012-05-28 00:44:49 +02:00
|
|
|
void InitMoodbarPreviews();
|
|
|
|
|
2012-01-08 23:56:17 +01:00
|
|
|
Ui_AppearanceSettingsPage* ui_;
|
|
|
|
bool original_use_a_custom_color_set_;
|
|
|
|
QColor original_foreground_color_;
|
|
|
|
QColor original_background_color_;
|
|
|
|
QColor current_foreground_color_;
|
|
|
|
QColor current_background_color_;
|
2012-02-18 19:57:36 +01:00
|
|
|
PlaylistView::BackgroundImageType playlist_view_background_image_type_;
|
|
|
|
QString playlist_view_background_image_filename_;
|
2012-11-19 14:32:39 +01:00
|
|
|
|
2012-05-28 00:44:49 +02:00
|
|
|
bool initialised_moodbar_previews_;
|
2012-01-08 23:56:17 +01:00
|
|
|
};
|
|
|
|
|
2014-02-07 16:34:20 +01:00
|
|
|
#endif // APPEARANCESETTINGSPAGE_H
|