Sayonara Player
Loading...
Searching...
No Matches
GUI_StyleSettings.h
1/* GUI_StyleSettings.h */
2
3/* Copyright (C) 2011-2024 Michael Lugmair (Lucio Carreras)
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
21#ifndef STYLESETTINGS_H
22#define STYLESETTINGS_H
23
24#include "Utils/Pimpl.h"
25#include "Gui/Utils/GuiClass.h"
26#include "Gui/Utils/Widgets/Dialog.h"
27
28UI_FWD(GUI_Style)
29
30class QSpinBox;
31struct RawColorStyle;
33 public Gui::Dialog
34{
35 Q_OBJECT
37 UI_CLASS_SHARED_PTR(GUI_Style)
38
39 signals:
40 void sigStyleChanged();
41 void sigStyleApplied();
42
43 public:
44 explicit GUI_StyleSettings(QWidget* parent = nullptr);
45 ~GUI_StyleSettings() override;
46
47 RawColorStyle createStyleFromUi();
48
49 public slots: // NOLINT(*-redundant-access-specifiers)
50 void show(int);
51
52 private slots:
53 void stylesChanged();
54 void comboStylesChanged(int index);
55 void textEdited(const QString& text);
56 void color1Activated();
57 void color2Activated();
58 void color3Activated();
59 void color4Activated();
60 void savePressed();
61 void deletePressed();
62 void undoPressed();
63 void okClicked();
64
65 private: // NOLINT(*-redundant-access-specifiers)
66 void initCombobox();
67 bool saveCurrent();
68
69 void colorActivated(int index);
70 void setSomethingChanged(bool b);
71 bool askForSaveSettings();
72 void applyStyleToUi(const RawColorStyle& style);
73
74 protected:
75 void closeEvent(QCloseEvent* event) override;
76 void languageChanged() override;
77 void skinChanged() override;
78};
79
80#endif // STYLESETTINGS_H
Definition GUI_StyleSettings.h:34
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()....
Definition Dialog.h:37
Definition VisualStyleTypes.h:58