Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+8
-8
@@ -96,7 +96,7 @@ void SoundAreaEditDialog::onPlaySound(SoundManagement::SoundCategory category, i
|
||||
|
||||
void SoundAreaEditDialog::onStopAllSounds()
|
||||
{
|
||||
DEBUG_LOG() << "onStopAllSounds";
|
||||
DEBUG_LOG(m_logger) << "onStopAllSounds";
|
||||
|
||||
QList<int32_t> egcuIds;
|
||||
|
||||
@@ -105,13 +105,13 @@ void SoundAreaEditDialog::onStopAllSounds()
|
||||
{
|
||||
if (!m_egcuCheckBoxes.value(egcu)->isChecked())
|
||||
continue;
|
||||
DEBUG_LOG() << "onStopAllSounds add egcu=" << egcu;
|
||||
DEBUG_LOG(m_logger) << "onStopAllSounds add egcu=" << egcu;
|
||||
egcuIds.append(egcu);
|
||||
}
|
||||
|
||||
for (const auto &egcu : std::as_const(egcuIds))
|
||||
{
|
||||
DEBUG_LOG() << "onStopAllSounds egcu=" << egcu;
|
||||
DEBUG_LOG(m_logger) << "onStopAllSounds egcu=" << egcu;
|
||||
SoundManagement::StopAllSoundsRequest req(egcu);
|
||||
|
||||
m_somFtc->stopAllSoundsRequest(req, nullptr);
|
||||
@@ -125,7 +125,7 @@ m_somFtc->stopAllSoundsRequest(req, nullptr);
|
||||
|
||||
bool SoundAreaEditDialog::init(LtsSession::LtsSessionDataDds *session)
|
||||
{
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
|
||||
m_session = session;
|
||||
|
||||
@@ -133,19 +133,19 @@ bool SoundAreaEditDialog::init(LtsSession::LtsSessionDataDds *session)
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> ismDtc;
|
||||
if (!m_session->getDtc<InfrastructureManagement::DataInterface>(ismDtc))
|
||||
{
|
||||
ERROR_LOG() << "connection to ISM-DTC failed";
|
||||
ERROR_LOG(m_logger) << "connection to ISM-DTC failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_session->getDtc<EffectManagement::DataInterface>(m_somDtc))
|
||||
{
|
||||
ERROR_LOG() << "connection to SOM-DTC failed";
|
||||
ERROR_LOG(m_logger) << "connection to SOM-DTC failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_session->getFtc<EffectManagement::DataInterface>(m_somFtc))
|
||||
{
|
||||
ERROR_LOG() << "connection to SOM-FTC failed";
|
||||
ERROR_LOG(m_logger) << "connection to SOM-FTC failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ bool SoundAreaEditDialog::init(LtsSession::LtsSessionDataDds *session)
|
||||
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Hide, this, &SoundAreaEditDialog::onStopAllSounds);
|
||||
|
||||
DEBUG_LOG() << "init successful";
|
||||
DEBUG_LOG(m_logger) << "init successful";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+2
@@ -96,6 +96,8 @@ signals:
|
||||
void finished(const QString &msg);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
Core::FunctionReplyObject m_reply;
|
||||
};
|
||||
|
||||
|
||||
+8
-9
@@ -24,9 +24,8 @@ namespace EffectManagement
|
||||
QIcon SoundAreaEditPlaylistDelegate::s_iconInf = QIcon(QStringLiteral("icon:infinity.svg"));
|
||||
|
||||
|
||||
SoundAreaEditPlaylistDelegate::SoundAreaEditPlaylistDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
{
|
||||
SoundAreaEditPlaylistDelegate::SoundAreaEditPlaylistDelegate(QObject *parent) : QStyledItemDelegate(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +96,7 @@ void SoundAreaPlaylistModel::onTimeout()
|
||||
|
||||
bool SoundAreaPlaylistModel::init(std::shared_ptr<SoundManagement::Interface::Dtc> &somDtc)
|
||||
{
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
|
||||
const QMap<int32_t, SoundManagement::SoundState> soundStates = somDtc->soundStates();
|
||||
for (const auto &data : std::as_const(soundStates))
|
||||
@@ -120,7 +119,7 @@ bool SoundAreaPlaylistModel::init(std::shared_ptr<SoundManagement::Interface::Dt
|
||||
connect(m_timer, &QTimer::timeout, this, &SoundAreaPlaylistModel::onTimeout);
|
||||
m_timer->start(1000);
|
||||
|
||||
DEBUG_LOG() << "init successful";
|
||||
DEBUG_LOG(m_logger) << "init successful";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -147,14 +146,14 @@ bool SoundAreaPlaylistModel::addActiveSound(SoundState data)
|
||||
|
||||
if (row != -1)
|
||||
{
|
||||
ERROR_LOG() << "'" << name << "' is already active";
|
||||
ERROR_LOG(m_logger) << "'" << name << "' is already active";
|
||||
return false;
|
||||
}
|
||||
|
||||
data.status(SoundState::Status::Active);
|
||||
insertRow(data);
|
||||
|
||||
DEBUG_LOG() << "adding '" << name << "' to active Sounds";
|
||||
DEBUG_LOG(m_logger) << "adding '" << name << "' to active Sounds";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -230,7 +229,7 @@ bool SoundAreaPlaylistModel::onDataChanged(const SoundState &data, DataModificat
|
||||
return addActiveSound(data);
|
||||
|
||||
case DataModification::eModified:
|
||||
WARNING_LOG() << "handling eModified for sound states not implemented yet";
|
||||
WARNING_LOG(m_logger) << "handling eModified for sound states not implemented yet";
|
||||
return false;
|
||||
|
||||
case DataModification::eRemoved:
|
||||
@@ -238,7 +237,7 @@ bool SoundAreaPlaylistModel::onDataChanged(const SoundState &data, DataModificat
|
||||
idx = SoundAreaPlaylistModel::index(m_vecData.indexOf(data), 0);
|
||||
if (row == -1)
|
||||
{
|
||||
ERROR_LOG() << "'" << m_helper->soundName(data.category(), data.soundId()) << "' is neither scheduled nor active";
|
||||
ERROR_LOG(m_logger) << "'" << m_helper->soundName(data.category(), data.soundId()) << "' is neither scheduled nor active";
|
||||
return false;
|
||||
}
|
||||
return removeActiveSound(idx);
|
||||
|
||||
+2
@@ -40,6 +40,8 @@ public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
static QIcon s_iconInf;
|
||||
|
||||
};
|
||||
|
||||
+4
-5
@@ -92,11 +92,10 @@ void SpinBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionVi
|
||||
|
||||
|
||||
|
||||
SoundTreeItem::SoundTreeItem(const QVector<QVariant> &data, const SoundKey &key, SoundTreeItem *parent)
|
||||
: m_parent(parent)
|
||||
SoundTreeItem::SoundTreeItem(const QVector<QVariant> &data, const SoundKey &key, SoundTreeItem *parent) : m_parent(parent)
|
||||
, m_data(data)
|
||||
, m_soundKey(key)
|
||||
{
|
||||
, m_soundKey(key),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
}
|
||||
|
||||
SoundTreeItem::~SoundTreeItem()
|
||||
@@ -208,7 +207,7 @@ bool SoundAreaTreeModel::onToggleLoop(const QModelIndex &index)
|
||||
|
||||
bool SoundAreaTreeModel::init(const std::shared_ptr<SoundManagement::Interface::Dtc> &somDtc)
|
||||
{
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
|
||||
|
||||
SoundKey key;
|
||||
|
||||
+2
@@ -66,6 +66,8 @@ public:
|
||||
QString toString() const;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<SoundTreeItem *> m_children;
|
||||
SoundTreeItem *m_parent{nullptr};
|
||||
QVector<QVariant> m_data;
|
||||
|
||||
+3
-4
@@ -16,10 +16,9 @@ namespace EffectManagement
|
||||
|
||||
|
||||
|
||||
SoundAreaHelper::SoundAreaHelper(SoundAreaHelper *helper)
|
||||
: m_ismDtc(helper->ismDtc())
|
||||
, m_somDtc(helper->somDtc())
|
||||
{
|
||||
SoundAreaHelper::SoundAreaHelper(SoundAreaHelper *helper) : m_ismDtc(helper->ismDtc())
|
||||
, m_somDtc(helper->somDtc()),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
QMap<int32_t, InfrastructureManagement::InstrumentationAsset> assets = m_ismDtc->instrumentationAssets();
|
||||
for (const auto &asset : std::as_const(assets))
|
||||
if (asset.mountingPointTypeId() == InfrastructureManagement::MountingPointType_def::EffectGenerationControlUnit)
|
||||
|
||||
+2
@@ -79,6 +79,8 @@ public:
|
||||
static SoundManagement::SoundCategory soundCategory(const int &i);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
||||
std::shared_ptr<SoundManagement::Interface::Dtc> m_somDtc;
|
||||
|
||||
|
||||
+6
-6
@@ -100,7 +100,7 @@ void SoundAreaSelectDialog::onStopAllSounds()
|
||||
|
||||
bool SoundAreaSelectDialog::init(LtsSession::LtsSessionDataDds *session, const QString &menuGroup)
|
||||
{
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
|
||||
m_session = session;
|
||||
setMenuGroup(menuGroup);
|
||||
@@ -110,25 +110,25 @@ bool SoundAreaSelectDialog::init(LtsSession::LtsSessionDataDds *session, const Q
|
||||
|
||||
if (!m_session->getDtc<InfrastructureManagement::DataInterface>(ismDtc))
|
||||
{
|
||||
ERROR_LOG() << "connection to ISM-DTC failed";
|
||||
ERROR_LOG(m_logger) << "connection to ISM-DTC failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_session->getDtc<EffectManagement::DataInterface>(somDtc))
|
||||
{
|
||||
ERROR_LOG() << "connection to SOM-DTC failed";
|
||||
ERROR_LOG(m_logger) << "connection to SOM-DTC failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_session->getFtc<EffectManagement::DataInterface>(m_somFtc))
|
||||
{
|
||||
ERROR_LOG() << "connection to SOM-FTC failed";
|
||||
ERROR_LOG(m_logger) << "connection to SOM-FTC failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_model->init(ismDtc, somDtc))
|
||||
{
|
||||
ERROR_LOG() << "sound area select model initialization failed";
|
||||
ERROR_LOG(m_logger) << "sound area select model initialization failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ bool SoundAreaSelectDialog::init(LtsSession::LtsSessionDataDds *session, const Q
|
||||
connect(m_ui->tvSoundlist, &QTableView::clicked, this, &SoundAreaSelectDialog::onSelectSoundArea);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Edit, this, &SoundAreaSelectDialog::onStopAllSounds);
|
||||
|
||||
DEBUG_LOG() << "init successful";
|
||||
DEBUG_LOG(m_logger) << "init successful";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -62,6 +62,8 @@ public:
|
||||
bool init(LtsSession::LtsSessionDataDds *session, const QString &menuGroup);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void onStopAllSoundsReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
|
||||
+6
-7
@@ -18,9 +18,8 @@ namespace EffectManagement
|
||||
|
||||
|
||||
|
||||
SoundAreaSelectDelegate::SoundAreaSelectDelegate(QObject *parent)
|
||||
: QItemDelegate(parent)
|
||||
{
|
||||
SoundAreaSelectDelegate::SoundAreaSelectDelegate(QObject *parent) : QItemDelegate(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +76,7 @@ bool SoundAreaSelectModel::onSoundStateChanged(const SoundManagement::SoundState
|
||||
case DataModification::eAdded:
|
||||
if (it != soundArea.activeSounds.end())
|
||||
{
|
||||
DEBUG_LOG() << "'" << m_helper->soundName(data.category(), data.soundId()) << "' is already active";
|
||||
DEBUG_LOG(m_logger) << "'" << m_helper->soundName(data.category(), data.soundId()) << "' is already active";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -93,7 +92,7 @@ bool SoundAreaSelectModel::onSoundStateChanged(const SoundManagement::SoundState
|
||||
case DataModification::eRemoved:
|
||||
if (it == soundArea.activeSounds.end())
|
||||
{
|
||||
DEBUG_LOG() << "'" << m_helper->soundName(data.category(), data.soundId()) << "' is not active";
|
||||
DEBUG_LOG(m_logger) << "'" << m_helper->soundName(data.category(), data.soundId()) << "' is not active";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -123,7 +122,7 @@ bool SoundAreaSelectModel::onSoundStateChanged(const SoundManagement::SoundState
|
||||
bool SoundAreaSelectModel::init(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &ismDtc,
|
||||
const std::shared_ptr<SoundManagement::Interface::Dtc> &somDtc)
|
||||
{
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
|
||||
m_ismDtc = ismDtc;
|
||||
m_somDtc = somDtc;
|
||||
@@ -154,7 +153,7 @@ bool SoundAreaSelectModel::init(const std::shared_ptr<InfrastructureManagement::
|
||||
onSoundStateChanged(soundState, DataModification::eAdded);
|
||||
});
|
||||
|
||||
DEBUG_LOG() << "init successful";
|
||||
DEBUG_LOG(m_logger) << "init successful";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -72,6 +72,8 @@ public:
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool onDataChanged(const SoundArea &data, DataModification modType) override;
|
||||
|
||||
private:
|
||||
|
||||
+2
-3
@@ -14,9 +14,8 @@ const QIcon SwitchItemDelegate::s_iconOn = QIcon(QStringLiteral("icon:switch_on
|
||||
const QIcon SwitchItemDelegate::s_iconOff = QIcon(QStringLiteral("icon:switch_off.svg"));
|
||||
|
||||
|
||||
SwitchItemDelegate::SwitchItemDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
{
|
||||
SwitchItemDelegate::SwitchItemDelegate(QObject *parent) : QStyledItemDelegate(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
}
|
||||
|
||||
void SwitchItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
|
||||
+2
@@ -26,6 +26,8 @@ public:
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
static const QIcon s_iconOn;
|
||||
static const QIcon s_iconOff;
|
||||
};
|
||||
|
||||
+2
@@ -59,6 +59,8 @@ public:
|
||||
bool init(LtsSession::LtsSessionDataDds *session, const QString &menuGroup);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onControlSoundReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void retranslate() override;
|
||||
bool apply() override;
|
||||
|
||||
Reference in new issue
Block a user