mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #628 Use the metaclass mixins in all value classes.
This commit is contained in:
@@ -81,17 +81,21 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CAudioDeviceInfo)
|
||||
|
||||
DeviceType m_type; //!< Device type, @see CAudioDeviceInfo::DeviceType
|
||||
int m_deviceIndex; //!< deviceIndex is the number is the reference for the VVL. The device is selected by this index. The managing class needs to take care, that indexes are valid.
|
||||
QString m_deviceName; //!< Device name
|
||||
QString m_hostName; //!< We use a DBus based system. Hence an audio device can reside on a differen computers, this here is its name
|
||||
|
||||
BLACK_METACLASS(CAudioDeviceInfo,
|
||||
BLACK_METAMEMBER(type),
|
||||
BLACK_METAMEMBER(deviceIndex),
|
||||
BLACK_METAMEMBER(deviceName),
|
||||
BLACK_METAMEMBER(hostName)
|
||||
);
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Audio::CAudioDeviceInfo, (o.m_type, o.m_deviceIndex, o.m_deviceName, o.m_hostName))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Audio::CAudioDeviceInfo)
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -47,9 +47,12 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CSettingsAudio)
|
||||
QString m_notificationFlags; //!< play notification for notification x, a little trick to use a string here (streamable, hashable, ..)
|
||||
void initNotificationFlags(); //!< init flags
|
||||
|
||||
BLACK_METACLASS(CSettingsAudio,
|
||||
BLACK_METAMEMBER(notificationFlags)
|
||||
);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
@@ -57,6 +60,5 @@ namespace BlackMisc
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Audio::Settings::CSettingsAudio)
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Audio::Settings::CSettingsAudio, (o.m_notificationFlags))
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -104,16 +104,21 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CVoiceRoom)
|
||||
QString m_hostname;
|
||||
QString m_channel;
|
||||
bool m_connected;
|
||||
bool m_audioPlaying;
|
||||
|
||||
BLACK_METACLASS(CVoiceRoom,
|
||||
BLACK_METAMEMBER(hostname),
|
||||
BLACK_METAMEMBER(channel),
|
||||
BLACK_METAMEMBER(connected),
|
||||
BLACK_METAMEMBER(audioPlaying)
|
||||
);
|
||||
};
|
||||
} // Voice
|
||||
} // BlackMisc
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Audio::CVoiceRoom, (o.m_hostname, o.m_channel, o.m_connected, o.m_audioPlaying))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Audio::CVoiceRoom)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user