Sayonara Player
Loading...
Searching...
No Matches
StyleSettings.h
1/* StyleSettings.h, (Created on 10.11.2024) */
2
3/* Copyright (C) 2011-2024 Michael Lugmair
4 *
5 * This file is part of Sayonara Player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20#ifndef SAYONARA_PLAYER_STYLESETTINGS_H
21#define SAYONARA_PLAYER_STYLESETTINGS_H
22
23#include "Utils/Pimpl.h"
24
25#include <QList>
26#include <QObject>
27
28#include <optional>
29
30struct RawColorStyle;
31class StyleSettings :
32 public QObject
33{
34 Q_OBJECT
35 PIMPL(StyleSettings)
36
37 signals:
38 void sigStylesChanged();
39
40 public:
41 explicit StyleSettings(QObject* parent);
42 ~StyleSettings() override;
43
44 [[nodiscard]] QList<RawColorStyle> styles() const;
45 [[nodiscard]] std::optional<RawColorStyle> currentStyle() const;
46
47 [[nodiscard]] int count() const;
48 void select(int index);
49 [[nodiscard]] int currentIndex() const;
50 [[nodiscard]] QString nameProposal() const;
51
52 bool saveCurrent(const RawColorStyle& style);
53 bool deleteCurrent();
54
55 private:
56 [[nodiscard]] std::optional<RawColorStyle> style(int index) const;
57
58};
59
60#endif //SAYONARA_PLAYER_STYLESETTINGS_H
Definition EngineUtils.h:33
Definition VisualStyleTypes.h:58