mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Ref T644, allow to fetch notifications sounds from an arbitrary directory
* added settings * utility functions
This commit is contained in:
@@ -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)
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user