Ref T644, allow to fetch notifications sounds from an arbitrary directory

* added settings
* utility functions
This commit is contained in:
Klaus Basan
2019-04-29 02:14:47 +02:00
parent ecc203cf2e
commit e4b0655129
8 changed files with 81 additions and 47 deletions

View File

@@ -57,6 +57,12 @@ namespace BlackMisc
//! Settings value
CStatusMessage value(const QString &path, const QString &command, const CVariant &value, bool &changedFlag);
//! Directory
void setNotificationSoundDirectory(const QString &dir);
//! Notification directory
const QString &getNotificationSoundDirectory() const { return m_notificationSoundDir; }
//! Init with meaningful default values
void initDefaultValues();
@@ -64,11 +70,13 @@ namespace BlackMisc
QString convertToQString(bool i18n = false) const;
private:
QString m_notificationSoundDir;
int m_notification = static_cast<int>(CNotificationSounds::DefaultNotifications); //!< play notification for notification x, a little trick to use a string here (streamable, hashable, ..)
void initNotificationFlags(); //!< init flags
BLACK_METACLASS(
CSettings,
BLACK_METAMEMBER(notificationSoundDir),
BLACK_METAMEMBER(notification)
);
};