File indexing completed on 2024-12-08 08:02:46
0001 /* 0002 SPDX-FileCopyrightText: 2016 David Rosca <nowrep@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef VOLUMEFEEDBACK_H 0008 #define VOLUMEFEEDBACK_H 0009 0010 #include <QObject> 0011 0012 #include <canberra.h> 0013 0014 class SoundThemeConfig; 0015 0016 class VolumeFeedback : public QObject 0017 { 0018 Q_OBJECT 0019 Q_PROPERTY(bool valid READ isValid CONSTANT) 0020 0021 public: 0022 explicit VolumeFeedback(QObject *parent = nullptr); 0023 ~VolumeFeedback() override; 0024 0025 bool isValid() const; 0026 0027 public Q_SLOTS: 0028 void play(quint32 sinkIndex); 0029 0030 private Q_SLOTS: 0031 void updateCachedSound(); 0032 0033 private: 0034 SoundThemeConfig *m_config = nullptr; 0035 }; 0036 0037 #endif // VOLUMEFEEDBACK_H