Miam-Player  0.8.0
A nice music player
customizethemedialog.h
Go to the documentation of this file.
1 #ifndef CUSTOMIZETHEMEDIALOG_H
2 #define CUSTOMIZETHEMEDIALOG_H
3 
4 #include "colordialog.h"
5 #include <QDialog>
6 
7 #include "ui_customizetheme.h"
8 #include "reflector.h"
9 
10 #include <QPropertyAnimation>
11 #include <QTimer>
12 
21 class CustomizeThemeDialog : public QDialog, public Ui::CustomizeThemeDialog
22 {
23  Q_OBJECT
24 
25 private:
26  Reflector *_targetedColor;
27 
29  QPropertyAnimation *_animation;
30 
32  QTimer *_timer;
33 
34 public:
35  CustomizeThemeDialog(QWidget *parent = nullptr);
36 
37  inline Reflector* targetedColor() const { return _targetedColor; }
38 
39 private:
40  void animate(qreal startValue, qreal stopValue);
41 
42  void fade();
43 
45  void loadTheme();
46 
47  void setupActions();
48 
49  void toggleCustomColorsGridLayout(QGridLayout *gridLayout, bool enabled);
50 
51  void toggleCustomColorsReflector(Reflector *one, Reflector *two, bool enabled);
52 
53 protected:
55  virtual void closeEvent(QCloseEvent *e) override;
56 
57  virtual void showEvent(QShowEvent * event) override;
58 
59 public slots:
61  virtual int exec() override;
62 
63 private slots:
64  void openChooseIconDialog();
65 
67  void setThemeNameAndDialogButtons(QString);
68 
71  void showColorDialog();
72 
73  void toggleCustomColors(bool enabled);
74 
75  void toggleCustomTextColors(bool enabled);
76 };
77 
78 #endif // CUSTOMIZETHEMEDIALOG_H
The Reflector Class is only designed to help the way one can customize colors.
Definition: reflector.h:11
Definition: ui_customizetheme.h:1734
virtual void closeEvent(QCloseEvent *e) override
Definition: customizethemedialog.cpp:369
virtual void showEvent(QShowEvent *event) override
Definition: customizethemedialog.cpp:378
QGridLayout * gridLayout
Definition: ui_customizetheme.h:59
virtual int exec() override
Definition: customizethemedialog.cpp:392
Reflector * targetedColor() const
Definition: customizethemedialog.h:37
CustomizeThemeDialog(QWidget *parent=nullptr)
Definition: customizethemedialog.cpp:18
The CustomizeThemeDialog class is a very important class. It is designed to help one to customize the...
Definition: customizethemedialog.h:21