Sayonara Player
GUI_StyleSettings.h
1 /* GUI_StyleSettings.h */
2 
3 /* Copyright (C) 2011-2020 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 
28 UI_FWD(GUI_Style)
29 
30 class QSpinBox;
32  public Gui::Dialog
33 {
34  Q_OBJECT
35  PIMPL(GUI_StyleSettings)
36  UI_CLASS(GUI_Style)
37 
38 public:
39  explicit GUI_StyleSettings(QWidget* parent=nullptr);
40  ~GUI_StyleSettings() override;
41 
42 signals:
43  void sig_style_update();
44 
45 public slots:
46  void show(int);
47 
48 
49 private slots:
50  void combo_styles_changed(int);
51  void combo_text_changed(const QString&);
52  void col1_activated();
53  void col2_activated();
54  void col3_activated();
55  void col4_activated();
56  void save_pressed();
57  void del_pressed();
58  void undo_pressed();
59  void spin_box_changed(int);
60  void col_changed();
61 
62 
63 private:
64  void init();
65 
66  void connect_spinbox(const QSpinBox* box);
67  void disconnect_spinbox(const QSpinBox* box);
68  void connect_spinboxes();
69  void disconnect_spinboxes();
70  void set_sth_changed(bool b);
71 
72 protected:
73  void closeEvent(QCloseEvent* event) override;
74  void languageChanged() override;
75  void skinChanged() override;
76 
77  void connect_combo_idx_changed();
78  void disconnect_combo_idx_changed();
79 };
80 
81 #endif // STYLESETTINGS_H
Gui::Dialog
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()....
Definition: Dialog.h:37
GUI_StyleSettings
Definition: GUI_StyleSettings.h:33