swift
audionotificationcomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_AUDIONOTIFICATION_COMPONENT_H
7 #define SWIFT_GUI_AUDIONOTIFICATION_COMPONENT_H
8 
9 #include <QCheckBox>
10 #include <QFrame>
11 #include <QObject>
12 #include <QScopedPointer>
13 
14 #include "gui/swiftguiexport.h"
17 #include "misc/settingscache.h"
18 
19 namespace Ui
20 {
21  class CAudioNotificationComponent;
22 }
23 namespace swift::gui::components
24 {
27  {
28  Q_OBJECT
29 
30  public:
32  explicit CAudioNotificationComponent(QWidget *parent = nullptr);
33 
35  ~CAudioNotificationComponent() override;
36 
37  private:
39  void init();
40 
42  void reloadSettings();
43 
45  void onNotificationsToggled(bool checked);
46 
48  void selectNotificationSoundsDir();
49 
51  void resetNotificationSoundsDir();
52 
54  void onNotificationVolumeChanged(int volume);
55 
57  swift::misc::audio::CNotificationSounds::NotificationFlag checkBoxToFlag(const QCheckBox *cb) const;
58 
59  QScopedPointer<Ui::CAudioNotificationComponent> ui;
61  this, &CAudioNotificationComponent::reloadSettings
62  };
63  };
64 } // namespace swift::gui::components
65 
66 #endif // SWIFT_GUI_AUDIONOTIFICATION_COMPONENT_H
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.