fix settings call
This commit is contained in:
parent
ad38f3972e
commit
b0169bece9
7 changed files with 306 additions and 325 deletions
|
|
@ -41,29 +41,29 @@ QSharedPointer<Settings> Settings::create() {
|
||||||
Settings::Settings(QObject *parent) : QObject(parent) {
|
Settings::Settings(QObject *parent) : QObject(parent) {
|
||||||
mustBeInLinphoneThread(getClassName());
|
mustBeInLinphoneThread(getClassName());
|
||||||
mSettingsModel = Utils::makeQObject_ptr<SettingsModel>();
|
mSettingsModel = Utils::makeQObject_ptr<SettingsModel>();
|
||||||
|
|
||||||
// Security
|
// Security
|
||||||
mVfsEnabled = mSettingsModel->getVfsEnabled();
|
mVfsEnabled = mSettingsModel->getVfsEnabled();
|
||||||
|
|
||||||
// Call
|
// Call
|
||||||
mVideoEnabled = mSettingsModel->getVideoEnabled();
|
mVideoEnabled = mSettingsModel->getVideoEnabled();
|
||||||
mEchoCancellationEnabled = mSettingsModel->getEchoCancellationEnabled();
|
mEchoCancellationEnabled = mSettingsModel->getEchoCancellationEnabled();
|
||||||
mAutomaticallyRecordCallsEnabled = mSettingsModel->getAutomaticallyRecordCallsEnabled();
|
mAutomaticallyRecordCallsEnabled = mSettingsModel->getAutomaticallyRecordCallsEnabled();
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
mCaptureDevices = mSettingsModel->getCaptureDevices();
|
mCaptureDevices = mSettingsModel->getCaptureDevices();
|
||||||
mPlaybackDevices = mSettingsModel->getPlaybackDevices();
|
mPlaybackDevices = mSettingsModel->getPlaybackDevices();
|
||||||
mCaptureDevice = mSettingsModel->getCaptureDevice();
|
mCaptureDevice = mSettingsModel->getCaptureDevice();
|
||||||
mPlaybackDevice = mSettingsModel->getPlaybackDevice();
|
mPlaybackDevice = mSettingsModel->getPlaybackDevice();
|
||||||
|
|
||||||
mCaptureGain = mSettingsModel->getCaptureGain();
|
mCaptureGain = mSettingsModel->getCaptureGain();
|
||||||
mPlaybackGain = mSettingsModel->getPlaybackGain();
|
mPlaybackGain = mSettingsModel->getPlaybackGain();
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
mVideoDevice = mSettingsModel->getVideoDevice();
|
mVideoDevice = mSettingsModel->getVideoDevice();
|
||||||
mVideoDevices = mSettingsModel->getVideoDevices();
|
mVideoDevices = mSettingsModel->getVideoDevices();
|
||||||
|
|
||||||
//Logs
|
// Logs
|
||||||
mLogsEnabled = mSettingsModel->getLogsEnabled();
|
mLogsEnabled = mSettingsModel->getLogsEnabled();
|
||||||
mFullLogsEnabled = mSettingsModel->getFullLogsEnabled();
|
mFullLogsEnabled = mSettingsModel->getFullLogsEnabled();
|
||||||
mLogsFolder = mSettingsModel->getLogsFolder();
|
mLogsFolder = mSettingsModel->getLogsFolder();
|
||||||
|
|
@ -77,202 +77,180 @@ void Settings::setSelf(QSharedPointer<Settings> me) {
|
||||||
mustBeInLinphoneThread(getClassName());
|
mustBeInLinphoneThread(getClassName());
|
||||||
mSettingsModelConnection = QSharedPointer<SafeConnection<Settings, SettingsModel>>(
|
mSettingsModelConnection = QSharedPointer<SafeConnection<Settings, SettingsModel>>(
|
||||||
new SafeConnection<Settings, SettingsModel>(me, mSettingsModel), &QObject::deleteLater);
|
new SafeConnection<Settings, SettingsModel>(me, mSettingsModel), &QObject::deleteLater);
|
||||||
|
|
||||||
// VFS
|
// VFS
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setVfsEnabled, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToCore(&Settings::setVfsEnabled, [this](const bool enabled) {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this, enabled]() { mSettingsModel->setVfsEnabled(enabled); });
|
||||||
[this, enabled]() { mSettingsModel->setVfsEnabled(enabled); }
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::vfsEnabledChanged, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::vfsEnabledChanged, [this](const bool enabled) {
|
||||||
mSettingsModelConnection->invokeToCore(
|
mSettingsModelConnection->invokeToCore([this, enabled]() {
|
||||||
[this, enabled]() {
|
mVfsEnabled = enabled;
|
||||||
mVfsEnabled = enabled;
|
emit vfsEnabledChanged();
|
||||||
emit vfsEnabledChanged();
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Video Calls
|
// Video Calls
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setVideoEnabled, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToCore(&Settings::setVideoEnabled, [this](const bool enabled) {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this, enabled]() { mSettingsModel->setVideoEnabled(enabled); });
|
||||||
[this, enabled]() { mSettingsModel->setVideoEnabled(enabled); }
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::videoEnabledChanged, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::videoEnabledChanged, [this](const bool enabled) {
|
||||||
mSettingsModelConnection->invokeToCore(
|
mSettingsModelConnection->invokeToCore([this, enabled]() {
|
||||||
[this, enabled]() {
|
mVideoEnabled = enabled;
|
||||||
mVideoEnabled = enabled;
|
emit videoEnabledChanged();
|
||||||
emit videoEnabledChanged();
|
});
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Echo cancelling
|
// Echo cancelling
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setEchoCancellationEnabled, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToCore(&Settings::setEchoCancellationEnabled, [this](const bool enabled) {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel(
|
||||||
[this, enabled]() { mSettingsModel->setEchoCancellationEnabled(enabled); }
|
[this, enabled]() { mSettingsModel->setEchoCancellationEnabled(enabled); });
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::echoCancellationEnabledChanged, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::echoCancellationEnabledChanged,
|
||||||
mSettingsModelConnection->invokeToCore(
|
[this](const bool enabled) {
|
||||||
[this, enabled]() {
|
mSettingsModelConnection->invokeToCore([this, enabled]() {
|
||||||
mEchoCancellationEnabled = enabled;
|
mEchoCancellationEnabled = enabled;
|
||||||
emit echoCancellationEnabledChanged();
|
emit echoCancellationEnabledChanged();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Auto recording
|
// Auto recording
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setAutomaticallyRecordCallsEnabled, [this](const bool enabled) {
|
mSettingsModelConnection->makeConnectToCore(&Settings::setAutomaticallyRecordCallsEnabled,
|
||||||
mSettingsModelConnection->invokeToModel(
|
[this](const bool enabled) {
|
||||||
[this, enabled]() { mSettingsModel->setAutomaticallyRecordCallsEnabled(enabled); }
|
mSettingsModelConnection->invokeToModel([this, enabled]() {
|
||||||
);
|
mSettingsModel->setAutomaticallyRecordCallsEnabled(enabled);
|
||||||
});
|
});
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::automaticallyRecordCallsEnabledChanged, [this](const bool enabled) {
|
});
|
||||||
mSettingsModelConnection->invokeToCore(
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::automaticallyRecordCallsEnabledChanged,
|
||||||
[this, enabled]() {
|
[this](const bool enabled) {
|
||||||
mAutomaticallyRecordCallsEnabled = enabled;
|
mSettingsModelConnection->invokeToCore([this, enabled]() {
|
||||||
emit automaticallyRecordCallsEnabledChanged();
|
mAutomaticallyRecordCallsEnabled = enabled;
|
||||||
});
|
emit automaticallyRecordCallsEnabledChanged();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Audio device(s)
|
// Audio device(s)
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setCaptureDevice, [this](const QString id) {
|
mSettingsModelConnection->makeConnectToCore(&Settings::lSetCaptureDevice, [this](const QString id) {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this, id]() { mSettingsModel->setCaptureDevice(id); });
|
||||||
[this, id]() { mSettingsModel->setCaptureDevice(id); });
|
|
||||||
});
|
});
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureDeviceChanged, [this](const QString device) {
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureDeviceChanged, [this](const QString device) {
|
||||||
mSettingsModelConnection->invokeToCore(
|
mSettingsModelConnection->invokeToCore([this, device]() {
|
||||||
[this, device]() {
|
mCaptureDevice = device;
|
||||||
mCaptureDevice = device;
|
emit captureDeviceChanged(device);
|
||||||
emit captureDeviceChanged(device);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setPlaybackDevice, [this](const QString id) {
|
|
||||||
mSettingsModelConnection->invokeToModel(
|
|
||||||
[this, id]() { mSettingsModel->setPlaybackDevice(id); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackDeviceChanged, [this](const QString device) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, device]() {
|
|
||||||
mPlaybackDevice = device;
|
|
||||||
emit playbackDeviceChanged(device);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setPlaybackGain, [this](const float value) {
|
|
||||||
mSettingsModelConnection->invokeToModel(
|
|
||||||
[this, value]() { mSettingsModel->setPlaybackGain(value); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackGainChanged, [this](const float value) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, value]() {
|
|
||||||
mPlaybackGain = value;
|
|
||||||
emit playbackGainChanged(value);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setCaptureGain, [this](const float value) {
|
|
||||||
mSettingsModelConnection->invokeToModel(
|
|
||||||
[this, value]() { mSettingsModel->setCaptureGain(value); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureGainChanged, [this](const float value) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, value]() {
|
|
||||||
mCaptureGain = value;
|
|
||||||
emit captureGainChanged(value);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::micVolumeChanged, [this](const float value) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, value]() {
|
|
||||||
emit micVolumeChanged(value);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureDevicesChanged, [this](const QStringList devices) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, devices]() {
|
|
||||||
mCaptureDevices = devices;
|
|
||||||
emit captureDevicesChanged(devices);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackDevicesChanged, [this](const QStringList devices) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, devices]() {
|
|
||||||
mPlaybackDevices = devices;
|
|
||||||
emit playbackDevicesChanged(devices);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Video device(s)
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setVideoDevice, [this](const QString id) {
|
|
||||||
mSettingsModelConnection->invokeToModel(
|
|
||||||
[this, id]() { mSettingsModel->setVideoDevice(id); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::videoDeviceChanged, [this](const QString device) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, device]() {
|
|
||||||
mVideoDevice = device;
|
|
||||||
emit videoDeviceChanged();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::videoDevicesChanged, [this](const QStringList devices) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, devices]() {
|
|
||||||
mVideoDevices = devices;
|
|
||||||
emit videoDevicesChanged();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Logs
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setLogsEnabled, [this](const bool status) {
|
|
||||||
mSettingsModelConnection->invokeToModel(
|
|
||||||
[this, status]() { mSettingsModel->setLogsEnabled(status); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::logsEnabledChanged, [this](const bool status) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, status]() {
|
|
||||||
mLogsEnabled = status;
|
|
||||||
emit logsEnabledChanged();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToCore(&Settings::setFullLogsEnabled, [this](const bool status) {
|
|
||||||
mSettingsModelConnection->invokeToModel(
|
|
||||||
[this, status]() { mSettingsModel->setFullLogsEnabled(status); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mSettingsModelConnection->makeConnectToModel(&SettingsModel::fullLogsEnabledChanged, [this](const bool status) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, status]() {
|
|
||||||
mFullLogsEnabled = status;
|
|
||||||
emit fullLogsEnabledChanged();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
auto coreModelConnection = QSharedPointer<SafeConnection<Settings, CoreModel>>(
|
|
||||||
new SafeConnection<Settings, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);
|
|
||||||
|
|
||||||
coreModelConnection->makeConnectToModel(&CoreModel::logCollectionUploadStateChanged, [this](auto core, auto state, auto info) {
|
|
||||||
mSettingsModelConnection->invokeToCore(
|
|
||||||
[this, state, info]() {
|
|
||||||
if (state == linphone::Core::LogCollectionUploadState::Delivered || state == linphone::Core::LogCollectionUploadState::NotDelivered) {
|
|
||||||
emit logsUploadTerminated(state == linphone::Core::LogCollectionUploadState::Delivered, Utils::coreStringToAppString(info));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToCore(&Settings::lSetPlaybackDevice, [this](const QString id) {
|
||||||
|
mSettingsModelConnection->invokeToModel([this, id]() { mSettingsModel->setPlaybackDevice(id); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackDeviceChanged, [this](const QString device) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, device]() {
|
||||||
|
mPlaybackDevice = device;
|
||||||
|
emit playbackDeviceChanged(device);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToCore(&Settings::lSetPlaybackGain, [this](const float value) {
|
||||||
|
mSettingsModelConnection->invokeToModel([this, value]() { mSettingsModel->setPlaybackGain(value); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackGainChanged, [this](const float value) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, value]() {
|
||||||
|
mPlaybackGain = value;
|
||||||
|
emit playbackGainChanged(value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToCore(&Settings::lSetCaptureGain, [this](const float value) {
|
||||||
|
mSettingsModelConnection->invokeToModel([this, value]() { mSettingsModel->setCaptureGain(value); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureGainChanged, [this](const float value) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, value]() {
|
||||||
|
mCaptureGain = value;
|
||||||
|
emit captureGainChanged(value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::micVolumeChanged, [this](const float value) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, value]() { emit micVolumeChanged(value); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::captureDevicesChanged,
|
||||||
|
[this](const QStringList devices) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, devices]() {
|
||||||
|
mCaptureDevices = devices;
|
||||||
|
emit captureDevicesChanged(devices);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::playbackDevicesChanged,
|
||||||
|
[this](const QStringList devices) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, devices]() {
|
||||||
|
mPlaybackDevices = devices;
|
||||||
|
emit playbackDevicesChanged(devices);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Video device(s)
|
||||||
|
mSettingsModelConnection->makeConnectToCore(&Settings::lSetVideoDevice, [this](const QString id) {
|
||||||
|
mSettingsModelConnection->invokeToModel([this, id]() { mSettingsModel->setVideoDevice(id); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::videoDeviceChanged, [this](const QString device) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, device]() {
|
||||||
|
mVideoDevice = device;
|
||||||
|
emit videoDeviceChanged();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::videoDevicesChanged,
|
||||||
|
[this](const QStringList devices) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, devices]() {
|
||||||
|
mVideoDevices = devices;
|
||||||
|
emit videoDevicesChanged();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Logs
|
||||||
|
mSettingsModelConnection->makeConnectToCore(&Settings::setLogsEnabled, [this](const bool status) {
|
||||||
|
mSettingsModelConnection->invokeToModel([this, status]() { mSettingsModel->setLogsEnabled(status); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::logsEnabledChanged, [this](const bool status) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, status]() {
|
||||||
|
mLogsEnabled = status;
|
||||||
|
emit logsEnabledChanged();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToCore(&Settings::setFullLogsEnabled, [this](const bool status) {
|
||||||
|
mSettingsModelConnection->invokeToModel([this, status]() { mSettingsModel->setFullLogsEnabled(status); });
|
||||||
|
});
|
||||||
|
|
||||||
|
mSettingsModelConnection->makeConnectToModel(&SettingsModel::fullLogsEnabledChanged, [this](const bool status) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, status]() {
|
||||||
|
mFullLogsEnabled = status;
|
||||||
|
emit fullLogsEnabledChanged();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
auto coreModelConnection = QSharedPointer<SafeConnection<Settings, CoreModel>>(
|
||||||
|
new SafeConnection<Settings, CoreModel>(me, CoreModel::getInstance()), &QObject::deleteLater);
|
||||||
|
|
||||||
|
coreModelConnection->makeConnectToModel(
|
||||||
|
&CoreModel::logCollectionUploadStateChanged, [this](auto core, auto state, auto info) {
|
||||||
|
mSettingsModelConnection->invokeToCore([this, state, info]() {
|
||||||
|
if (state == linphone::Core::LogCollectionUploadState::Delivered ||
|
||||||
|
state == linphone::Core::LogCollectionUploadState::NotDelivered) {
|
||||||
|
emit logsUploadTerminated(state == linphone::Core::LogCollectionUploadState::Delivered,
|
||||||
|
Utils::coreStringToAppString(info));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Settings::getConfigPath(const QCommandLineParser &parser) {
|
QString Settings::getConfigPath(const QCommandLineParser &parser) {
|
||||||
|
|
@ -295,6 +273,10 @@ QStringList Settings::getPlaybackDevices() const {
|
||||||
return mPlaybackDevices;
|
return mPlaybackDevices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Settings::getVideoDeviceIndex() const {
|
||||||
|
return mVideoDevices.indexOf(mVideoDevice);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList Settings::getVideoDevices() const {
|
QStringList Settings::getVideoDevices() const {
|
||||||
return mVideoDevices;
|
return mVideoDevices;
|
||||||
}
|
}
|
||||||
|
|
@ -341,53 +323,40 @@ void Settings::setFirstLaunch(bool first) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::startEchoCancellerCalibration() {
|
void Settings::startEchoCancellerCalibration() {
|
||||||
mSettingsModelConnection->invokeToModel([this]() {
|
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->startEchoCancellerCalibration(); });
|
||||||
mSettingsModel->startEchoCancellerCalibration();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Settings::accessCallSettings() {
|
void Settings::accessCallSettings() {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->accessCallSettings(); });
|
||||||
[this]() { mSettingsModel->accessCallSettings(); }
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
void Settings::closeCallSettings() {
|
void Settings::closeCallSettings() {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->closeCallSettings(); });
|
||||||
[this]() { mSettingsModel->closeCallSettings(); }
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::updateMicVolume() const {
|
void Settings::updateMicVolume() const {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->getMicVolume(); });
|
||||||
[this]() { mSettingsModel->getMicVolume(); }
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::getLogsEnabled () const {
|
bool Settings::getLogsEnabled() const {
|
||||||
return mLogsEnabled;
|
return mLogsEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::getFullLogsEnabled () const {
|
bool Settings::getFullLogsEnabled() const {
|
||||||
return mFullLogsEnabled;
|
return mFullLogsEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::cleanLogs () const {
|
void Settings::cleanLogs() const {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->cleanLogs(); });
|
||||||
[this]() { mSettingsModel->cleanLogs(); }
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::sendLogs () const {
|
void Settings::sendLogs() const {
|
||||||
mSettingsModelConnection->invokeToModel(
|
mSettingsModelConnection->invokeToModel([this]() { mSettingsModel->sendLogs(); });
|
||||||
[this]() { mSettingsModel->sendLogs(); }
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Settings::getLogsEmail () const {
|
QString Settings::getLogsEmail() const {
|
||||||
return mLogsEmail;
|
return mLogsEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Settings::getLogsFolder () const {
|
QString Settings::getLogsFolder() const {
|
||||||
return mLogsFolder;
|
return mLogsFolder;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,39 +31,42 @@
|
||||||
|
|
||||||
class Settings : public QObject, public AbstractObject {
|
class Settings : public QObject, public AbstractObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
// Security
|
// Security
|
||||||
Q_PROPERTY(bool vfsEnabled READ getVfsEnabled WRITE setVfsEnabled NOTIFY vfsEnabledChanged)
|
Q_PROPERTY(bool vfsEnabled READ getVfsEnabled WRITE setVfsEnabled NOTIFY vfsEnabledChanged)
|
||||||
|
|
||||||
// Call
|
// Call
|
||||||
Q_PROPERTY(bool videoEnabled READ getVideoEnabled WRITE setVideoEnabled NOTIFY videoEnabledChanged)
|
Q_PROPERTY(bool videoEnabled READ getVideoEnabled WRITE setVideoEnabled NOTIFY videoEnabledChanged)
|
||||||
Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY echoCancellationEnabledChanged)
|
Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY
|
||||||
Q_PROPERTY(int echoCancellationCalibration READ getEchoCancellationCalibration NOTIFY echoCancellationCalibrationChanged)
|
echoCancellationEnabledChanged)
|
||||||
Q_PROPERTY(bool automaticallyRecordCallsEnabled READ getAutomaticallyRecordCallsEnabled WRITE setAutomaticallyRecordCallsEnabled NOTIFY automaticallyRecordCallsEnabledChanged)
|
Q_PROPERTY(
|
||||||
|
int echoCancellationCalibration READ getEchoCancellationCalibration NOTIFY echoCancellationCalibrationChanged)
|
||||||
|
Q_PROPERTY(bool automaticallyRecordCallsEnabled READ getAutomaticallyRecordCallsEnabled WRITE
|
||||||
|
setAutomaticallyRecordCallsEnabled NOTIFY automaticallyRecordCallsEnabledChanged)
|
||||||
|
|
||||||
Q_PROPERTY(bool captureGraphRunning READ getCaptureGraphRunning NOTIFY captureGraphRunningChanged)
|
Q_PROPERTY(bool captureGraphRunning READ getCaptureGraphRunning NOTIFY captureGraphRunningChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QStringList captureDevices READ getCaptureDevices NOTIFY captureDevicesChanged)
|
Q_PROPERTY(QStringList captureDevices READ getCaptureDevices NOTIFY captureDevicesChanged)
|
||||||
Q_PROPERTY(QStringList playbackDevices READ getPlaybackDevices NOTIFY playbackDevicesChanged)
|
Q_PROPERTY(QStringList playbackDevices READ getPlaybackDevices NOTIFY playbackDevicesChanged)
|
||||||
|
|
||||||
Q_PROPERTY(float playbackGain READ getPlaybackGain WRITE setPlaybackGain NOTIFY playbackGainChanged)
|
Q_PROPERTY(float playbackGain READ getPlaybackGain WRITE lSetPlaybackGain NOTIFY playbackGainChanged)
|
||||||
Q_PROPERTY(float captureGain READ getCaptureGain WRITE setCaptureGain NOTIFY captureGainChanged)
|
Q_PROPERTY(float captureGain READ getCaptureGain WRITE lSetCaptureGain NOTIFY captureGainChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QString captureDevice READ getCaptureDevice WRITE setCaptureDevice NOTIFY captureDeviceChanged)
|
Q_PROPERTY(QString captureDevice READ getCaptureDevice WRITE lSetCaptureDevice NOTIFY captureDeviceChanged)
|
||||||
Q_PROPERTY(QString playbackDevice READ getPlaybackDevice WRITE setPlaybackDevice NOTIFY playbackDeviceChanged)
|
Q_PROPERTY(QString playbackDevice READ getPlaybackDevice WRITE lSetPlaybackDevice NOTIFY playbackDeviceChanged)
|
||||||
Q_PROPERTY(QString ringerDevice READ getRingerDevice WRITE setRingerDevice NOTIFY ringerDeviceChanged)
|
Q_PROPERTY(QString ringerDevice READ getRingerDevice WRITE setRingerDevice NOTIFY ringerDeviceChanged)
|
||||||
|
|
||||||
Q_PROPERTY(QStringList videoDevices READ getVideoDevices NOTIFY videoDevicesChanged)
|
Q_PROPERTY(QStringList videoDevices READ getVideoDevices NOTIFY videoDevicesChanged)
|
||||||
Q_PROPERTY(QString videoDevice READ getVideoDevice WRITE setVideoDevice NOTIFY videoDeviceChanged)
|
Q_PROPERTY(QString videoDevice READ getVideoDevice WRITE lSetVideoDevice NOTIFY videoDeviceChanged)
|
||||||
|
Q_PROPERTY(int videoDeviceIndex READ getVideoDeviceIndex NOTIFY videoDeviceChanged)
|
||||||
|
|
||||||
Q_PROPERTY(float micVolume MEMBER _dummy_int NOTIFY micVolumeChanged)
|
Q_PROPERTY(float micVolume MEMBER _dummy_int NOTIFY micVolumeChanged)
|
||||||
|
|
||||||
Q_PROPERTY(bool logsEnabled READ getLogsEnabled WRITE setLogsEnabled NOTIFY logsEnabledChanged)
|
Q_PROPERTY(bool logsEnabled READ getLogsEnabled WRITE setLogsEnabled NOTIFY logsEnabledChanged)
|
||||||
Q_PROPERTY(bool fullLogsEnabled READ getFullLogsEnabled WRITE setFullLogsEnabled NOTIFY fullLogsEnabledChanged)
|
Q_PROPERTY(bool fullLogsEnabled READ getFullLogsEnabled WRITE setFullLogsEnabled NOTIFY fullLogsEnabledChanged)
|
||||||
Q_PROPERTY(QString logsEmail READ getLogsEmail)
|
Q_PROPERTY(QString logsEmail READ getLogsEmail)
|
||||||
Q_PROPERTY(QString logsFolder READ getLogsFolder)
|
Q_PROPERTY(QString logsFolder READ getLogsFolder)
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static QSharedPointer<Settings> create();
|
static QSharedPointer<Settings> create();
|
||||||
Settings(QObject *parent = Q_NULLPTR);
|
Settings(QObject *parent = Q_NULLPTR);
|
||||||
|
|
@ -75,111 +78,121 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE void setFirstLaunch(bool first);
|
Q_INVOKABLE void setFirstLaunch(bool first);
|
||||||
Q_INVOKABLE bool getFirstLaunch() const;
|
Q_INVOKABLE bool getFirstLaunch() const;
|
||||||
|
|
||||||
// Security. --------------------------------------------------------------------
|
// Security. --------------------------------------------------------------------
|
||||||
bool getVfsEnabled() { return mVfsEnabled; }
|
bool getVfsEnabled() {
|
||||||
|
return mVfsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
// Call. --------------------------------------------------------------------
|
// Call. --------------------------------------------------------------------
|
||||||
|
|
||||||
bool getVideoEnabled() { return mVideoEnabled; }
|
bool getVideoEnabled() {
|
||||||
bool getEchoCancellationEnabled() { return mEchoCancellationEnabled; }
|
return mVideoEnabled;
|
||||||
bool getAutomaticallyRecordCallsEnabled() { return mAutomaticallyRecordCallsEnabled; }
|
}
|
||||||
|
bool getEchoCancellationEnabled() {
|
||||||
|
return mEchoCancellationEnabled;
|
||||||
|
}
|
||||||
|
bool getAutomaticallyRecordCallsEnabled() {
|
||||||
|
return mAutomaticallyRecordCallsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
float getPlaybackGain() const;
|
float getPlaybackGain() const;
|
||||||
|
|
||||||
float getCaptureGain() const;
|
float getCaptureGain() const;
|
||||||
|
|
||||||
QStringList getCaptureDevices () const;
|
QStringList getCaptureDevices() const;
|
||||||
QStringList getPlaybackDevices () const;
|
QStringList getPlaybackDevices() const;
|
||||||
|
|
||||||
QString getCaptureDevice () const;
|
QString getCaptureDevice() const;
|
||||||
|
|
||||||
QString getPlaybackDevice () const;
|
QString getPlaybackDevice() const;
|
||||||
|
|
||||||
QString getRingerDevice () const;
|
QString getRingerDevice() const;
|
||||||
|
|
||||||
QString getVideoDevice() { return mVideoDevice; }
|
QString getVideoDevice() const {
|
||||||
|
return mVideoDevice;
|
||||||
|
}
|
||||||
|
int getVideoDeviceIndex() const;
|
||||||
QStringList getVideoDevices() const;
|
QStringList getVideoDevices() const;
|
||||||
|
|
||||||
bool getCaptureGraphRunning();
|
bool getCaptureGraphRunning();
|
||||||
|
|
||||||
Q_INVOKABLE void startEchoCancellerCalibration();
|
Q_INVOKABLE void startEchoCancellerCalibration();
|
||||||
int getEchoCancellationCalibration() const;
|
int getEchoCancellationCalibration() const;
|
||||||
|
|
||||||
Q_INVOKABLE void accessCallSettings();
|
Q_INVOKABLE void accessCallSettings();
|
||||||
Q_INVOKABLE void closeCallSettings();
|
Q_INVOKABLE void closeCallSettings();
|
||||||
Q_INVOKABLE void updateMicVolume() const;
|
Q_INVOKABLE void updateMicVolume() const;
|
||||||
|
|
||||||
bool getLogsEnabled () const;
|
|
||||||
bool getFullLogsEnabled () const;
|
|
||||||
|
|
||||||
Q_INVOKABLE void cleanLogs () const;
|
|
||||||
Q_INVOKABLE void sendLogs () const;
|
|
||||||
QString getLogsEmail () const;
|
|
||||||
QString getLogsFolder () const;
|
|
||||||
|
|
||||||
|
bool getLogsEnabled() const;
|
||||||
|
bool getFullLogsEnabled() const;
|
||||||
|
|
||||||
|
Q_INVOKABLE void cleanLogs() const;
|
||||||
|
Q_INVOKABLE void sendLogs() const;
|
||||||
|
QString getLogsEmail() const;
|
||||||
|
QString getLogsFolder() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
// Security
|
// Security
|
||||||
void setVfsEnabled(const bool enabled);
|
void setVfsEnabled(const bool enabled);
|
||||||
void vfsEnabledChanged();
|
void vfsEnabledChanged();
|
||||||
|
|
||||||
// Call
|
// Call
|
||||||
void setVideoEnabled(const bool enabled);
|
void setVideoEnabled(const bool enabled);
|
||||||
void videoEnabledChanged();
|
void videoEnabledChanged();
|
||||||
|
|
||||||
void setEchoCancellationEnabled(const bool enabled);
|
void setEchoCancellationEnabled(const bool enabled);
|
||||||
void echoCancellationEnabledChanged();
|
void echoCancellationEnabledChanged();
|
||||||
|
|
||||||
void setAutomaticallyRecordCallsEnabled(const bool enabled);
|
void setAutomaticallyRecordCallsEnabled(const bool enabled);
|
||||||
void automaticallyRecordCallsEnabledChanged();
|
void automaticallyRecordCallsEnabledChanged();
|
||||||
|
|
||||||
void captureGraphRunningChanged(bool running);
|
void captureGraphRunningChanged(bool running);
|
||||||
|
|
||||||
void playbackGainChanged(float gain);
|
void playbackGainChanged(float gain);
|
||||||
void captureGainChanged(float gain);
|
void captureGainChanged(float gain);
|
||||||
|
|
||||||
void captureDevicesChanged (const QStringList &devices);
|
|
||||||
void playbackDevicesChanged (const QStringList &devices);
|
|
||||||
|
|
||||||
void setCaptureDevice (const QString &device);
|
|
||||||
void captureDeviceChanged (const QString &device);
|
|
||||||
|
|
||||||
void setPlaybackDevice (const QString &device);
|
|
||||||
void playbackDeviceChanged (const QString &device);
|
|
||||||
void ringerDeviceChanged (const QString &device);
|
|
||||||
|
|
||||||
void setVideoDevice(const QString &device);
|
void captureDevicesChanged(const QStringList &devices);
|
||||||
|
void playbackDevicesChanged(const QStringList &devices);
|
||||||
|
|
||||||
|
void lSetCaptureDevice(const QString &device);
|
||||||
|
void captureDeviceChanged(const QString &device);
|
||||||
|
|
||||||
|
void lSetPlaybackDevice(const QString &device);
|
||||||
|
void playbackDeviceChanged(const QString &device);
|
||||||
|
void ringerDeviceChanged(const QString &device);
|
||||||
|
|
||||||
|
void lSetVideoDevice(const QString &device);
|
||||||
void videoDeviceChanged();
|
void videoDeviceChanged();
|
||||||
void videoDevicesChanged();
|
void videoDevicesChanged();
|
||||||
|
|
||||||
void setCaptureGain(float gain);
|
void lSetCaptureGain(float gain);
|
||||||
void setPlaybackGain(float gain);
|
void lSetPlaybackGain(float gain);
|
||||||
void setRingerDevice (const QString &device);
|
void setRingerDevice(const QString &device);
|
||||||
|
|
||||||
void echoCancellationCalibrationChanged();
|
void echoCancellationCalibrationChanged();
|
||||||
void micVolumeChanged(float volume);
|
void micVolumeChanged(float volume);
|
||||||
|
|
||||||
void logsEnabledChanged ();
|
void logsEnabledChanged();
|
||||||
void fullLogsEnabledChanged ();
|
void fullLogsEnabledChanged();
|
||||||
|
|
||||||
void setLogsEnabled (bool status);
|
void setLogsEnabled(bool status);
|
||||||
void setFullLogsEnabled (bool status);
|
void setFullLogsEnabled(bool status);
|
||||||
|
|
||||||
void logsUploadTerminated (bool status, QString url);
|
void logsUploadTerminated(bool status, QString url);
|
||||||
void logsEmailChanged (const QString &email);
|
void logsEmailChanged(const QString &email);
|
||||||
void logsFolderChanged (const QString &folder);
|
void logsFolderChanged(const QString &folder);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<SettingsModel> mSettingsModel;
|
std::shared_ptr<SettingsModel> mSettingsModel;
|
||||||
|
|
||||||
// Dummy properties (for properties that use values from core received through signals)
|
// Dummy properties (for properties that use values from core received through signals)
|
||||||
int _dummy_int = 0;
|
int _dummy_int = 0;
|
||||||
|
|
||||||
// Security
|
// Security
|
||||||
bool mVfsEnabled;
|
bool mVfsEnabled;
|
||||||
|
|
||||||
// Call
|
// Call
|
||||||
bool mVideoEnabled;
|
bool mVideoEnabled;
|
||||||
bool mEchoCancellationEnabled;
|
bool mEchoCancellationEnabled;
|
||||||
|
|
@ -191,22 +204,22 @@ private:
|
||||||
QString mCaptureDevice;
|
QString mCaptureDevice;
|
||||||
QString mPlaybackDevice;
|
QString mPlaybackDevice;
|
||||||
QString mRingerDevice;
|
QString mRingerDevice;
|
||||||
|
|
||||||
// Video
|
// Video
|
||||||
QStringList mVideoDevices;
|
QStringList mVideoDevices;
|
||||||
QString mVideoDevice;
|
QString mVideoDevice;
|
||||||
|
|
||||||
bool mCaptureGraphRunning;
|
bool mCaptureGraphRunning;
|
||||||
float mCaptureGain;
|
float mCaptureGain;
|
||||||
float mPlaybackGain;
|
float mPlaybackGain;
|
||||||
int mEchoCancellationCalibration;
|
int mEchoCancellationCalibration;
|
||||||
|
|
||||||
//Debug logs
|
// Debug logs
|
||||||
bool mLogsEnabled;
|
bool mLogsEnabled;
|
||||||
bool mFullLogsEnabled;
|
bool mFullLogsEnabled;
|
||||||
QString mLogsFolder;
|
QString mLogsFolder;
|
||||||
QString mLogsEmail;
|
QString mLogsEmail;
|
||||||
|
|
||||||
QSettings mAppSettings;
|
QSettings mAppSettings;
|
||||||
QSharedPointer<SafeConnection<Settings, SettingsModel>> mSettingsModelConnection;
|
QSharedPointer<SafeConnection<Settings, SettingsModel>> mSettingsModelConnection;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,16 +21,9 @@ AppWindow {
|
||||||
property int conferenceLayout: call && call.core.conferenceVideoLayout || 0
|
property int conferenceLayout: call && call.core.conferenceVideoLayout || 0
|
||||||
|
|
||||||
property bool callTerminatedByUser: false
|
property bool callTerminatedByUser: false
|
||||||
property var callState: call && call.core.state
|
property var callState: call ? call.core.state : LinphoneEnums.CallState.Idle
|
||||||
property var transferState: call && call.core.transferState
|
property var transferState: call && call.core.transferState
|
||||||
|
|
||||||
onCallChanged: {
|
|
||||||
// if conference, the main item is only
|
|
||||||
// displayed when state is connected
|
|
||||||
if (call && middleItemStackView.currentItem != inCallItem && conference)
|
|
||||||
middleItemStackView.replace(inCallItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
onCallStateChanged: {
|
onCallStateChanged: {
|
||||||
if (callState === LinphoneEnums.CallState.Connected) {
|
if (callState === LinphoneEnums.CallState.Connected) {
|
||||||
if (middleItemStackView.currentItem != inCallItem) {
|
if (middleItemStackView.currentItem != inCallItem) {
|
||||||
|
|
@ -395,7 +388,7 @@ AppWindow {
|
||||||
: ""
|
: ""
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
visible: mainWindow.call.core.recording
|
visible: mainWindow.call && mainWindow.call.core.recording
|
||||||
text: qsTr("Arrêter l'enregistrement")
|
text: qsTr("Arrêter l'enregistrement")
|
||||||
onPressed: mainWindow.call.core.lStopRecording()
|
onPressed: mainWindow.call.core.lStopRecording()
|
||||||
}
|
}
|
||||||
|
|
@ -719,14 +712,17 @@ AppWindow {
|
||||||
Component {
|
Component {
|
||||||
id: settingsPanel
|
id: settingsPanel
|
||||||
Item {
|
Item {
|
||||||
Control.StackView.onActivated: rightPanel.headerTitleText = qsTr("Paramètres")
|
Control.StackView.onActivated: {
|
||||||
|
rightPanel.headerTitleText = qsTr("Paramètres")
|
||||||
|
}
|
||||||
InCallSettingsPanel {
|
InCallSettingsPanel {
|
||||||
|
id: inSettingsPanel
|
||||||
|
call: mainWindow.call
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: 16 * DefaultStyle.dp
|
anchors.topMargin: 16 * DefaultStyle.dp
|
||||||
anchors.bottomMargin: 16 * DefaultStyle.dp
|
anchors.bottomMargin: 16 * DefaultStyle.dp
|
||||||
anchors.leftMargin: 17 * DefaultStyle.dp
|
anchors.leftMargin: 17 * DefaultStyle.dp
|
||||||
anchors.rightMargin: 17 * DefaultStyle.dp
|
anchors.rightMargin: 17 * DefaultStyle.dp
|
||||||
call: mainWindow.call
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -866,14 +862,14 @@ AppWindow {
|
||||||
target: callStatusText
|
target: callStatusText
|
||||||
when: middleItemStackView.currentItem === waitingRoomIn
|
when: middleItemStackView.currentItem === waitingRoomIn
|
||||||
property: "text"
|
property: "text"
|
||||||
value: waitingRoomIn.conferenceInfo.core.subject
|
value: waitingRoomIn.conferenceInfo && waitingRoomIn.conferenceInfo.core.subject
|
||||||
restoreMode: Binding.RestoreBindingOrValue
|
restoreMode: Binding.RestoreBindingOrValue
|
||||||
}
|
}
|
||||||
Binding {
|
Binding {
|
||||||
target: conferenceDate
|
target: conferenceDate
|
||||||
when: middleItemStackView.currentItem === waitingRoomIn
|
when: middleItemStackView.currentItem === waitingRoomIn
|
||||||
property: "text"
|
property: "text"
|
||||||
value: waitingRoomIn.conferenceInfo.core.startEndDateString
|
value: waitingRoomIn.conferenceInfo && waitingRoomIn.conferenceInfo.core.startEndDateString
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: rightPanel
|
target: rightPanel
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,11 @@ import SettingsCpp 1.0
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property CallGui call
|
property CallGui call
|
||||||
onCallChanged: {
|
property alias speakerVolume: speakerVolume.value
|
||||||
if (call) {
|
property string speakerDevice: outputAudioDeviceCBox.currentText
|
||||||
call.core.lSetOutputAudioDevice(outputAudioDeviceCBox.currentText)
|
property alias micVolume: microVolume.value
|
||||||
call.core.lSetSpeakerVolumeGain(speakerVolume.value)
|
property string microDevice: inputAudioDeviceCBox.currentText
|
||||||
call.core.lSetInputAudioDevice(inputAudioDeviceCBox.currentText)
|
|
||||||
call.core.lSetMicrophoneVolumeGain(microVolume.value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RoundedBackgroundControl {
|
RoundedBackgroundControl {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Control.StackView.onActivated: {
|
Control.StackView.onActivated: {
|
||||||
|
|
@ -54,6 +51,7 @@ ColumnLayout {
|
||||||
model: SettingsCpp.playbackDevices
|
model: SettingsCpp.playbackDevices
|
||||||
onCurrentTextChanged: {
|
onCurrentTextChanged: {
|
||||||
if (mainItem.call) mainItem.call.core.lSetOutputAudioDevice(currentText)
|
if (mainItem.call) mainItem.call.core.lSetOutputAudioDevice(currentText)
|
||||||
|
SettingsCpp.lSetPlaybackDevice(currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Slider {
|
Slider {
|
||||||
|
|
@ -61,9 +59,10 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 0.0
|
from: 0.0
|
||||||
to: 1.0
|
to: 1.0
|
||||||
value: mainItem.call ? mainItem.call.core.speakerVolumeGain : 0.5
|
value: mainItem.call ? mainItem.call.core.speakerVolumeGain : SettingsCpp.playbackGain
|
||||||
onMoved: {
|
onMoved: {
|
||||||
if (mainItem.call) mainItem.call.core.lSetSpeakerVolumeGain(value)
|
if (mainItem.call) mainItem.call.core.lSetSpeakerVolumeGain(value)
|
||||||
|
SettingsCpp.lSetPlaybackGain(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -93,6 +92,7 @@ ColumnLayout {
|
||||||
model: SettingsCpp.captureDevices
|
model: SettingsCpp.captureDevices
|
||||||
onCurrentTextChanged: {
|
onCurrentTextChanged: {
|
||||||
if (mainItem.call) mainItem.call.core.lSetInputAudioDevice(currentText)
|
if (mainItem.call) mainItem.call.core.lSetInputAudioDevice(currentText)
|
||||||
|
SettingsCpp.lSetCaptureDevice(currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Slider {
|
Slider {
|
||||||
|
|
@ -100,9 +100,10 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 0.0
|
from: 0.0
|
||||||
to: 1.0
|
to: 1.0
|
||||||
value: mainItem.call ? mainItem.call.core.microphoneVolumeGain : 0.5
|
value: mainItem.call ? mainItem.call.core.microphoneVolumeGain : SettingsCpp.captureGain
|
||||||
onMoved: {
|
onMoved: {
|
||||||
if (mainItem.call) mainItem.call.core.lSetMicrophoneVolumeGain(value)
|
if (mainItem.call) mainItem.call.core.lSetMicrophoneVolumeGain(value)
|
||||||
|
SettingsCpp.lSetCaptureGain(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Timer {
|
Timer {
|
||||||
|
|
@ -160,13 +161,14 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
id: videoDevicesCbox
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.preferredHeight: 49 * DefaultStyle.dp
|
Layout.preferredHeight: 49 * DefaultStyle.dp
|
||||||
model: SettingsCpp.videoDevices
|
model: SettingsCpp.videoDevices
|
||||||
currentIndex: SettingsCpp.currentVideoDeviceIndex
|
currentIndex: SettingsCpp.videoDeviceIndex
|
||||||
onCurrentTextChanged: {
|
onCurrentTextChanged: {
|
||||||
SettingsCpp.setVideoDevice(currentText)
|
SettingsCpp.lSetVideoDevice(currentText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,8 @@ Item {
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: waitingTime
|
id: waitingTime
|
||||||
property int seconds
|
|
||||||
visible: !UtilsCpp.isMe(mainItem.peerAddress)
|
visible: !UtilsCpp.isMe(mainItem.peerAddress)
|
||||||
|
property int seconds
|
||||||
text: UtilsCpp.formatElapsedTime(seconds)
|
text: UtilsCpp.formatElapsedTime(seconds)
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,11 @@ Item{
|
||||||
}
|
}
|
||||||
property var callState: call && call.core.state || undefined
|
property var callState: call && call.core.state || undefined
|
||||||
onCallStateChanged: if (callState === LinphoneEnums.CallState.End || callState === LinphoneEnums.CallState.Released) preview.visible = false
|
onCallStateChanged: if (callState === LinphoneEnums.CallState.End || callState === LinphoneEnums.CallState.Released) preview.visible = false
|
||||||
property string localAddress: call && call.conference
|
property string localAddress: call
|
||||||
? call.conference.core.me.core.sipAddress
|
? call.conference
|
||||||
: call.core.localAddress
|
? call.conference.core.me.core.sipAddress
|
||||||
|| ""
|
: call.core.localAddress
|
||||||
|
: ""
|
||||||
|
|
||||||
// currently speaking address (for hiding in list view)
|
// currently speaking address (for hiding in list view)
|
||||||
property string activeSpeakerAddress
|
property string activeSpeakerAddress
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Item {
|
||||||
Layout.Layout.preferredHeight: parent.height
|
Layout.Layout.preferredHeight: parent.height
|
||||||
Layout.Layout.alignment: Qt.AlignCenter
|
Layout.Layout.alignment: Qt.AlignCenter
|
||||||
Text {
|
Text {
|
||||||
text: qsTr(mainItem.call.core.lastErrorMessage)
|
text: mainItem.call ? mainItem.call.core.lastErrorMessage : ""
|
||||||
Layout.Layout.alignment: Qt.AlignCenter
|
Layout.Layout.alignment: Qt.AlignCenter
|
||||||
color: DefaultStyle.grey_0
|
color: DefaultStyle.grey_0
|
||||||
font.pixelSize: 40 * DefaultStyle.dp
|
font.pixelSize: 40 * DefaultStyle.dp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue