Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+1
-1
@@ -50,7 +50,7 @@ NGL_TARGET_LINK_LIBRARIES(EfmSoundAreaGuiPlugin
|
||||
IsmDataPluginInterface
|
||||
EfmDataPluginInterface
|
||||
EfmGuiPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsUtilsGuiDds
|
||||
)
|
||||
NGL_INSTALL_TARGET(EfmSoundAreaGuiPlugin)
|
||||
+4
-3
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <utility>
|
||||
#include <SoundManagement/som.hpp>
|
||||
|
||||
#include <QHash>
|
||||
@@ -50,21 +51,21 @@ struct SoundArea
|
||||
|
||||
bool hasActiveSound(const SoundManagement::SoundCategory &category, const int &id) const
|
||||
{
|
||||
for (const auto &sound : qAsConst(activeSounds))
|
||||
for (const auto &sound : std::as_const(activeSounds))
|
||||
if ( (sound.category() == category) && (sound.soundId() == id) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
bool hasActiveSound(const int32_t &category, const int32_t &id) const
|
||||
{
|
||||
for (const auto &sound : qAsConst(activeSounds))
|
||||
for (const auto &sound : std::as_const(activeSounds))
|
||||
if ( (static_cast<int32_t>(sound.category().underlying()) == category) && (sound.soundId() == id) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
bool hasActiveSound(const SoundKey &key) const
|
||||
{
|
||||
for (const auto &sound : qAsConst(activeSounds))
|
||||
for (const auto &sound : std::as_const(activeSounds))
|
||||
if ( (static_cast<int32_t>(sound.category().underlying()) == key.first) && (sound.soundId() == key.second) )
|
||||
return true;
|
||||
return false;
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "efm_sound_area_edit_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_efm_sound_area_edit_dialog.h"
|
||||
#include "efm_sound_area.h"
|
||||
#include "efm_sound_area_helper.h"
|
||||
@@ -62,7 +63,7 @@ void SoundAreaEditDialog::onPlaySound(SoundManagement::SoundCategory category, i
|
||||
|
||||
SoundManagement::PlayControl control = inLoop ? SoundManagement::PlayControl_def::PlayLoop : SoundManagement::PlayControl_def::PlaySingle;
|
||||
|
||||
for (const auto &egcuId : qAsConst(m_soundArea->egcuIds))
|
||||
for (const auto &egcuId : std::as_const(m_soundArea->egcuIds))
|
||||
{
|
||||
if (!m_egcuCheckBoxes.value(egcuId)->isChecked())
|
||||
continue;
|
||||
@@ -101,7 +102,7 @@ void SoundAreaEditDialog::onStopAllSounds()
|
||||
QList<int32_t> egcuIds;
|
||||
|
||||
|
||||
for (const auto &egcu : qAsConst(m_soundArea->egcuIds))
|
||||
for (const auto &egcu : std::as_const(m_soundArea->egcuIds))
|
||||
{
|
||||
if (!m_egcuCheckBoxes.value(egcu)->isChecked())
|
||||
continue;
|
||||
@@ -109,7 +110,7 @@ void SoundAreaEditDialog::onStopAllSounds()
|
||||
egcuIds.append(egcu);
|
||||
}
|
||||
|
||||
for (const auto &egcu : qAsConst(egcuIds))
|
||||
for (const auto &egcu : std::as_const(egcuIds))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onStopAllSounds egcu=" << egcu;
|
||||
SoundManagement::StopAllSoundsRequest req(egcu);
|
||||
@@ -154,7 +155,7 @@ bool SoundAreaEditDialog::init(LtsSession::LtsSessionDataDds *session)
|
||||
|
||||
QGridLayout *layout = new QGridLayout();
|
||||
int i = 0;
|
||||
for (const auto &egcu : qAsConst(m_soundArea->egcuIds))
|
||||
for (const auto &egcu : std::as_const(m_soundArea->egcuIds))
|
||||
{
|
||||
QCheckBox *chBox = new QCheckBox(m_helper->egcuName(egcu));
|
||||
chBox->setChecked(true);
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "efm_sound_area_edit_model_playlist.h"
|
||||
#include <utility>
|
||||
#include "efm_sound_area_helper.h"
|
||||
#include "../logger.h"
|
||||
|
||||
@@ -100,7 +101,7 @@ bool SoundAreaPlaylistModel::init(std::shared_ptr<SoundManagement::Interface::Dt
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
|
||||
const QMap<int32_t, SoundManagement::SoundState> soundStates = somDtc->soundStates();
|
||||
for (const auto &data : qAsConst(soundStates))
|
||||
for (const auto &data : std::as_const(soundStates))
|
||||
{
|
||||
if (!m_egcuIds.contains(data.egcuId()))
|
||||
continue;
|
||||
@@ -127,7 +128,7 @@ bool SoundAreaPlaylistModel::init(std::shared_ptr<SoundManagement::Interface::Dt
|
||||
int SoundAreaPlaylistModel::indexOf(const SoundState &data) const
|
||||
{
|
||||
int idx = 0;
|
||||
for (const auto &item : qAsConst(m_vecData))
|
||||
for (const auto &item : std::as_const(m_vecData))
|
||||
{
|
||||
if ( (item.category() == data.category()) &&
|
||||
(item.soundId() == data.soundId()) &&
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "efm_sound_area_edit_model_tree.h"
|
||||
#include <utility>
|
||||
#include "efm_sound_area.h"
|
||||
#include "efm_sound_area_helper.h"
|
||||
#include "../logger.h"
|
||||
@@ -213,7 +214,7 @@ bool SoundAreaTreeModel::init(const std::shared_ptr<SoundManagement::Interface::
|
||||
|
||||
SoundKey key;
|
||||
QVector<SoundManagement::SoundCategory> categories = m_helper->soundCategories();
|
||||
for (const auto &category : qAsConst(categories))
|
||||
for (const auto &category : std::as_const(categories))
|
||||
{
|
||||
QString name{m_helper->categoryName(category)};
|
||||
QVector<QVariant> data{QVector<QVariant>{name, QVariant(), 0, 100}};
|
||||
@@ -224,7 +225,7 @@ bool SoundAreaTreeModel::init(const std::shared_ptr<SoundManagement::Interface::
|
||||
|
||||
|
||||
SoundManagement::Sounds sounds = somDtc->sounds();
|
||||
for (const auto &sound : qAsConst(sounds.sounds()))
|
||||
for (const auto &sound : std::as_const(sounds.sounds()))
|
||||
{
|
||||
for (auto &category : m_root->children())
|
||||
{
|
||||
@@ -262,13 +263,13 @@ bool SoundAreaTreeModel::setData(const QModelIndex &index, const QVariant &value
|
||||
SoundTreeItem * SoundAreaTreeModel::find(const SoundKey &key)
|
||||
{
|
||||
QVector<SoundTreeItem *> categories = m_root->children();
|
||||
for (auto category : qAsConst(categories))
|
||||
for (auto category : std::as_const(categories))
|
||||
{
|
||||
if (category->soundKey() == key)
|
||||
return category;
|
||||
|
||||
QVector<SoundTreeItem *> sounds = category->children();
|
||||
for (auto sound : qAsConst(sounds))
|
||||
for (auto sound : std::as_const(sounds))
|
||||
if (sound->soundKey() == key)
|
||||
return sound;
|
||||
}
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "efm_sound_area_helper.h"
|
||||
#include <utility>
|
||||
#include "../logger.h"
|
||||
|
||||
#include <QVector>
|
||||
@@ -21,12 +22,12 @@ SoundAreaHelper::SoundAreaHelper(SoundAreaHelper *helper)
|
||||
, m_logger(getLogger("Plugins.Gui.SoundArea.Helper"))
|
||||
{
|
||||
QMap<int32_t, InfrastructureManagement::InstrumentationAsset> assets = m_ismDtc->instrumentationAssets();
|
||||
for (const auto &asset : qAsConst(assets))
|
||||
for (const auto &asset : std::as_const(assets))
|
||||
if (asset.mountingPointTypeId() == InfrastructureManagement::MountingPointType_def::EffectGenerationControlUnit)
|
||||
m_egcuNames.insert(asset.id(), QString::fromStdString(asset.name()));
|
||||
|
||||
SoundManagement::Sounds sounds = m_somDtc->sounds();
|
||||
for (const auto &sound : qAsConst(sounds.sounds()))
|
||||
for (const auto &sound : std::as_const(sounds.sounds()))
|
||||
m_soundDuration.insert(SoundKey(sound.category().underlying(), sound.soundId()), sound.duration());
|
||||
}
|
||||
|
||||
@@ -37,12 +38,12 @@ SoundAreaHelper::SoundAreaHelper(std::shared_ptr<InfrastructureManagement::Inter
|
||||
, m_logger(getLogger("Plugins.Gui.SoundArea.Helper"))
|
||||
{
|
||||
QMap<int32_t, InfrastructureManagement::InstrumentationAsset> assets = m_ismDtc->instrumentationAssets();
|
||||
for (const auto &asset : qAsConst(assets))
|
||||
for (const auto &asset : std::as_const(assets))
|
||||
if (asset.mountingPointTypeId() == InfrastructureManagement::MountingPointType_def::EffectGenerationControlUnit)
|
||||
m_egcuNames.insert(asset.id(), QString::fromStdString(asset.name()));
|
||||
|
||||
SoundManagement::Sounds sounds = m_somDtc->sounds();
|
||||
for (const auto &sound : qAsConst(sounds.sounds()))
|
||||
for (const auto &sound : std::as_const(sounds.sounds()))
|
||||
m_soundDuration.insert(SoundKey(sound.category().underlying(), sound.soundId()), sound.duration());
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "efm_sound_area_select_dialog.h"
|
||||
#include <utility>
|
||||
#include "ui_efm_sound_area_select_dialog.h"
|
||||
#include "efm_sound_area_select_model.h"
|
||||
#include "efm_sound_area_edit_dialog.h"
|
||||
@@ -67,7 +68,7 @@ void SoundAreaSelectDialog::onStopSounds(const QModelIndex &index)
|
||||
return;
|
||||
|
||||
const QVector<int> &egcuIds = soundArea.egcuIds;
|
||||
for (const auto &egcu : qAsConst(egcuIds))
|
||||
for (const auto &egcu : std::as_const(egcuIds))
|
||||
{
|
||||
SoundManagement::StopAllSoundsRequest req(egcu);
|
||||
m_requestHelper->startSingleRequest([this, req]()
|
||||
@@ -80,11 +81,11 @@ void SoundAreaSelectDialog::onStopSounds(const QModelIndex &index)
|
||||
void SoundAreaSelectDialog::onStopAllSounds()
|
||||
{
|
||||
const QVector<SoundArea> &soundAreas = m_model->soundAreas();
|
||||
for (const auto &soundArea : qAsConst(soundAreas))
|
||||
for (const auto &soundArea : std::as_const(soundAreas))
|
||||
{
|
||||
|
||||
const QVector<int> &egcuIds = soundArea.egcuIds;
|
||||
for (const auto &egcu : qAsConst(egcuIds))
|
||||
for (const auto &egcu : std::as_const(egcuIds))
|
||||
{
|
||||
SoundManagement::StopAllSoundsRequest req(egcu);
|
||||
m_requestHelper->startSingleRequest([this, req]() {
|
||||
|
||||
Reference in new issue
Block a user