mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
[AFV] Ref T730, move voice settings into voice setup .h file
* same like we do for audio * there was only one file in the settings subdir
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
#include "blacksound/selcalplayer.h"
|
||||
#include "blacksound/notificationplayer.h"
|
||||
#include "blackmisc/macos/microphoneaccess.h"
|
||||
#include "blackmisc/audio/settings/voicesettings.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/notificationsounds.h"
|
||||
#include "blackmisc/audio/audiosettings.h"
|
||||
#include "blackmisc/audio/voicesetup.h"
|
||||
#include "blackmisc/audio/ptt.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
@@ -253,8 +253,8 @@ namespace BlackCore
|
||||
static constexpr int MinUnmuteVolume = 20; //!< minimum volume when unmuted
|
||||
|
||||
// settings
|
||||
BlackMisc::CSetting<BlackMisc::Audio::TSettings> m_audioSettings { this, &IContextAudio::onChangedAudioSettings };
|
||||
BlackMisc::CSetting<BlackMisc::Audio::Settings::TVoiceSetup> m_voiceSettings { this, &IContextAudio::onChangedVoiceSettings };
|
||||
BlackMisc::CSetting<BlackMisc::Audio::TSettings> m_audioSettings { this, &IContextAudio::onChangedAudioSettings };
|
||||
BlackMisc::CSetting<BlackMisc::Audio::TVoiceSetup> m_voiceSettings { this, &IContextAudio::onChangedVoiceSettings };
|
||||
|
||||
BlackMisc::CSetting<Audio::TInputDevice> m_inputDeviceSetting { this, &IContextAudio::changeDeviceSettings };
|
||||
BlackMisc::CSetting<Audio::TOutputDevice> m_outputDeviceSetting { this, &IContextAudio::changeDeviceSettings };
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/* Copyright (C) 2018
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
||||
* or distributed except according to the terms contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AUDIO_SETTINGS_VOICESETTINGS_H
|
||||
#define BLACKMISC_AUDIO_SETTINGS_VOICESETTINGS_H
|
||||
|
||||
#include "blackmisc/audio/voicesetup.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
namespace Settings
|
||||
{
|
||||
//! Voice settings
|
||||
//! \deprecated Voice VATLIB specifics
|
||||
struct TVoiceSetup : public TSettingTrait<CVoiceSetup>
|
||||
{
|
||||
//! \copydoc BlackMisc::TSettingTrait::key
|
||||
static const char *key() { return "audio/%Application%/currentvoicesetup"; }
|
||||
|
||||
//! \copydoc BlackMisc::TSettingTrait::humanReadable
|
||||
static const QString &humanReadable() { static const QString name("Voice setup"); return name; }
|
||||
|
||||
//! \copydoc BlackMisc::TSettingTrait::isValid
|
||||
static bool isValid(const CVoiceSetup &setup, QString &) { return setup.validate().isSuccess(); }
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif
|
||||
@@ -12,6 +12,7 @@
|
||||
#define BLACKMISC_AUDIO_VOICESETUP_H
|
||||
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/settingscache.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/metaclass.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
@@ -82,6 +83,20 @@ namespace BlackMisc
|
||||
BLACK_METAMEMBER(afvMapUrl)
|
||||
);
|
||||
};
|
||||
|
||||
//! Voice settings
|
||||
//! \deprecated Voice VATLIB specifics
|
||||
struct TVoiceSetup : public TSettingTrait<CVoiceSetup>
|
||||
{
|
||||
//! \copydoc BlackMisc::TSettingTrait::key
|
||||
static const char *key() { return "audio/%Application%/currentvoicesetup"; }
|
||||
|
||||
//! \copydoc BlackMisc::TSettingTrait::humanReadable
|
||||
static const QString &humanReadable() { static const QString name("Voice setup"); return name; }
|
||||
|
||||
//! \copydoc BlackMisc::TSettingTrait::isValid
|
||||
static bool isValid(const CVoiceSetup &setup, QString &) { return setup.validate().isSuccess(); }
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \
|
||||
|
||||
HEADERS += *.h \
|
||||
$$PWD/audio/*.h \
|
||||
$$PWD/audio/settings/*.h \
|
||||
# $$PWD/audio/settings/*.h \
|
||||
$$PWD/aviation/*.h \
|
||||
$$PWD/db/*.h \
|
||||
$$PWD/geo/*.h \
|
||||
|
||||
Reference in New Issue
Block a user